You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The compiler crashes with the following output:
Sub pass ssa_opt_private_append
beam_ssa_private_append_crash2.erl: internal error in pass beam_ssa_opt:
exception error: no case clause matching {{bif,'not'},[{b_var,1}],self}
in function beam_ssa_private_append:track_value_in_fun/6 (beam_ssa_private_append.erl, line 192)
in call from beam_ssa_private_append:private_append/3 (beam_ssa_private_append.erl, line 71)
in call from compile:run_sub_passes_1/3 (compile.erl, line 424)
in call from beam_ssa_opt:run_phases/3 (beam_ssa_opt.erl, line 75)
in call from beam_ssa_opt:module/2 (beam_ssa_opt.erl, line 71)
in call from compile:'-select_passes/2-anonymous-0-'/3 (compile.erl, line 683)
in call from compile:fold_comp/4 (compile.erl, line 410)
in call from compile:internal_comp/5 (compile.erl, line 394)
To Reproduce
Compile the following module:
-module(beam_ssa_private_append_crash2).
-compile([export_all]).
f(A) ->
<<(case ok of
A ->
not is_alive();
_ ->
<<>>
end)/bitstring>>.
Expected behavior
Compilation should succeed.
Affected versions
The current master branch.
Additional context
Same sub pass as #6847, but the crash is in another function.
The text was updated successfully, but these errors were encountered:
The private-append optimization worked on the assumption that the
`private_append` version of `bs_create_bin` checked that the type of
the first argument was a bitstring. As it doesn't, the compiler
shouldn't do the optimization when it cannot guarantee that the type
is and only is a bitstring.
Fixes: erlang#6851Fixes: erlang#6848
frej
added a commit
to frej/otp
that referenced
this issue
Feb 14, 2023
The private-append optimization worked on the assumption that the
`private_append` version of `bs_create_bin` checked that the type of
the first argument was a bitstring. As it doesn't, the compiler
shouldn't do the optimization when it cannot guarantee that the type
is and only is a bitstring.
Fixeserlang#6851Fixeserlang#6848
Describe the bug
The compiler crashes with the following output:
To Reproduce
Compile the following module:
Expected behavior
Compilation should succeed.
Affected versions
The current
master
branch.Additional context
Same sub pass as #6847, but the crash is in another function.
The text was updated successfully, but these errors were encountered: