aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-03-25 11:30:28 +0100
committerSverker Eriksson <[email protected]>2015-03-25 11:30:28 +0100
commit59ec3041469226ef65894e5774ecac0fea1551cd (patch)
tree87cbf0407e29a43576924a00d7fcbd7b3cc30ce3 /erts/emulator/test
parentaf87b1c3d4897840d8247589a88d3611106ecedc (diff)
downloadotp-59ec3041469226ef65894e5774ecac0fea1551cd.tar.gz
otp-59ec3041469226ef65894e5774ecac0fea1551cd.tar.bz2
otp-59ec3041469226ef65894e5774ecac0fea1551cd.zip
erts: Fix bug in list_to_integer for very large strings
list_to_integer(lists:duplicate(10000000,$0)). crashed due to overflow when calculating nr heap words.
Diffstat (limited to 'erts/emulator/test')
-rw-r--r--erts/emulator/test/num_bif_SUITE.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/erts/emulator/test/num_bif_SUITE.erl b/erts/emulator/test/num_bif_SUITE.erl
index 8cf8377c30..abe5b8eb91 100644
--- a/erts/emulator/test/num_bif_SUITE.erl
+++ b/erts/emulator/test/num_bif_SUITE.erl
@@ -441,7 +441,11 @@ t_string_to_integer(Config) when is_list(Config) ->
{"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111z",16},
{"1z111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111",16},
{"111z11111111",16}]),
-
+
+ %% log2 calculation overflow bug in do_integer_to_list (OTP-12624)
+ %% Would crash with segv
+ 0 = list_to_integer(lists:duplicate(10000000,$0)),
+
ok.
test_sti(Num) ->