diff options
author | Björn Gustavsson <[email protected]> | 2011-06-08 07:29:18 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-08-03 11:24:52 +0200 |
commit | 903be1a669f9a32858e08f631fabffc00861e739 (patch) | |
tree | dfe2e5003b9be52ae5ae53be8770520d5a209cf1 /erts/emulator/beam/ops.tab | |
parent | 2d30edeb73119bbbcf3622e5c163552c10df0861 (diff) | |
download | otp-903be1a669f9a32858e08f631fabffc00861e739.tar.gz otp-903be1a669f9a32858e08f631fabffc00861e739.tar.bz2 otp-903be1a669f9a32858e08f631fabffc00861e739.zip |
Fix binary construction with huge literal sizes
Constructing binaries using the bit syntax with literals sizes
that would not fit in an Uint will either cause an emulator crash
or the loading to be aborted.
Use the new TAG_o tag introduced in the previous commit to make sure
that the attempt to create huge binary literals will generate a
system_limit exception at run-time.
Diffstat (limited to 'erts/emulator/beam/ops.tab')
-rw-r--r-- | erts/emulator/beam/ops.tab | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/ops.tab b/erts/emulator/beam/ops.tab index 8a5763b4bb..304ce22ef2 100644 --- a/erts/emulator/beam/ops.tab +++ b/erts/emulator/beam/ops.tab @@ -1236,7 +1236,7 @@ i_bs_init_heap I I I d i_bs_init_heap_bin_heap I I I d -bs_init_bits Fail Sz Words Regs Flags Dst | binary_too_big_bits(Sz) => system_limit Fail +bs_init_bits Fail Sz=o Words Regs Flags Dst => system_limit Fail bs_init_bits Fail Sz=u Words=u==0 Regs Flags Dst => i_bs_init_bits Sz Regs Dst bs_init_bits Fail Sz=u Words Regs Flags Dst => i_bs_init_bits_heap Sz Words Regs Dst |