diff options
author | John Högberg <[email protected]> | 2019-07-11 09:28:53 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2019-07-11 09:28:53 +0200 |
commit | d2c096de3c677c20d4a149bec6a9346aea9ccf4d (patch) | |
tree | d1071459a3ba9c47436820f47e821db4ced04377 /lib/compiler/src | |
parent | 4e9792256a754ff10f6a214f582fbb58e081deb2 (diff) | |
parent | 9ca0e82455297040069b8274649e7ddd28a5d65b (diff) | |
download | otp-d2c096de3c677c20d4a149bec6a9346aea9ccf4d.tar.gz otp-d2c096de3c677c20d4a149bec6a9346aea9ccf4d.tar.bz2 otp-d2c096de3c677c20d4a149bec6a9346aea9ccf4d.zip |
Merge branch 'john/compiler/fix-bad-try_catch-recv-fix/OTP-15953/ERL-999' into maint
* john/compiler/fix-bad-try_catch-recv-fix/OTP-15953/ERL-999:
compiler: Fix compiler crash introduced by OTP-15952
Diffstat (limited to 'lib/compiler/src')
-rw-r--r-- | lib/compiler/src/beam_ssa_pre_codegen.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_ssa_pre_codegen.erl b/lib/compiler/src/beam_ssa_pre_codegen.erl index a2e687930b..7ef604d444 100644 --- a/lib/compiler/src/beam_ssa_pre_codegen.erl +++ b/lib/compiler/src/beam_ssa_pre_codegen.erl @@ -1472,10 +1472,14 @@ find_loop_exit([L1,L2|_Ls], Blocks) -> find_loop_exit_1(Path1, cerl_sets:from_list(Path2)); find_loop_exit(_, _) -> none. +find_loop_exit_1([?BADARG_BLOCK | T], OtherPath) -> + %% ?BADARG_BLOCK is a marker and not an actual block, so we can't consider + %% it to be a common block even if both paths cross it. + find_loop_exit_1(T, OtherPath); find_loop_exit_1([H|T], OtherPath) -> case cerl_sets:is_element(H, OtherPath) of true -> H; - false -> find_loop_exit_1(T, OtherPath) + false -> find_loop_exit_1(T, OtherPath) end; find_loop_exit_1([], _) -> none. |