diff options
author | Sverker Eriksson <[email protected]> | 2015-01-16 21:23:44 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-03-12 17:16:06 +0100 |
commit | 96f6e470284858f1b8644ea949283dad24161dfe (patch) | |
tree | 4b96a95347baa0dea80a10f943aeb6d42f9a017b /erts/emulator/beam/erl_term.h | |
parent | f602e2327c330969165430bbba1a0b997200606d (diff) | |
download | otp-96f6e470284858f1b8644ea949283dad24161dfe.tar.gz otp-96f6e470284858f1b8644ea949283dad24161dfe.tar.bz2 otp-96f6e470284858f1b8644ea949283dad24161dfe.zip |
erts: Fix bug in _make_header macro
Called with a signed int 'sz' argument on 64 bit
would cause sign extension 'sz' was larger than 33554431.
Diffstat (limited to 'erts/emulator/beam/erl_term.h')
-rw-r--r-- | erts/emulator/beam/erl_term.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_term.h b/erts/emulator/beam/erl_term.h index fde90997e3..72946d9ddf 100644 --- a/erts/emulator/beam/erl_term.h +++ b/erts/emulator/beam/erl_term.h @@ -299,7 +299,7 @@ _ET_DECLARE_CHECKED(Uint,atom_val,Eterm) #define atom_val(x) _ET_APPLY(atom_val,(x)) /* header (arityval or thing) access methods */ -#define _make_header(sz,tag) ((Uint)(((sz) << _HEADER_ARITY_OFFS) + (tag))) +#define _make_header(sz,tag) ((Uint)(((Uint)(sz) << _HEADER_ARITY_OFFS) + (tag))) #define is_header(x) (((x) & _TAG_PRIMARY_MASK) == TAG_PRIMARY_HEADER) //#define _unchecked_header_arity(x) ((x) >> _HEADER_ARITY_OFFS) #define _unchecked_header_arity(x) \ |