aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-10-07 11:20:59 +0200
committerBjörn Gustavsson <[email protected]>2010-10-07 11:20:59 +0200
commit0f851e8dbfcc33ca31603409e21742455d37e3be (patch)
tree4ee7f07614610ced6c3bdf2339269e7fed4229a2 /lib/compiler/src
parent9cd4afbb49d3a1802b2dcb4e15a8797286045644 (diff)
parentd0c538e3dd5072ad0227553f5dd7dcdc2e6c3288 (diff)
downloadotp-0f851e8dbfcc33ca31603409e21742455d37e3be.tar.gz
otp-0f851e8dbfcc33ca31603409e21742455d37e3be.tar.bz2
otp-0f851e8dbfcc33ca31603409e21742455d37e3be.zip
Merge branch 'bjorn/compiler/fix-zero-segment-bug/OTP-8865' into dev
* bjorn/compiler/fix-zero-segment-bug/OTP-8865: Fix compiler crash when constructing zero-size binary segments
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/v3_codegen.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/compiler/src/v3_codegen.erl b/lib/compiler/src/v3_codegen.erl
index 948937c438..77da6c8d00 100644
--- a/lib/compiler/src/v3_codegen.erl
+++ b/lib/compiler/src/v3_codegen.erl
@@ -1523,7 +1523,9 @@ cg_binary_size_1([], Bits, Acc) ->
[{1,_}|_] ->
{bs_init_bits,cg_binary_bytes_to_bits(Sizes, [])};
[{8,_}|_] ->
- {bs_init2,[E || {8,E} <- Sizes]}
+ {bs_init2,[E || {8,E} <- Sizes]};
+ [] ->
+ {bs_init_bits,[]}
end.
cg_binary_size_2({integer,N}, U, _, Next, Bits, Acc) ->