aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_binary.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-02-14 19:25:16 +0100
committerSverker Eriksson <[email protected]>2017-02-20 20:06:35 +0100
commitcb2a5bd9e86ba49d9bbc83b3d8383fbe0cc90715 (patch)
tree12379e03effc12b9a18702aa86028c080c81bb2e /erts/emulator/beam/erl_binary.h
parent82d3513f95198b0a4295ba866a78ae6c137a34d5 (diff)
downloadotp-cb2a5bd9e86ba49d9bbc83b3d8383fbe0cc90715.tar.gz
otp-cb2a5bd9e86ba49d9bbc83b3d8383fbe0cc90715.tar.bz2
otp-cb2a5bd9e86ba49d9bbc83b3d8383fbe0cc90715.zip
erts: Avoid revival of dying resource by dec_term
Diffstat (limited to 'erts/emulator/beam/erl_binary.h')
-rw-r--r--erts/emulator/beam/erl_binary.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_binary.h b/erts/emulator/beam/erl_binary.h
index db259be2a7..946d3cfe03 100644
--- a/erts/emulator/beam/erl_binary.h
+++ b/erts/emulator/beam/erl_binary.h
@@ -79,11 +79,9 @@ struct magic_binary {
} u;
};
-#ifdef ARCH_32
-#define ERTS_MAGIC_BIN_BYTES_TO_ALIGN 4
-#else
-#define ERTS_MAGIC_BIN_BYTES_TO_ALIGN 0
-#endif
+#define ERTS_MAGIC_BIN_BYTES_TO_ALIGN \
+ (offsetof(ErtsMagicBinary,u.aligned.data) - \
+ offsetof(ErtsMagicBinary,u.unaligned.data))
typedef union {
Binary binary;