[jit] "beam/jit/beam_jit_args.hpp:243:ArgRegister() Assertion failed: isRegister()"
RobinMorisset opened this issue · 1 comments
RobinMorisset commented
Describe the bug
Running the following commands:
erlc -W0 minimized/beam_jit_args.erl
cerl -debug -noshell -pa . -s beam_jit_args start -s init stop
on the following erlang file:
-module(beam_jit_args).
-compile([export_all]).
f(X) when ((is_tuple(X)) andalso (not ok)) ->
ok.
start() ->
catch f(0).
results in a crash:
beam/jit/beam_jit_args.hpp:243:ArgRegister() Assertion failed: isRegister()
Aborted (core dumped)
Affected versions
master
Additional context
This is with an otp built in debug mode (somewhat obviously)
There is no visible crash if I don't pass "-debug" to cerl.
The bug reproduces even if I remove the start() function from the file, so it seems to happen very early while the VM is ingesting the .beam file.
bjorng commented
Yes, the assertion fires during native code generation while loading the BEAM file.