JIT ERROR 8

Open
#302 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
compilers

Research direction

Reproduce the Haxe example and inspect jit.c at line 998, then compare the generated JVM bytecode for Failure/Failure_Impl.test() and its Operand stack underflow. Done means the example no longer triggers JIT ERROR 8 or the JVM VerifyError while preserving the working behavior on other targets.

Written by the indexing model from the issue text.

Description

JIT ERROR 8 (jit.c line 998)

@:multiType
abstract Failure(Null<Float>) {
    function new(v);
    @:from public static function from(v) { return cast v; }
    @:to public function to(v):Float { return cast v; }
}

      var fl:Failure = null;

JVM is failing too (maybe can help)

Exception in thread "main" java.lang.VerifyError: Operand stack underflow
Exception Details:
  Location:
    _Failure/Failure_Impl_.test()V @1: dstore_0
  Reason:
    Attempt to pop empty stack.
  Current Frame:
    bci: @1
    flags: { }
    locals: { }
    stack: { null }
  Bytecode:
    0x0000000: 0147 b1                                

	at haxe.root.Main.main(source/Main.hx)
	at haxe.root.Main.main(source/Main.hx)
Error: Command failed with error 1

Other targets are working fine.

Dominant language
C
Stars
911
Forks
207
Avg merge
1d 21h
Merged PRs (30d)
13

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HaxeFoundation/hashlink

All issues in HaxeFoundation/hashlink

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.