Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[jit] "beam/jit/beam_jit_args.hpp:243:ArgRegister() Assertion failed: isRegister()" #6634

Closed
RobinMorisset opened this issue Jan 6, 2023 · 1 comment · Fixed by #6637
Closed
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM

Comments

@RobinMorisset
Copy link
Contributor

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.

@RobinMorisset RobinMorisset added the bug Issue is reported as a bug label Jan 6, 2023
bjorng added a commit to bjorng/otp that referenced this issue Jan 6, 2023
@bjorng bjorng self-assigned this Jan 6, 2023
@bjorng bjorng added the team:VM Assigned to OTP team VM label Jan 6, 2023
@bjorng bjorng linked a pull request Jan 6, 2023 that will close this issue
@bjorng
Copy link
Contributor

bjorng commented Jan 6, 2023

Yes, the assertion fires during native code generation while loading the BEAM file.

bjorng added a commit to bjorng/otp that referenced this issue Jan 6, 2023
@bjorng bjorng closed this as completed in 428dbdd Jan 9, 2023
bjorng added a commit that referenced this issue Jan 9, 2023
* bjorn/double-immediate-eq/GH-6634:
  Fix failed assertion in debug build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants