summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Gustavsson <bjorn@erlang.org>2021-10-14 07:54:08 +0200
committerBjörn Gustavsson <bjorn@erlang.org>2021-10-14 09:31:17 +0200
commit36d78533bdd0c820843ed71747104c7049ee42db (patch)
treec9195e49ca7850ca1072ac03b518fe31d19ede15
parentd36a8e05fe3608ba4cba234b072f4590c899fef8 (diff)
downloaderlang-36d78533bdd0c820843ed71747104c7049ee42db.tar.gz
fixup! compiler: Add a new instruction for creating binaries
-rw-r--r--lib/compiler/src/beam_ssa_opt.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/compiler/src/beam_ssa_opt.erl b/lib/compiler/src/beam_ssa_opt.erl
index 123edb868c..91db5c6400 100644
--- a/lib/compiler/src/beam_ssa_opt.erl
+++ b/lib/compiler/src/beam_ssa_opt.erl
@@ -1849,6 +1849,12 @@ opt_create_bin_arg(Type, Unit, Flags, #b_literal{val=Val}, #b_literal{val=Size})
if
EffectiveSize < 64 ->
[<<Val:EffectiveSize>>];
+ EffectiveSize > 1 bsl 24 ->
+ %% The binary construction could fail with a
+ %% system_limit. Don't optimize to ensure that
+ %% the extended error information will be
+ %% accurate.
+ not_possible;
true ->
opt_bs_put_split_int(Val, EffectiveSize)
end;