Age | Commit message (Collapse) | Author |
|
* maint:
Add a smoke test of erts_debug:df/1
Correct disassembly of the i_get_map_elements instruction
|
|
Run erts_debug:df/1 for all loaded modules. On my reasonably fast,
modern computer this test case runs in approximately 10 seconds.
To avoid spending many minutes running this test case on older
computers, limit the running time to 20 seconds.
While we are at it, remove all ?line macros.
|
|
* egil/remove-halfword/OTP-12883: (21 commits)
erts: Remove halfword etp-commands
erts: Remove halfword MemKind mseg
erts: Remove halfword bases in ETS
erts: Remove halfword CHECK_POINTER_MASK
erts: Remove halfword relative printf
erts: Remove halfword valgrind suppress file
erts: Remove halfword specific tests
erts: Remove halfword specific allocator types
erts: Remove halfword BINARY RELs
erts: Remove halfword is_same bases macro
erts: Reinstate copy_object over-allocation optimization
erts: Remove halfword copy_object_rel
erts: Remove halfword object manipulation
erts: Remove halfword heap relative comparisions
erts: Remove halfword pointer compression
erts: Remove halfword basic relative heap operations
erts: Remove halfword from configure
erts: Remove halfword in lib_src
erts: Remove halfword in erl_nif.h
erts: Remove halfword in erl_driver.h
...
|
|
* sverk/map-merge-trap:
erts: Expand test map_SUITE:t_bif_merge_and_check
|
|
|
|
with merge of randomized maps.
|
|
|
|
* egil/cuddle-tests:
kernel: Remove ?line macros in inet_SUITE:t_gethostbyaddr/1
erts: Tweak statistics_SUITE:scheduler_wall_time/1
|
|
* rc/robustify-module_info/OTP-12820:
erts: Add test for module_info on purged modules
erts: Remove ?line macros from module_info_SUITE
Fix segfault in module_info for deleted modules
|
|
* sverk/map-merge-trap:
erts: Optimize maps:merge
erts: Yield in maps:merge
erts: Refactor arg swapping for maps:merge
erts: Add save/restore for PSTACK
erts: Fix magic binary alignment on 32-bit
erts: Add maps to send_term_SUITE
erts: Fix calculation of reclaimed data during full gc
erts: Fix warning about const pointer to make_boxed and make_list
erts: Fix typo in etp-carrier-blocks
|
|
* rickard/delayed-delete-node/OTP-12802:
Delayed node table GC
|
|
* rickard/timer-improvement/OTP-12650:
Callback timer
Disable accessor timer option
Aux work flag descriptions
Fix test cases
|
|
|
|
|
|
|
|
Add a check to protect from segfault when erlang:get_module_info/1/2 is
called on a deleted module (i.e. with no current code). Also refactor
erts_module_info_0/1 to avoid repeated calls to erts_active_code_ix() and
remove some obsolete comments. Add test for module_info on deleted modules.
|
|
|
|
|
|
|
|
Reported-by: Rory Byrne
|
|
* egil/cuddle-tests:
erts: Remove remaining ?line macros in trace_meta_SUITE
erts: Relax trace_meta_SUITE:on_and_off_test/1
erts: Remove ?line macro in trace_meta_SUITE:on_and_off_test/1
kernel: Remove remaining ?line macros in gen_tcp_misc_SUITE
kernel: Relax gen_tcp_misc_SUITE don't wait for timeout
kernel: Relax test gen_tcp_misc_SUITE:wrapping_oct/1
|
|
Also, fixed some confusing indentations and whitespace errors.
This commit only has whitespace changes and removal of ?line macros.
|
|
|
|
|
|
* vinoski/enif-raise-exception/OTP-12770:
Add enif_raise_exception
Enhance enif_has_pending_exception
Fix for enif_schedule_nif and exceptions
Conflicts:
erts/doc/src/erl_nif.xml
|
|
To differentiate between first/last map entry
and head/tail which is before/after first/last map entry.
|
|
Add enif_raise_exception function to allow NIFs to raise error
exceptions holding any Erlang terms. This does not replace or
deprecate the enif_make_badarg function, though, because raising
badarg errors is so idiomatic in NIFs. Reimplement enif_make_badarg on
top of enif_raise_exception. Add new tests for enif_raise_exception
for both normal and dirty NIFs. Add documentation for
enif_raise_exception.
|
|
Sverker Eriksson came up with the following idea: to handle a future
ability for NIFs to raise more than just badarg exceptions, modify the
recently-added enif_has_pending_exception function to take a second
argument: a pointer to ERL_NIF_TERM. If this argument is a null
pointer, ignore it. Otherwise, if the first argument, an ErlNifEnv*,
has an associated exception, set the pointed-to ERL_NIF_TERM of the
second argument to the value of the exception term. Add new tests and
documentation for this modification.
|
|
Fix a place where part of the implementation of enif_schedule_nif was
not using the ErlNifEnv exception_thrown field when it should have
been.
Also make the result of enif_schedule_nif return false when passed to
enif_is_exception, and add an assertion for this to the nif_SUITE.c
tests.
|
|
|
|
Remove ?line macro.
|
|
|
|
* rickard/timer-optimization/OTP-12650:
Timer fixes, documentation, and test cases
Conflicts:
erts/emulator/beam/erl_hl_timer.c
|
|
|
|
* egil/fix-maps-erts_debug-size:
erts: Fix erts_debug:size/1 for large Maps
erts: Simple test of erts_debug:size/1 of Maps
|
|
|
|
* rickard/time-improvement/OTP-11997:
Allow execution of estone suite on pre OTP-18 systems
Add parallel time monotonicity test-case
Replace usage of erlang:now() in line-tracing
Replace erlang:now() usage in emulator suite
Replace erlang:now() usage in system suite
Misc time improvements
|
|
Use the md5 of the native code chunk instead of the Beam code md5.
|
|
|
|
|
|
|
|
|
|
|
|
* sverk/pr632/prevent-illegal-nif-terms/OTP-12655:
erts: Reject non-finite float terms in erl_drv_output_term
erts: Remove old docs about experimental NIF versions.
erts: Add enif_has_pending_exception
erts: Clearify erl_nif documentation about badarg exception
erts: Fix compile warning in enif_make_double
erts: Fix divide by zero compile error in nif_SUITE.c
erts: Fix isfinite for windows
Ensure NIF term creation disallows illegal values
|
|
|
|
|
|
According to EEP-43 for maps, a 'badmap' exception should be
generated when an attempt is made to update non-map term such as:
<<>>#{a=>42}
That was not implemented in the OTP 17.
José Valim suggested that we should take the opportunity to
improve the errors coming from map operations:
http://erlang.org/pipermail/erlang-questions/2015-February/083588.html
This commit implement better errors from map operations similar
to his suggestion.
When a map update operation (Map#{...}) or a BIF that expects a map
is given a non-map term, the exception will be:
{badmap,Term}
This kind of exception is similar to the {badfun,Term} exception
from operations that expect a fun.
When a map operation requires a key that is not present in a map,
the following exception will be raised:
{badkey,Key}
José Valim suggested that the exception should be
{badkey,Key,Map}. We decided not to do that because the map
could potentially be huge and cause problems if the error
propagated through links to other processes.
For BIFs, it could be argued that the exceptions could be simply
'badmap' and 'badkey', because the bad map and bad key can be found in
the argument list for the BIF in the stack backtrace. However, for the
map update operation (Map#{...}), the bad map or bad key will not be
included in the stack backtrace, so that information must be included
in the exception reason itself. For consistency, the BIFs should raise
the same exceptions as update operation.
If more than one key is missing, it is undefined which of
keys that will be reported in the {badkey,Key} exception.
|
|
In the update loop for big maps, the E variable is restored for
each turn of the loop. It only needs to be restored if a garbage
collection has been performed.
Also add a new test case that attempts to force several garbage
collections while updating a map, to help us find bugs with
incorrect restoration of the E variable after a garbage collection.
|
|
The map instructions require that the keys in the instructions
are sorted (for flatmaps). But that is an implementation detail
that should not exposed outside of the BEAM virtual machine.
Therefore, make the sorting of the keys the responsibility of
the loader and not the compiler.
Also note that the sort order for maps with numeric keys or keys
with numeric components has changed in OTP 18. That means that
code compiled for OTP 17 that operated on maps with map keys
might not work in OTP 18 without the sorting in the loader
(although it is unlikely to be an issue in practice).
|
|
The has_map_fields instruction was not tested at all by
erts/map_SUITE.erl
|