diff options
author | Tomas Abrahamsson <[email protected]> | 2018-12-13 22:36:03 +0100 |
---|---|---|
committer | Tomas Abrahamsson <[email protected]> | 2018-12-13 22:36:03 +0100 |
commit | 1e6ab2fdac21c7847b7fda32fed1ea35883a535e (patch) | |
tree | f6ca6afe4af45f3f8f95070924bceaf79d820e69 /.mailmap | |
parent | 3825199794da28d79b21052a2e69e2335921d55e (diff) | |
download | otp-1e6ab2fdac21c7847b7fda32fed1ea35883a535e.tar.gz otp-1e6ab2fdac21c7847b7fda32fed1ea35883a535e.tar.bz2 otp-1e6ab2fdac21c7847b7fda32fed1ea35883a535e.zip |
erts: Fix possible heap corruption getting atomics
Due to comparison as a signed integer, when getting an unsigned atomic
in the range 2^63-1..2^64-1 (when the most significant bit was set), the
heap could get corrupted when the integer was retrieved: hsz would get
set to zero, but the code proceeded to build a bignum.
Steps to reproduce (at least on x86_64):
$ erl
1> A = atomics:new(1,[{signed,false}]).
2> atomics:put(A,1,18446744073709551615).
3> atomics:get(A,1).
At the last step, the shell would print some garbage and hang.
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions