aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-05-27 13:22:24 +0200
committerBjörn Gustavsson <[email protected]>2019-05-27 13:22:24 +0200
commit4b972d6934a2362e228e1458b0a6b2ca5d6aa6c8 (patch)
tree7e9d15e3a4b2a0780e0d502ab4db939bba992a61 /lib/compiler/src
parentf1a366fe111bf39478e93062e69626364e91e3a1 (diff)
parentf7fe4573880ce94d794af266d0f37459b7a86709 (diff)
downloadotp-4b972d6934a2362e228e1458b0a6b2ca5d6aa6c8.tar.gz
otp-4b972d6934a2362e228e1458b0a6b2ca5d6aa6c8.tar.bz2
otp-4b972d6934a2362e228e1458b0a6b2ca5d6aa6c8.zip
Merge branch 'bjorn/compiler/fix-beam_except/ERL-954/OTP-15839' into maint
* bjorn/compiler/fix-beam_except/ERL-954/OTP-15839: Fix compiler crash in beam_except
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/beam_except.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/compiler/src/beam_except.erl b/lib/compiler/src/beam_except.erl
index 28c89782c9..2305502800 100644
--- a/lib/compiler/src/beam_except.erl
+++ b/lib/compiler/src/beam_except.erl
@@ -140,8 +140,11 @@ fix_block_1([{set,[],[],{alloc,Live,{F1,F2,Needed0,F3}}}|Is], Words) ->
[{set,[],[],{alloc,Live,{F1,F2,Needed,F3}}}|Is]
end;
fix_block_1([I|Is], Words) ->
- [I|fix_block_1(Is, Words)].
-
+ [I|fix_block_1(Is, Words)];
+fix_block_1([], _Words) ->
+ %% Rare. The heap allocation was probably done by a binary
+ %% construction instruction.
+ [].
dig_out_fc(Arity, Is0) ->
Regs0 = maps:from_list([{{x,X},{arg,X}} || X <- seq(0, Arity-1)]),