Age | Commit message (Collapse) | Author |
|
Correct behaviour of copy/2 witn 0 copies.
|
|
Even more tests added to cover more error cases, some tests
made easier on systems with small memories and timeouts made longer
due to timetraps on solaris daily builds.
|
|
Add testcases and clean up to get better code coverage.
|
|
Add the gc_bif's to the VM.
Add infrastructure for gc_bif's (guard bifs that can gc) with two and.
three arguments in VM (loader and VM).
Add compiler support for gc_bif with three arguments.
Add compiler (and interpreter) support for new guard BIFs.
Add testcases for new guard BIFs in compiler and emulator.
|
|
Add testcases for encode/decode_unsigned/1,2.
|
|
Add testcases for referenced_byte_size/1.
Add failure tests for referenced_byte_size.
|
|
Add testcases for binary:list_to_bin/1 and binary:copy/1,2.
Add reference implementation of list_to_bin/1.
|
|
Add testcases for bin_to_list.
Teach binref.erl bin_to_list.
|
|
Add allcoator parameter to erts_get_aligned_binary_bytes_extra.
Add testcases for the functions above.
Add reference implementation for the functions above.
|
|
Change name of the 'scope' option for binary:match/matches.
Add split and replace to binary.erl.
Cleanup comments etc in binary.erl and atom.names
Add testcases for part, split, replace and scopes.
|
|
|
|
Set loop factors to 10.
Teach erts_debug:set_internal_state to limit loop factor for binary.
Add random tests for matches and match with multiple searchstrings.
|
|
Fix heap-hole when trapping in binary.c
Fix boyer more segfaulting when searchstring is longer than haystack
|
|
Add Boyer More implementation of binary:matches.
Cleanup and removed unused code.
|
|
Add testcase embryos and reference implementation.
Change name of compile function according to EEP31.
|
|
|
|
erts_poll_info_kp() [defined in erts/emulator/sys/common/erl_poll.c
via some name-mangling trickery] contains a code path that can end
up in an infinite loop, causing a livelock. There is a block of code
inside #if ERTS_POLL_USE_UPDATE_REQUESTS_QUEUE that is supposed to
iterate over a linked list of ErtsPollSetUpdateRequestsBlocks and
update two variables based on the sizes of these blocks. The bug is
that the loop forgets to advance the list pointer to the next element,
so if the loop is entered at all (the initial list pointer is non-NULL),
the thread falls into an infinite loop.
This patch, against R13B03 but applies fine to today's git, fixes the
bug by adding a statement to advance the list pointer in the loop.
All other loops over this list appear to be correct.
Thanks to Chetan Ahuja for the original report of a livelock problem
in erts_poll_info_kp().
|
|
* bg/opt-receive:
Test that gen_server:call/2,3 are fast even with a huge message queue
erts: Add tests for the receive optimization
Update primary bootstrap
erts: Implement recv_mark/1 and recv_set/1 for real
compiler tests: Cover the error handling code in beam_receive
compiler test: Test optimization of receive statements
Optimize selective receives in the presence of a large message queue
Introduce the new recv_mark/1 and recv_mark/1 instructions
Compile tests that communicate with R12 nodes with the r12 option
Move p_run/2 to test_lib
gen: Inline wait_resp_mon/2 to help the compiler optimize
OTP-8623 bg/opt-receive
reveive statements that can only read out a newly created reference are now
specially optimized so that it will execute in constant time regardless of
the number of messages in the receive queue for the process. That
optimization will benefit calls to gen_server:call(). (See gen:do_call/4
for an example of a receive statement that will be optimized.)
|
|
|
|
The recv_mark/1 instruction will both save the current
position in the message queue and a mark (the address of the
loop_rec/2 instruction just following the recv_set/1
instruction). The recv_mark/1 instruction will only
use the saved position if the mark is correct.
The reason for saving and verifying the mark is that
the compiler does not need to guarantee that no other
receive instruction can be executed in between the
recv_mark/1 and recv_set/1 instructions (the mark will
be cleared by the remove_message/0 instruction when a message
is removed from the message queue). That means that arbitrary
function calls in between those instruction can be allowed.
|
|
Make the recv_mark/1 and recv_mark/1 instructions known to the
compiler and run-time system. For the moment, make the loader ignore
any occurrences of those instructions in BEAM files.
Also update hipe_beam_to_icode to ignore those instructions.
|
|
R12 nodes cannot load code that use the optimized receive that
we are about to implement.
|
|
|
|
The erlang:open_port spawn and spawn_executable directives can include
an {env, Env} directive to set up environment variables for the
spawned process. A bug in ert/emulator/sys/unix/sys.c prevented
applications from using {env, Env} to set an environment variable
whose value ended with a '=' (equal sign) character; the code mistook
the trailing equal sign as an indication that an environment variable
was to be cleared from the environment of the spawned process.
For example, passing an {env, Env} of
{env, [{"foo", "bar="}]}
would result in the code in sys.c seeing a string of the form
"foo=bar="
The code would see the final '=' character and assume the directive
wanted to clear a variable named "foo=bar" from the environment of the
spawned process, rather than seeing it as a directive to set the
environment variable "foo" to the value "bar=".
Fix this problem and add a new regression test for it to the port test
suite.
|
|
* bg/remove-stray-ose-support:
configure: Remove stray OSE/Delta support
Makefiles: Remove stray OSE/Delta support
kernel tests: Remove stray OSE/Delta support
system tests: Remove stray OSE/Delta support
erl_interface tests: Remove stray OSE/Delta support
epmd: Remove stray OSE/Delta support
epmd: #ifdef out start_epmd() for other platforms than VxWorks
emulator tests: Remove stray OSE/Delta support
emulator: Remove stray OSE/Delta support
emulator: Eliminate #ifdef for sys_tty_reset()
test_server: Remove stray support for OSE/Delta
OTP-8585 bg/remove-stray-ose-support
|
|
|
|
|
|
|
|
In the erts/emulator/beam sources
#ifdef SOME_OPERATING_SYSTEM
should be avoided. Instead, call a function implemented in
sys/OPERATING_SYSTEM/sys.c.
|
|
Fix memory management bug causing crash of non-SMP emulator with async
threads enabled. The bug did first appear in R13B03.
|
|
New NIF API function enif_make_new_binary
|
|
The following code never terminates:
fail() ->
Str = "http:/www.flickr.com/slideShow/index.gne?group_id=&user_id=69845378@N0",
EMail_regex = "[a-z0-9!#$%&'*+/=?^_`{|}~-]+"
++ "(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*"
++ "@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+"
++ "(?:[a-zA-Z]{2}|com|org|net|gov|mil"
++ "|biz|info|mobi|name|aero|jobs|museum)",
io:format("about to run...~n"),
Ret = re:run(Str, EMail_regex),
io:format("Ret is ~p~n", [Ret]).
Fix it by having pcre_exec remember match_call_count between restarts.
Reported-by: Gordon Guthrie
Acked-by: Patrik Nyblom
|
|
The default stack size on MacOS X for the SMP emulator is too small
to support all uses of pcre. For example, the following expression
N = 819, re:compile([lists:duplicate(N, $(), lists:duplicate(N, $))]).
will cause a stack overflow. By bisection of different values
for the +sss option, I found that 166 is the smallest value that
avoids the crash. Round that up to 256 to give a nice, round power
of 2 and a resonable safety margin. Use that value as a default stack
size on MacOS X only.
|
|
Patch from:
http://vcs.pcre.org/viewvc/code/trunk/pcre_compile.c?r1=504&r2=505&view=patch
Test case:
N = 819, re:compile([lists:duplicate(N, $(), lists:duplicate(N, $))]).
Compiling large regular expressions could overflow the workspace
buffer. Modify the test to check for a value smaller than the buffer
size.
|
|
* bg/fconv:
erts: Fix loading of modules with invalid floating point arithmetic
|
|
The value for "OldHeap unused" in the output of
erlang:system_info(procs) and in crash dumps, was incorrectly
calculated as the size of the entire old heap.
|
|
The following program is supposed to cause an exception
at run-time:
foo() ->
Sum1 = Sum2 = N = 2,
pSum - (Sum1*(Sum2/N)).
but the loader fails to load because it contains the
following instruction:
fconv {atom,pSum} {fr,2}
Fix the loader so that it can handle fconv instructions
where the first operand is a non-numeric literal.
Reported-by: Torbjörn Törnkvist
|
|
* se/decode_packet:
Fix erlang:decode_packet(httph_bin,..) to not return faulty header strings
OTP-8548 se/decode_packet
erlang:decode_packet(httph_bin,..) could return corrupt header strings or
even crash the VM. This has been fixed. It only happened on 32-bit VM if
the header name was unknown and between 16 and 20 characters long. Sockets
with simular packet option did not suffer from this bug.
|
|
Unrecognized Http header names was sometimes returned as corrupt
sub-binaries pointing to a stack allocated buffer. This only happened
on 32-bit VM if the header name was between 16 and 20 characters
long. It could in some cases lead to segmentation fault.
The solution was to avoid creating sub-binary if the returned string
was not part of the original binary.
|
|
* bg/compiler-remove-r11-support:
compiler: Don't support the no_binaries option
erts: Don't support the put_string/3 instruction
compiler: Don't support the no_constant_pool option
compiler: Don't support the r11 option
test_server: Don't support communication with R11 nodes
binary_SUITE: Don't test bit-level binary roundtrips with R11 nodes
erts: Test compatibility of funs with R12 instead of R11
OTP-8531 bg/compiler-remove-r11-support
|
|
Since R14 does not need to load code that can also be loaded
in an R11 run-time system, support for the put_string/3
instruction can be removed.
|
|
|
|
|
|
* pan/otp_8332_halfword:
Teach testcase in driver_suite the new prototype for driver_async
wx: Correct usage of driver callbacks from wx thread
Adopt the new (R13B04) Nif functionality to the halfword codebase
Support monitoring and demonitoring from driver threads
Fix further test-suite problems
Correct the VM to work for more test suites
Teach {wordsize,internal|external} to system_info/1
Make tracing and distribution work
Turn on instruction packing in the loader and virtual machine
Add the BeamInstr data type for loaded BEAM code
Fix the BEAM dissambler for the half-word emulator
Store pointers to heap data in 32-bit words
Add a custom mmap wrapper to force heaps into the lower address range
Fit all heap data into the 32-bit address range
|
|
The testcase core dunmped. Also made sure the key could actually store
long integers in driver_async (which is more of a cosmetic change).
|
|
Change erl_int_sizes_config to include HALFWORD_HEAP_EMULATOR,
which make it possible for the NIFs to figure out the term size.
|
|
The driver in the wx application does monitoring (and
demonitoring) from non-scheduler threads. In the non-half-word
emulators, data will be modified without the protection of a
lock (which is potentially bad), but the half-word emulator will
crash in that situation.
While at it, also correct an old bug which make assertions
fail in the Kernel test suite.
|
|
Fix safe_mul in the loader, which caused failures in the bit
syntax test cases.
Fix yet another Uint in erl_alloc.h (ERTS_CACHE_LINE_SIZE) causing
segmentation fault when we have many schedulers (why only in that
situation?).
Clean up erl_mseg (remove old code for the Linux 32-bit mmap flag).
While at it, also remove compilation warnings.
|
|
The following test suites now work:
send_term_SUITE
trace_nif_SUITE
binary_SUITE
match_spec_SUITE
node_container_SUITE
beam_literals_SUITE
Also add a testcases for system_info({wordsize,internal|external}).
|
|
Some test suites need to differentiate between 32-bit terms
and 32-bit pointers.
While at it, remove some more warnings in process.c for SMP and debug.
|