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

bad_typed_register failure in beam_validator #7354

Closed
bjorng opened this issue Jun 3, 2023 · 0 comments
Closed

bad_typed_register failure in beam_validator #7354

bjorng opened this issue Jun 3, 2023 · 0 comments
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM

Comments

@bjorng
Copy link
Contributor

bjorng commented Jun 3, 2023

Describe the bug
Compilation fails:

Internal consistency check failed - please report this bug.
  Instruction: {test,is_eq_exact,
                     {f,4},
                     [{tr,{y,0},{t_integer,any}},{integer,0}]}
  Error:       {bad_typed_register,{t_bitstring,256,true},{t_integer,any}}:

To Reproduce
Compile the following function:

f(_V0) ->
    case
        trunc(
            try
                trunc(<<>> = _V0)
            catch
                _ ->
                    0.0
            end
        )
    of
        _V0 -> ok;
        _ -> 42
    end.

Expected behavior
Successful compilation.

Affected versions
OTP 25, OTP 26, master

Additional context
Originally posted in #6599 and #7342. This bug is related to #7147.

@bjorng bjorng added team:VM Assigned to OTP team VM bug Issue is reported as a bug labels Jun 3, 2023
@bjorng bjorng self-assigned this Jun 3, 2023
bjorng added a commit that referenced this issue Jun 7, 2023
@bjorng bjorng closed this as completed in 23747cd Jun 7, 2023
bjorng pushed a commit that referenced this issue Jun 29, 2023
…int-26

* bjorn/compiler/fix-normalize/GH-7354/OTP-18625:
  Fix bad_typed_register failure
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

No branches or pull requests

1 participant