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

[erlc] internal consistency check failed: ambiguous_catch_try_state #7477

Closed
RobinMorisset opened this issue Jul 5, 2023 · 1 comment · Fixed by #7532
Closed

[erlc] internal consistency check failed: ambiguous_catch_try_state #7477

RobinMorisset opened this issue Jul 5, 2023 · 1 comment · Fixed by #7532
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 erlc on the following:

f() ->
    try
        erlang:monotonic_time()
    after
        catch (<<>> = size(catch (([_ | _V4] = _V4) = ok)))
    end.

results in the following error:

test150083:1: function f/0+30:
  Internal consistency check failed - please report this bug.
  Instruction: {gc_bif,size,{f,0},1,[{x,0}],{x,0}}
  Error:       ambiguous_catch_try_state:

Affected versions

I've not checked other versions, but this suggests that this is not a new bug

Additional context
I suspect that this may be related to #7342, but it has never caused that error message, so I am reporting it in case it is in fact different.

@RobinMorisset RobinMorisset added the bug Issue is reported as a bug label Jul 5, 2023
@IngelaAndin IngelaAndin added the team:VM Assigned to OTP team VM label Jul 5, 2023
@jhogberg jhogberg added the stalled waiting for input by the Erlang/OTP team label Jul 6, 2023
@bjorng bjorng self-assigned this Jul 31, 2023
@bjorng bjorng removed the stalled waiting for input by the Erlang/OTP team label Aug 3, 2023
@bjorng bjorng linked a pull request Aug 3, 2023 that will close this issue
@bjorng
Copy link
Contributor

bjorng commented Aug 3, 2023

It is in fact different from #7342; it is an unsafe optimization done by beam_jump.

bjorng added a commit that referenced this issue Aug 4, 2023
…7477/OTP-18701

beam_jump: Eliminate unsafe sharing of blocks
@bjorng bjorng closed this as completed in e0065b1 Aug 4, 2023
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.

4 participants