HaxeFoundation/hashlink

JIT ERROR 0 mixing hl.UI8 and Float

ProfDiesel opened this issue · 2 comments

The following code triggers a JIT ERROR 0 (jit.c line 554) with hashlink 1.14.0 and haxe compiler 4.3.3.

Main.hx

abstract A(hl.UI8) {
    public function f() {
        final _ = (cast this) * 0.0;
        return 0;
    }
}

class Main {
    public static function main():Void {
        trace(cast (0, A).f());
    }
}

Compile and run with: haxe --main Main --hl main.hl && hl ./main.hl
NB: changing the underlying type of the abstract for an Int gets around the issue.


Narrowing down the problem from the original code, I came across a slightly different message with the code below :
JIT ERROR 0 (jit.c line 968)
Probably related.

abstract A(hl.UI8) {
    public function f() {
        this * 0.0;
    }
}

class Main {
    public static function main():Void {
    }
}

Cannot reproduce with Haxe git + Hashlink git, the program complete without issues.

Can repro with Linux, Ubuntu 22.04.
Only for the first case.