aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/bs_construct_SUITE.erl
AgeCommit message (Collapse)Author
2017-08-23Merge branch 'john/erts/fix-binary-append-syslimit/OTP-14524' into maint-20Erlang/OTP
* john/erts/fix-binary-append-syslimit/OTP-14524: Check for overflow when appending binaries, and error out with system_limit # Conflicts: # erts/emulator/test/bs_construct_SUITE.erl
2017-08-01Check for overflow when appending binaries, and error out with system_limitJohn Högberg
This fixes the following bug: A = <<0:((1 bsl 32)-8)>>, B = <<2, 3>>. B =:= <<A/binary,1,B/binary>>. %% Evaluated to true...
2017-06-14Update copyright yearHans Nilsson
2017-06-03Lengthen too short timetrapsBjörn Gustavsson
c062dfc485a added timetraps to test suites that had no timetraps. Some of added timetraps are only 5 or 10 seconds, which is can be too short time on some slow computers. Change those times to one or two minutes.
2017-05-24bs_construct_SUITE: Correct calculation of free memoryBjörn Gustavsson
free_mem/0 returned the number of free Kb, but the caller assumed that it was in Mb. Also add another clause to further scale down the size of the binaries created.
2016-06-14Merge branch 'lukas/erts/testfixes-19'Lukas Larsson
* lukas/erts/testfixes-19: erts: Increase bif and nif call_time trace test erts: Fix distribution_SUITE:bulk_send_bigbig on windows erts: Ensure bs_add_overflow test has enough memory kernel: Better explain controlling_process' tcp behaviour kernel: Fix t_recv_delim on bsd os_mon: Make sure to start/stop os_mon in tests correctly ssl: Fix use_interface dist_SSL test erl_interface: Fix signed int overflow tc bug erts: fix atom_roundtrip_r15b tc erts: Require more memory for debug tests
2016-06-14erts: Ensure bs_add_overflow test has enough memoryLukas Larsson
2016-05-16erts: Fix free_mem calculation in bs_construct testsBjörn-Egil Dahlberg
* Previous free_mem calculation did not work on all platforms * Increase test timeout for bs_construct_SUITE:huge_binary/1
2016-03-15update copyright-yearHenrik Nord
2016-03-14Tweak bs_construct_SUITEBjörn-Egil Dahlberg
2016-03-11Remove ?line macrosBjörn-Egil Dahlberg
2016-03-11Eliminate use of doc and suite clausesBjörn-Egil Dahlberg
Those clause are obsolete and never used by common_test.
2016-03-11Eliminate use of ?config() macroBjörn-Egil Dahlberg
2016-03-11Eliminate use of test_server:fail/0,1Björn-Egil Dahlberg
2016-03-11Modernize use of timetrapsBjörn-Egil Dahlberg
2016-02-17Eliminate use of test_server.hrl and test_server_line.hrlBjörn Gustavsson
As a first step to removing the test_server application as as its own separate application, change the inclusion of test_server.hrl to an inclusion of ct.hrl and remove the inclusion of test_server_line.hrl.
2015-12-02hipe: Fix signed compares of unsigned sizesMagnus Lång
Also, some of the branches were testing sizes in bits against a constant ?MAX_BINSIZE, which was in bytes. The signed comparisons masked this mistake. These branches have been removed since all sizes in bits that fit in a machine word are valid binary sizes. Finally, a test that reproduces the issue was added to bs_construct, along with a test for one of the cases (bs_init<0>(...)) when the test against ?MAX_BINSIZE must be changed to unsigned rather than removed.
2015-12-02beam: Fix overflow bug in i_bs_add_jIdMagnus Lång
The test whether the result would fit in a smallnum could overflow into a negative number that would fit a smallnum. A test that reproduces the issue was added to bs_construct_SUITE.
2015-11-27Add missing corner-case to bs_construct_SUITEMagnus Lång
huge_binary/1 did not consider that the Shift variable is not a constant, and misses the case of a literal size.
2015-06-18Change license text to APLv2Bruce Yinhe
2013-06-14Fix binary construction on floating point middle-endian machinesJohannes Weißl
This complements 933e701 (OTP-10209). Without this patch the test cases "in_guard/1" and "coerce_to_float/1" in bs_construct_SUITE fail. The added lines in bs_construct_SUITE cover all branches that were not covered before (small and big numbers if BIT_OFFSET(erts_bin_offset) != 0).
2012-12-05Merge branch 'sverk/bs_construct_SUITE-outofmem'Sverker Eriksson
* sverk/bs_construct_SUITE-outofmem: erts: Limit memory usage of bs_construct_SUITE:huge_binary
2012-11-28erts: Limit memory usage of bs_construct_SUITE:huge_binarySverker Eriksson
depending on the amount of free memory on the host
2012-11-05Fix binary append exceptionsBjörn Gustavsson
Code such as the following should cause an exception: Bin = <<0:1>>, <<Bin/binary,...>> (Because the "binary" type implies that the binary must have a size in bits that is a multiple of 8.) Depending on the binary, either no exception was thrown or the wrong exception was thrown (because c_p->freason was not set). Noticed-by: Adam Rutkowski
2012-08-31Update copyright yearsBjörn-Egil Dahlberg
2012-05-10Remove workarounds for hybrid and shared heaps in test suitesBjörn Gustavsson
2011-08-03Fix binary construction with huge literal sizesBjörn Gustavsson
Constructing binaries using the bit syntax with literals sizes that would not fit in an Uint will either cause an emulator crash or the loading to be aborted. Use the new TAG_o tag introduced in the previous commit to make sure that the attempt to create huge binary literals will generate a system_limit exception at run-time.
2011-08-03Fix construction of <<0:((1 bsl 32)-1)>>Björn Gustavsson
Attempting to construct <<0:((1 bsl 32)-1)>>, the largest bitstring allowed in a 32 bit emulator, would cause an emulator crash because of integer overflow. Fix the problem by using an Uint64 to avoid integer overflow. Do not attempt to handle construction of <<0:((1 bsl 64)-1>> in a 64-bit emulator, because that will certainly cause the emulator to terminate anyway because of insufficient memory.
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-02-17Rename Suite Callback to Common Test HookLukas Larsson
2011-02-17Fix formatting for emulatorLukas Larsson
2011-02-17Add init_per_suite and end_per_suiteLukas Larsson
2011-02-17Add ts_install_scb to suite/0Lukas Larsson
2011-02-17Update emulator tests to conform with common_test standardLukas Larsson
2010-12-21Fix type-checking of variable used in zero-width bit syntax constructionBjörn Gustavsson
<<A:0>> will always produce an empty binary, regardless of the type of A. The bug is in the run-time system. Fix it so that a non-numeric value for A will cause a badarg exception. Reported-by: Zvi
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP