aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_bits.h
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-08-05 10:43:05 +0200
committerBjörn Gustavsson <[email protected]>2011-08-05 10:43:05 +0200
commit44a70b59a1903265a33ccefa3846e10b3f86eb5d (patch)
treedfe2e5003b9be52ae5ae53be8770520d5a209cf1 /erts/emulator/beam/erl_bits.h
parent07936436b8a8b18b80451a09e040283ebecbd43b (diff)
parent903be1a669f9a32858e08f631fabffc00861e739 (diff)
downloadotp-44a70b59a1903265a33ccefa3846e10b3f86eb5d.tar.gz
otp-44a70b59a1903265a33ccefa3846e10b3f86eb5d.tar.bz2
otp-44a70b59a1903265a33ccefa3846e10b3f86eb5d.zip
Merge branch 'bjorn/erts/loader-related-bs-bugs/OTP-9284' into dev
* bjorn/erts/loader-related-bs-bugs/OTP-9284: Fix binary construction with huge literal sizes beam_load.c: Add overflow check of tag values beam_makeops: Add some sanity checks Fix construction of <<0:((1 bsl 32)-1)>>
Diffstat (limited to 'erts/emulator/beam/erl_bits.h')
-rw-r--r--erts/emulator/beam/erl_bits.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_bits.h b/erts/emulator/beam/erl_bits.h
index 0f67733fa4..3309ea706b 100644
--- a/erts/emulator/beam/erl_bits.h
+++ b/erts/emulator/beam/erl_bits.h
@@ -150,7 +150,7 @@ void erts_bits_destroy_state(ERL_BITS_PROTO_0);
* NBYTES(x) returns the number of bytes needed to store x bits.
*/
-#define NBYTES(x) (((x) + 7) >> 3)
+#define NBYTES(x) (((Uint64)(x) + (Uint64) 7) >> 3)
#define BYTE_OFFSET(ofs) ((Uint) (ofs) >> 3)
#define BIT_OFFSET(ofs) ((ofs) & 7)