samp-plugin-jit
samp-plugin-jit copied to clipboard
JIT Sleep: ExecContHelper tries to jump to null address.
Seems that jump_lookup_label_ returns 0 and it tries to use that
https://github.com/Zeex/samp-plugin-jit/blob/a704bcbc23f26d5a9f72775199f3de18b3379a61/src/amxjit/compiler_impl.cpp#L1775-L1779

Server crashes after this
Seems that the 0 comes from the GetJITInstrPtr function. This check fails and makes it return 0:
https://github.com/Zeex/samp-plugin-jit/blob/08ed8e631b49d98b497c2b599cbe66f8550428fb/src/amxjit/compiler_impl.cpp#L123-L127

By the way, there's a previous ExecContHelper that gets executed seemingly fine, the 2nd one is the one that crashes.
It looks like some code tried to jump to an invalid AMX code address, i.e. address that does not directly match any native/JIT instruction recorded in the instr_table.