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 error in pass beam_ssa_pre_codegen, sub pass reserve_regs #6660

Closed
RobinMorisset opened this issue Jan 12, 2023 · 0 comments · Fixed by #6663
Closed

[erlc] internal error in pass beam_ssa_pre_codegen, sub pass reserve_regs #6660

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

Comments

@RobinMorisset
Copy link
Contributor

On master,

f() ->
    fun(X) ->
        try X of
            <<Y/bytes>> ->
                Y
        after
            ok
        end
    end.

crashes erlc with the message:

Sub pass reserve_regs
Function: '-f/0-fun-0-'/1
minimized/pre_codegen2.erl: internal error in pass beam_ssa_pre_codegen:
exception error: no function clause matching beam_ssa_codegen:classify_heap_need(bs_extract) 
  in function  beam_ssa_pre_codegen:res_place_gc_instrs/2 (beam_ssa_pre_codegen.erl, line 2711)
  in call from beam_ssa_pre_codegen:reserve_xregs/4 (beam_ssa_pre_codegen.erl, line 2683)
  in call from beam_ssa_pre_codegen:reserve_regs/1 (beam_ssa_pre_codegen.erl, line 2559)
  in call from compile:run_sub_passes_1/3 (compile.erl, line 422)
  in call from beam_ssa_pre_codegen:function/2 (beam_ssa_pre_codegen.erl, line 160)
  in call from beam_ssa_pre_codegen:functions/2 (beam_ssa_pre_codegen.erl, line 89)
  in call from beam_ssa_pre_codegen:functions/2 (beam_ssa_pre_codegen.erl, line 89)

This also reproduces with #6651.

@RobinMorisset RobinMorisset added the bug Issue is reported as a bug label Jan 12, 2023
@bjorng bjorng added the team:VM Assigned to OTP team VM label Jan 12, 2023
@bjorng bjorng self-assigned this Jan 12, 2023
bjorng added a commit to bjorng/otp that referenced this issue Jan 13, 2023
bjorng added a commit that referenced this issue Jan 16, 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.

2 participants