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 error: bad_arg_type #7251

Closed
RobinMorisset opened this issue May 17, 2023 · 0 comments · Fixed by #7254
Closed

[erlc] internal consistency error: bad_arg_type #7251

RobinMorisset opened this issue May 17, 2023 · 0 comments · Fixed by #7254
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(<<_V1/utf8>>) ->
    [0 || _ <- bnot (_V1 - 1)].

results in the following error message:

test486855:1: function f/1+14:
  Internal consistency check failed - please report this bug.
  Instruction: {call_only,1,{f,10}}
  Error:       {bad_arg_type,{x,0},
                             {t_integer,{-2228221,1}},
                             {t_integer,{-1114111,'+inf'}}}:

Affected versions

Additional context
Adding a negative number instead of substracting 1 very slightly changes the error message.
Either adding a positive number or substracting a negative one makes the bug disappear.

@RobinMorisset RobinMorisset added the bug Issue is reported as a bug label May 17, 2023
@jhogberg jhogberg self-assigned this May 17, 2023
@jhogberg jhogberg added the team:VM Assigned to OTP team VM label May 17, 2023
jhogberg added a commit that referenced this issue May 22, 2023
…into maint

* john/compiler/fix-bnot-mixed-bounds/GH-7251/OTP-18581:
  beam_bounds: Fix 'bnot' bounds on mixed finite/infinite ranges
rickard-green pushed a commit that referenced this issue Jun 8, 2023
…into maint-26

* john/compiler/fix-bnot-mixed-bounds/GH-7251/OTP-18581:
  beam_bounds: Fix 'bnot' bounds on mixed finite/infinite ranges
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