Hashlink seg fault MacOS (Apple Silicon)

I’ve tried both brew and built from source and both have identical results

Running with no input is fine

 % hl
HL/JIT 1.14.0 (c)2015-2023 Haxe Foundation
  Usage : hl [--debug <port>] [--debug-wait] <file>

Running with bytecode seg faults

% haxe --hl hello.hl --main Main
% hl hello.hl 
zsh: segmentation fault  hl hello.hl

The code is the simple Hello World example on the hashlink website.
Edit - posting the code for posterity:

    Multi-line comments for documentation.
class Main {
    static public function main():Void {
        // Single line comment
        trace("Hello World");
1 Like

More a comment than an answer, I do not know apple and not an expert in low level, but in my cases I was able to guess and identify hashlink segfaults by running the program under gdb
like gdb hl
then at the 2nd prompt you type run hello.hl
wait for the segfault, you will get some kind of stacktrace.

Ran through lldb and did a backtrace. Looks like the segfault is related to memmove in jit code - is there anyway to disable jit?

(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xffffffffffffffff)
  * frame #0: 0x000000018c5ab1ec libsystem_platform.dylib`_platform_memmove + 76
    frame #1: 0x000000010001051c hl`hl_jit_code + 120
    frame #2: 0x0000000100013d60 hl`hl_module_init + 440
    frame #3: 0x000000010001313c hl`main + 572
    frame #4: 0x000000018c1f20e0 dyld`start + 2360