aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_alloc_util.c
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2019-04-24 12:45:36 +0200
committerJohn Högberg <[email protected]>2019-04-24 13:23:27 +0200
commit4fb0813f9004cb75eca065058c4899b0e4183635 (patch)
treef23b83af9c7d8f1d76c2f5bb816a12d6e1eed963 /erts/emulator/beam/erl_alloc_util.c
parent90eb43d0b61b5a51aede0537e394bd02216b6fa0 (diff)
downloadotp-4fb0813f9004cb75eca065058c4899b0e4183635.tar.gz
otp-4fb0813f9004cb75eca065058c4899b0e4183635.tar.bz2
otp-4fb0813f9004cb75eca065058c4899b0e4183635.zip
erts_alloc: Fix incorrect header word packing
Diffstat (limited to 'erts/emulator/beam/erl_alloc_util.c')
-rw-r--r--erts/emulator/beam/erl_alloc_util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_alloc_util.c b/erts/emulator/beam/erl_alloc_util.c
index 8d4464969a..25ac3bc5af 100644
--- a/erts/emulator/beam/erl_alloc_util.c
+++ b/erts/emulator/beam/erl_alloc_util.c
@@ -6567,6 +6567,14 @@ erts_alcu_start(Allctr_t *allctr, AllctrInit_t *init)
__FILE__, __LINE__);
}
+ /* The various fields packed into the header word must not overlap */
+ ERTS_CT_ASSERT(!(MBC_ABLK_OFFSET_MASK & MBC_ABLK_SZ_MASK));
+ ERTS_CT_ASSERT(!(MBC_ABLK_OFFSET_MASK & BLK_FLG_MASK));
+ ERTS_CT_ASSERT(!(MBC_ABLK_SZ_MASK & BLK_FLG_MASK));
+ ERTS_CT_ASSERT(!(MBC_FBLK_SZ_MASK & BLK_FLG_MASK));
+ ERTS_CT_ASSERT(!(SBC_BLK_SZ_MASK & BLK_FLG_MASK));
+ ERTS_CT_ASSERT(!(CRR_SZ_MASK & CRR_FLG_MASK));
+
if (!initialized)
goto error;