aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
AgeCommit message (Collapse)Author
2018-10-11Merge branch 'sverker/r16/binary_to_atom-utf8-crash/ERL-474/OTP-14590' into ↵Erlang/OTP
maint-17 * sverker/r16/binary_to_atom-utf8-crash/ERL-474/OTP-14590: erts: Fix crash in binary_to_atom/term for invalid utf8
2018-10-11Merge branch 'sverker/big-bxor-bug/ERL-450/OTP-14514' into maint-17Erlang/OTP
* sverker/big-bxor-bug/ERL-450/OTP-14514: erts: Fix bug in bxor of a big negative number
2018-10-11Merge branch 'sverker/bin2term-zlib-bug/ERL-340/OTP-14159' into maint-17Erlang/OTP
* sverker/bin2term-zlib-bug/ERL-340/OTP-14159: erts: Fix binary_to_term for compressed and zlib >= v1.2.9
2018-10-11Merge branch 'rickard/thr-prgr-unmanaged-delay-bug/OTP-13869' into maint-17Erlang/OTP
* rickard/thr-prgr-unmanaged-delay-bug/OTP-13869: Fix erts_thr_progress_unmanaged_delay()
2018-10-11Merge branch 'rickard/drv-send-term-thr-bug/OTP-13866' into maint-17Erlang/OTP
* rickard/drv-send-term-thr-bug/OTP-13866: Fix thread calls to erl_drv_send_term()/erl_drv_output_term()
2018-10-11Merge branch 'rickard/port-sig-dropped-fix/OTP-13424' into maint-17Erlang/OTP
* rickard/port-sig-dropped-fix/OTP-13424: Fix implementation of dropped signal to port
2017-08-30erts: Fix crash in binary_to_atom/term for invalid utf8Sverker Eriksson
such as a sub-binary, of a correct utf8 string, that ends in the middle of a character.
2017-07-12erts: Fix bug in bxor of a big negative numberSverker Eriksson
Wrong result for (X bsl WS) bxor Y. where X is any negative integer Y is any integer that does not require more words than X WS is erlang:system_info(wordsize) or larger Fix: The subtraction of 1 (for 2-complement conversion) must be carried along all the way to the last words.
2017-01-23erts: Fix binary_to_term for compressed and zlib >= v1.2.9Sverker Eriksson
Problem: z_stream was incorrectly copied with memcpy which just happened to work with zlib < v1.2.9. Solution: Avoid copying z_stream.
2016-09-05Fix erts_thr_progress_unmanaged_delay()Rickard Green
Thread progress leader update did not cache current unmanaged index when waiting for unmanaged threads. This caused erts_thr_progress_unmanaged_delay() to stop working until a new leader took over.
2016-09-05Fix thread calls to erl_drv_send_term()/erl_drv_output_term()Rickard Green
2016-03-18Fix implementation of dropped signal to portRickard Green
2016-02-04Fix bug causing run-queue mask to become inconsistentRickard Green
2015-12-04Remove ERTS_PRINT_INVALID from erts_print()Rickard Green
ERTS_PRINT_INVALID prevented file descriptor 0 to be used which could cause an empty crash dump.
2015-09-07Merge branch 'sverk/trace-process_dump-matchstate-17/OTP-12968' into maint-17Erlang/OTP
* sverk/trace-process_dump-matchstate-17/OTP-12968: erts: Add testcase for tracing whith 'process_dump' erts: Fix bug when tracing with 'process_dump'
2015-09-01erts: Fix bug when tracing with 'process_dump'Sverker Eriksson
If the process stack contained a match state the print function would crash the vm as it was not recognized by tag_val_def(). Add new MATCHSTATE_DEF returned by tag_val_def(). All other callers either ignore it or has a default clause to handle invalid terms.
2015-07-06Merge branch 'rickard/non-smp-trace-port-exit-bug/OTP-12889' into maint-17Erlang/OTP
* rickard/non-smp-trace-port-exit-bug/OTP-12889: Teach non-smp VM how to deal with trace port crash Test case testing crash in tracer port
2015-07-06Teach non-smp VM how to deal with trace port crashRickard Green
2015-05-25erts: Fix garbage collect literals in code purgeBjörn-Egil Dahlberg
During code purging and check_process_code, the checking of the binary reference embedded in the match binary state was omitted for the tracing tests. This would cause the binary match state to reference deallocated memory.
2015-03-27Merge branch 'sverk/large-list_to_integer-bug/OTP-12624' into maintSverker Eriksson
* sverk/large-list_to_integer-bug/OTP-12624: erts: Fix bug in list_to_integer for very large strings
2015-03-26Merge branch 'egil/maint/process_dictionary-initial-size/OTP-12535' into maintBjörn-Egil Dahlberg
* egil/maint/process_dictionary-initial-size/OTP-12535: erts: Document option 'hpds' erts: Enable command line argument for initial pd size
2015-03-25erts: Fix bug in list_to_integer for very large stringsSverker Eriksson
list_to_integer(lists:duplicate(10000000,$0)). crashed due to overflow when calculating nr heap words.
2015-03-25erts: Enable command line argument for initial pd sizeBjörn-Egil Dahlberg
Use '+hpds size' to set initial process dictionary size for spawned processes.
2015-03-24erts: Fix comparison of exact termsBjörn-Egil Dahlberg
Comparison of exact terms could cause faulty term tests. This was caused by a faulty (too small) internal type. Symptom: -1 = erts_internal:cmp_term(2147483648,0). %% wrong Correct: 1 = erts_internal:cmp_term(2147483648,0). Reported-by: Jesper Louis Andersen
2015-03-20Merge branch 'nox/fix-port_info-race' into maintZandra Hird
* nox/fix-port_info-race: Fix a race condition when calling port_info/1 OTP-12587
2015-03-18Merge branch 'wmalik/minor-fixes' into maintZandra Hird
* wmalik/minor-fixes: Fix proc_lib doc Remove commented out code Fix make_hash description
2015-03-18Fix a race condition when calling port_info/1Anthony Ramine
This variable hold the values returned by erlang:port_info/1 and shouldn't be static. Reported-by: Heinz Nikolaus Gies
2015-03-17Merge branch 'rickard/port_control_flags_crash/OTP-12544' into maintRickard Green
* rickard/port_control_flags_crash/OTP-12544: Make access to control_flags safe in non-smp emulator
2015-03-12Merge branch 'mikpe/avoid-oversize-bignums' into maintHenrik Nord
* mikpe/avoid-oversize-bignums: don't leave a heap hole in erts_bs_get_integer_2 don't create oversize bignums in binary matching OTP-12556
2015-03-06Merge branch 'leoliu/master' into maintZandra Hird
* leoliu/master: Two minor fixes OTP-12545
2015-03-06Make access to control_flags safe in non-smp emulatorRickard Green
2015-02-27Two minor fixesLeo Liu
* Fix documentation on $char for unicode * Remove duplicate declaration for erts_encode_ext_dist_header_size
2015-02-21Fix make_hash descriptionWasif Malik
2015-02-20erts: Fix erroneous printout in crashdumpBjörn-Egil Dahlberg
An extra '}' were printed in remote links.
2015-02-14don't leave a heap hole in erts_bs_get_integer_2Mikael Pettersson
Reset p->htop in the oversize bignum error case to avoid leaving a hole in the heap, which would crash the debug emulator.
2015-02-04don't create oversize bignums in binary matchingMikael Pettersson
Bignums are artifically restricted in size. Arithmetic and logical operations check the sizes of resulting bignums, and turn oversize results into system_limit exceptions. However, this check is not performed when bignums are constructed by binary matching. The consequence is that such matchings can construct oversize bignums that satisfy is_integer/1 yet don't work. Performing arithmetic such as Term - 0 fails with a system_limit exception. Worse, performing a logical operation such as Term band Term results in []. The latter occurs because the size checking (e.g. in erts_band()) is a simple ASSERT(is_not_nil(...)) on the result of the bignum operation, which internally is [] (NIL) in the case of oversize results. However, ASSERT is a no-op in release builds, so the error goes unnoticed and [] is returned as the result of the band/2. This patch addresses this by preventing oversize bignums from entering the VM via binary matching: - the internal bytes_to_big() procedure is augmented to return NIL for oversize results, just like big_norm() - callers of bytes_to_big() are augmented to check for NIL returns and signal errors in those cases - erts_bs_get_integer_2() can only fail with badmatch, so that is the Erlang-level result of oversize bignums from binary matches - big_SUITE.erl is extended with a test case that fails without this fix (no error signalled) and passes with it (badmatch occurs) Credit goes to Nico Kruber for the initial bug report.
2015-02-03Merge branch 'maint-17' into maintZandra Hird
2015-01-23erts: Check driver version before assigning callbackBjörn-Egil Dahlberg
2015-01-23erts: Don't lookup invalid port for crashdump handlingBjörn-Egil Dahlberg
2015-01-23erts: Use emergency close to close epmdBjörn-Egil Dahlberg
Closes all open socket before writing crashdump to file.
2015-01-13erts: Extend driver interface with emergency_closeBjörn-Egil Dahlberg
The intention of this callback is to close all sockets associated to a port. It is closed only on crashdumps. This will currently only be used for the epmd port.
2014-12-10Use the new 64-bit atomic ops APIRickard Green
2014-12-10Introduce a 64-bit atomic ops APIRickard Green
The 64-bit atomic ops API is implemented by * native word size atomic ops on 64-bit architectures, and * native double word size atomic ops on 32-bit architectures when available. When native double word size atomic is not available, the fallback using modification counters is used.
2014-11-26Merge branch 'sverk/port_get_data-race/OTP-12208' into maintSverker Eriksson
* sverk/port_get_data-race/OTP-12208: erts: Fix port data memory allocation bug
2014-11-25Merge branch 'rickard/maint-17/activate-runq/OTP-12287' into maintRickard Green
* rickard/maint-17/activate-runq/OTP-12287: Do not let non-empty run-queue prevent activation of scheduler
2014-11-25Merge branch 'sverk/cpool-search-improvement' into maintSverker Eriksson
OTP-12323 * sverk/cpool-search-improvement: erts: Add internal docs for super carrier and new cpool search. erts: Fix bug causing mbc to be deleted from cpool before it was inserted erts: Fix bug causing mbc removed from cpool to be used at pool entrance erts: Add pooled_list and traitor_list
2014-11-25erts: Fix port data memory allocation bugSverker Eriksson
for non-immediate port data >= sizeof(Eterm)*2 words.
2014-11-10Merge branch 'vinoski/dirty-nif-return-gc' into maintBruce Yinhe
OTP-12300 * vinoski/dirty-nif-return-gc: Fix gc-related problem with dirty NIFs
2014-11-07Merge branch 'lemenkov/expose_nif_version' into maintBruce Yinhe
OTP-12298 * lemenkov/expose_nif_version: Expose NIF version
2014-11-06Merge branch 'vinoski/fix-smp-disable-with-ds/OTP-12295' into maintMarcus Arendt
* vinoski/fix-smp-disable-with-ds/OTP-12295: Fix "-smp disable" for emulator with dirty schedulers