diff options
-rw-r--r-- | lib/compiler/src/beam_ssa_opt.erl | 6 |
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; |