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 #6593

Closed
RobinMorisset opened this issue Dec 22, 2022 · 1 comment · Fixed by #6594
Closed

[erlc] internal consistency check failed #6593

RobinMorisset opened this issue Dec 22, 2022 · 1 comment · Fixed by #6594
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM
Milestone

Comments

@RobinMorisset
Copy link
Contributor

RobinMorisset commented Dec 22, 2022

On master,

f() ->
    fun Foo(X) ->
        <<0, [0 || _ <- X, (Foo >= ok), _ <- []]>>
    end.

crashes erlc with the following error message:

consistency_bitstring:1: function '-f/0-lc$^0/1-1-'/2+12:
  Internal consistency check failed - please report this bug.
  Instruction: {call_only,3,{f,25}}
  Error:       {bad_arg_type,{x,2},
                             {t_fun,1,{'-f/0-Foo/1-0-',1},{t_bitstring,8}},
                             {t_fun,1,{'-f/0-Foo/1-0-',1},{t_bitstring,16}}}:
@RobinMorisset RobinMorisset added the bug Issue is reported as a bug label Dec 22, 2022
@jhogberg jhogberg self-assigned this Dec 22, 2022
@jhogberg jhogberg added the team:VM Assigned to OTP team VM label Dec 22, 2022
@jhogberg jhogberg added this to the OTP-26.0 milestone Dec 22, 2022
@jhogberg
Copy link
Contributor

Thanks for your report, I've fixed it in #6594

jhogberg added a commit that referenced this issue Dec 23, 2022
* john/compiler/fix-bs_size_unit-literal-binaries/GH-6593:
  beam_ssa_type: Fix size/unit estimation for literal binaries
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