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: bad_arg_type #7467

Closed
RobinMorisset opened this issue Jul 4, 2023 · 0 comments · Fixed by #7570
Closed

[erlc] internal consistency check failed: bad_arg_type #7467

RobinMorisset opened this issue Jul 4, 2023 · 0 comments · Fixed by #7570
Assignees
Labels
bug Issue is reported as a bug stalled waiting for input by the Erlang/OTP team team:VM Assigned to OTP team VM

Comments

@RobinMorisset
Copy link
Contributor

Describe the bug
Running erlc on the following module:

-module(test342852).
-export([start/0]).

f(_V0) ->
    f(<<_:1/bits>> = _V0).

start() ->
    f(<<>>).

results in the following compiler crash:

test342852:1: function f/1+8:
  Internal consistency check failed - please report this bug.
  Instruction: {call_only,1,{f,2}}
  Error:       {bad_arg_type,{x,0},{t_bs_context,1},{t_bs_matchable,256}}:

Affected versions
master
I could not reproduce it on an old version of OTP 25 that I had on hand, so this bug was probably introduced in the last year.

Additional context
The bug does not reproduce if start is not exported.
The bug does not reproduce if f is exported.

@RobinMorisset RobinMorisset added the bug Issue is reported as a bug label Jul 4, 2023
@jhogberg jhogberg added team:VM Assigned to OTP team VM stalled waiting for input by the Erlang/OTP team labels Jul 4, 2023
@bjorng bjorng self-assigned this Jul 31, 2023
@bjorng bjorng closed this as completed in 064889d Aug 18, 2023
bjorng added a commit that referenced this issue Aug 18, 2023
…aint

* bjorn/compiler/ensure_exactly/GH-7467/OTP-18725:
  Eliminate consistency failure for non-matching binary pattern
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 stalled waiting for input by the Erlang/OTP team team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants