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 on bs_match #6613

Closed
RobinMorisset opened this issue Jan 2, 2023 · 0 comments · Fixed by #6623
Closed

[erlc] internal consistency check failed on bs_match #6613

RobinMorisset opened this issue Jan 2, 2023 · 0 comments · Fixed by #6623
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM

Comments

@RobinMorisset
Copy link
Contributor

On master,

f(<<_>>) ->
    ok;
f(X) ->
    try
        try X of
            #{(not ok) := _} ->
                ok;
            <<Z, Z>> ->
                ok
        after
            ok
        end
    catch
        _ ->
            ok
    end,
    X.

crashes erlc with:

final_bs_match:1: function f/1+20:
  Internal consistency check failed - please report this bug.
  Instruction: {bs_match,{f,0},
                         {y,1},
                         {commands,[{integer,2,{literal,[]},8,1,{x,2}}]}}
  Error:       throws_exception:
@RobinMorisset RobinMorisset added the bug Issue is reported as a bug label Jan 2, 2023
@rickard-green rickard-green added the team:VM Assigned to OTP team VM label Jan 2, 2023
jhogberg added a commit that referenced this issue Jan 3, 2023
…_match-sequences/GH-6613

beam_ssa_codegen: Don't break bs_match sequences by mixing registers
bjorng added a commit to bjorng/otp that referenced this issue Jan 30, 2023
josevalim pushed a commit to josevalim/otp that referenced this issue Jan 30, 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