aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-12-18 14:45:00 +0100
committerSverker Eriksson <[email protected]>2018-12-18 14:45:00 +0100
commit829166ecdb3d40161d3b53485549fb9064548da8 (patch)
tree3dc98ccf5f74a61914a99a0290c897a3dbec52f9 /erts/emulator/test
parentea262e24e4b9d019cf253aa9a8fbcd907c2d91eb (diff)
parent1e6ab2fdac21c7847b7fda32fed1ea35883a535e (diff)
downloadotp-829166ecdb3d40161d3b53485549fb9064548da8.tar.gz
otp-829166ecdb3d40161d3b53485549fb9064548da8.tar.bz2
otp-829166ecdb3d40161d3b53485549fb9064548da8.zip
Merge branch 'sverker/fix-atomics-get-large-unsigned/PR-2061/OTP-15486' into maint
* sverker/fix-atomics-get-large-unsigned/PR-2061/OTP-15486: erts: Fix possible heap corruption getting atomics
Diffstat (limited to 'erts/emulator/test')
-rw-r--r--erts/emulator/test/atomics_SUITE.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/test/atomics_SUITE.erl b/erts/emulator/test/atomics_SUITE.erl
index 8c42354770..a5407c42ee 100644
--- a/erts/emulator/test/atomics_SUITE.erl
+++ b/erts/emulator/test/atomics_SUITE.erl
@@ -126,6 +126,9 @@ unsigned_limits(Config) when is_list(Config) ->
Min = atomics:add_get(Ref, 1, 1),
Max = atomics:sub_get(Ref, 1, 1),
+ atomics:put(Ref, 1, Max),
+ io:format("Max=~p~n", [atomics:get(Ref, 1)]),
+
{'EXIT',{badarg,_}} = (catch atomics:add(Ref, 1, Max+1)),
IncrMin = -(1 bsl (Bits-1)),
ok = atomics:put(Ref, 1, -IncrMin),