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

Internal compiler error: {undefined_label, 0} in beam_clean:function_replace/3 #6169

Closed
RobinMorisset opened this issue Jul 25, 2022 · 1 comment · Fixed by #6172
Closed
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM

Comments

@RobinMorisset
Copy link
Contributor

Running erlc on the following code:

-module(undefined_label).

-compile([export_all]).

f([] = V1, V2, V3)  -> 
        {V1 - V3, (V1 = V2) - V3}.

results in a crash:

*** Internal compiler error ***
exception exit: {undefined_label,0}
in function beam_clean:function_replace/3 (beam_clean.erl, line 134)
in call from beam_clean:clean_labels/1 (beam_clean.erl, line 105)
in call from beam_clean:module/2 (beam_clean.erl, line 35)
in call from compile:'-select_passes/2-anonymous-0-'/3 (compile.erl, line 678)
in call from compile:fold_comp/4 (compile.erl, line 405)
in call from compile:internal_comp/5 (compile.erl, line 389)
in call from compile:'-internal_fun/2-anonymous-0-'/2 (compile.erl, line 227)
in call from compile:'-do_compile/2-anonymous-0-'/1 (compile.erl, line 217)

@RobinMorisset RobinMorisset added the bug Issue is reported as a bug label Jul 25, 2022
@bjorng bjorng added the team:VM Assigned to OTP team VM label Jul 26, 2022
@bjorng bjorng self-assigned this Jul 26, 2022
@bjorng bjorng linked a pull request Jul 26, 2022 that will close this issue
@bjorng bjorng linked a pull request Jul 26, 2022 that will close this issue
@bjorng
Copy link
Contributor

bjorng commented Jul 26, 2022

I have fixed the problem in the linked pull request. I will be included in OTP 25.1. (The bug does not seem to exist in OTP 24.)

bjorng added a commit to bjorng/otp that referenced this issue Jul 27, 2022
…maint

* bjorn/compiler/fix-clean/erlangGH-6169/OTP-18183:
  Eliminate compiler crash in beam_clean
@bjorng bjorng closed this as completed in d431f40 Jul 27, 2022
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