aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
AgeCommit message (Collapse)Author
2017-09-05Replace the zlib driver with a NIFJohn Högberg
All operations will now yield appropriately, allowing them to be used freely in concurrent applications. This commit also deprecates the functions listed below, although they won't raise deprecation warnings until OTP 21: zlib:adler32 zlib:crc32 zlib:inflateChunk zlib:getBufSize zlib:setBufSize The behavior of throwing an error when a dictionary is required for decompression has also been deprecated.
2017-09-05erts: Add erlang:iolist_to_iovecLukas Larsson
OTP-14520
2017-09-05erts: Add nif ioqLukas Larsson
2017-07-27Merge branch 'maint-20' into maintJohn Högberg
* maint-20: Updated OTP version Update release notes Update version numbers Fix doc for the 'quiet' option; it defaults to false asn1: Fix missing quotes of external encoding call Add a dedicated close function for TCP ports to prevent issues like ERL-430/448 Close TCP ports properly on send timeout erts: Add missing release note
2017-07-26Merge branch 'sverker/big-bxor-bug/ERL-450/OTP-14514' into maint-20Erlang/OTP
* sverker/big-bxor-bug/ERL-450/OTP-14514: erts: Fix bug in bxor of a big negative number
2017-07-26Merge branch 'john/erts/fix-tcp-send-timeout/OTP-14509/ERL-448' into maint-20Erlang/OTP
* john/erts/fix-tcp-send-timeout/OTP-14509/ERL-448: Add a dedicated close function for TCP ports to prevent issues like ERL-430/448 Close TCP ports properly on send timeout
2017-07-25Merge branch 'sverker/enif_whereis-bug/OTP-14523' into maintSverker Eriksson
* sverker/enif_whereis-bug: erts: Fix bug in enif_whereis_pid/port
2017-07-25Merge branch 'john/erts/use-lock-flags-in-lc' into maintJohn Högberg
2017-07-13Merge branch 'sverker/big-bxor-bug/ERL-450/OTP-14514' into maintSverker Eriksson
* sverker/big-bxor-bug/ERL-450/OTP-14514: erts: Fix bug in bxor of a big negative number
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-07-11erts: Fix bug in enif_whereis_pid/portSverker Eriksson
that could cause heap corruption if whereis lookup conflicts with other register updater AND other thread sends on-heap message while main lock is released. Also improved enif_whereis from dirty nifs by passing c_p as NULL.
2017-07-11Use erl_lock_flags in lock checkingJohn Högberg
2017-07-10Add a dedicated close function for TCP ports to prevent issues like ERL-430/448John Högberg
2017-07-10Close TCP ports properly on send timeoutJohn Högberg
2017-07-07Add a proper type for lock optionsJohn Högberg
2017-07-06Merge branch 'john/erts/runtime-lcnt' into maintJohn Högberg
* john/erts/runtime-lcnt: Document rt_mask and add warnings about copy_save Add an emulator test suite for lock counting Break erts_debug:lock_counters/1 into separate BIFs Allow toggling lock counting at runtime Move lock flags to a common header Enable register_SUITE for lcnt builds Enable lcnt smoke test on all builds that have lcnt enabled Make lock counter info independent of the locks being counted OTP-14412 OTP-13170 OTP-14413
2017-07-06Add an emulator test suite for lock countingJohn Högberg
OTP-14413
2017-07-06Break erts_debug:lock_counters/1 into separate BIFsJohn Högberg
2017-07-06Allow toggling lock counting at runtimeJohn Högberg
The implementation is still hidden behind ERTS_ENABLE_LOCK_COUNT, and all categories are still enabled by default, but the actual counting can be toggled at will. OTP-13170
2017-07-06Move lock flags to a common headerJohn Högberg
2017-07-06Enable register_SUITE for lcnt buildsJohn Högberg
It was disabled for performance reasons, and the new implementation handles it just fine (roughly half as fast as without lcnt).
2017-07-06Merge branch 'sverker/prealloc-race-bug/maint' into maintSverker Eriksson
* sverker/prealloc-race-bug/maint: erts: Increase pre-allocated blocks #ifdef DEBUG
2017-07-04Merge branch 'maint-20' into maintJohn Högberg
* maint-20: Updated OTP version Update release notes Update version numbers erts: Fix bug in quick alloc Fix old length usage in string stdlib: Fix bug in proc_lib Support arbitrary crash report in proc_lib.
2017-06-30erts: Increase pre-allocated blocks #ifdef DEBUGSverker Eriksson
Choose a "lagom" low value to provoke both fallback on erts_alloc AND thread racing in lockless deallocation queue.
2017-06-30Merge branch 'sverker/prealloc-race-bug/OTP-14491' into maint-20Erlang/OTP
* sverker/prealloc-race-bug/OTP-14491: erts: Fix bug in quick alloc
2017-06-30Merge branch 'rickard/statistics/OTP-14484' into maint-20Erlang/OTP
* rickard/statistics/OTP-14484: Fix statistics(wall_clock) and statistics(runtime) implementation
2017-06-30Merge branch 'lukas/erts/fix_outputv_port_task_cleanup/ERL-428/OTP-14481' ↵Erlang/OTP
into maint-20 * lukas/erts/fix_outputv_port_task_cleanup/ERL-428/OTP-14481: fixup! erts: Cleanup dropped port tasks correctly erts: Add tests to detect port close race erts: Cleanup dropped port tasks correctly
2017-06-30Merge branch 'john/erts/fix-port-leak/OTP-13939/ERL-193' into maint-20Erlang/OTP
* john/erts/fix-port-leak/OTP-13939/ERL-193: Add a testcase for OTP-13939/ERL-193 Mark socket disconnected on tcp_send_or_shutdown_error # Conflicts: # lib/kernel/test/gen_tcp_misc_SUITE.erl
2017-06-30erts: Fix bug in quick allocSverker Eriksson
The effect of the race is that a pre-allocated memory block is inserted last without updating tail.data.last, which will cause all subsequent insertions to also fail to update tail.data.last. Hence all pre-allocation for this quick alloc instance is leaked for this thread and will fallback on erts_alloc.
2017-06-29Merge branch 'sverker/erts/apply-badarg/ERL-432/OTP-14490' into maintSverker Eriksson
* sverker/erts/apply-badarg/ERL-432/OTP-14490: erts: Make apply throw 'badarg' if Args is not a list
2017-06-28Merge branch 'bjorn/erts/fix-gen-dest' into maintBjörn Gustavsson
* bjorn/erts/fix-gen-dest: Eliminate potential unsafe use of general destination
2017-06-27erts: Make apply throw 'badarg' if Args is not a listSverker Eriksson
instead of a strange 'undef' exception.
2017-06-27Merge branch 'maint-19' into maintJohn Högberg
* maint-19: Updated OTP version Update release notes Update version numbers Fix statistics(wall_clock) and statistics(runtime) implementation fixup! erts: Cleanup dropped port tasks correctly erts: Add tests to detect port close race Add a testcase for OTP-13939/ERL-193 erts: Cleanup dropped port tasks correctly Mark socket disconnected on tcp_send_or_shutdown_error
2017-06-26Merge branch 'rickard/statistics/OTP-14484' into maint-19Erlang/OTP
* rickard/statistics/OTP-14484: Fix statistics(wall_clock) and statistics(runtime) implementation
2017-06-26Merge branch 'lukas/erts/fix_outputv_port_task_cleanup/ERL-428/OTP-14481' ↵Erlang/OTP
into maint-19 * lukas/erts/fix_outputv_port_task_cleanup/ERL-428/OTP-14481: fixup! erts: Cleanup dropped port tasks correctly erts: Add tests to detect port close race erts: Cleanup dropped port tasks correctly
2017-06-26Merge branch 'john/erts/fix-port-leak/OTP-13939/ERL-193' into maint-19Erlang/OTP
* john/erts/fix-port-leak/OTP-13939/ERL-193: Add a testcase for OTP-13939/ERL-193 Mark socket disconnected on tcp_send_or_shutdown_error # Conflicts: # lib/kernel/test/gen_tcp_misc_SUITE.erl
2017-06-26Eliminate potential unsafe use of general destinationBjörn Gustavsson
a3407eaa2104d6 eliminated the -gen_dest flag for macros in ops.tab. It turns out that the new implementation (taking the address of the X or X destination register) is unsafe if the destination is a Y register and there can be a GC. The problem is that the address to the Y register will change if there is a GC. Fortunately, the few instructions in OTP 20 that have a general destinations are safe. The put_list_ssd instruction never does a GC. The bit syntax instructions that may do a GC will always store the result to an X register. To be completely sure, rewrite the destination register from 'd' to 'x' for the bit syntax instructions. That means that a bit syntax instruction with a Y register destionation will abort the loading if it is encountered.
2017-06-22Fix statistics(wall_clock) and statistics(runtime) implementationRickard Green
2017-06-15Merge branch 'hans/otp/update_copyright'Hans Nilsson
2017-06-14fixup! erts: Cleanup dropped port tasks correctlyLukas Larsson
2017-06-14erts: Add tests to detect port close raceLukas Larsson
2017-06-14Merge branch 'rickard/t2b-latin1-atom'Rickard Green
OTP-14337 * rickard/t2b-latin1-atom: Fix minor vsn 1 in term_to_binary/2 broken in this branch
2017-06-14Fix minor vsn 1 in term_to_binary/2 broken in this branchRickard Green
2017-06-14Merge branch 'rickard/t2b-latin1-atom'Rickard Green
OTP-14337 * rickard/t2b-latin1-atom: Update primary bootstrap Update preloaded modules Fix erl_interface tests Introduce minor vsn 2 in term_to_binary/2 Revert "kernel: Try mend disk_log whitebox tests" Revert "erts: Do not generate atoms on old latin1 external format"
2017-06-14Update copyright yearHans Nilsson
2017-06-14Introduce minor vsn 2 in term_to_binary/2Rickard Green
2017-06-14erts: Cleanup dropped port tasks correctlyLukas Larsson
Before this fix, the extra data attached to a port task had to be cleaned up by the calling function. This caused problems because the outputv call, co-allocates the extra data with the port task. So in rare circumstances the port task would be free'd before the extra data was free'd which led to segfault when looking at the port task. This has been fixed by the generic PORT_TASK_ABORT behaviour being used even for tasks dropped in the erts_schedule_proc2port_signal API.
2017-06-14Mark socket disconnected on tcp_send_or_shutdown_errorkvakvs
The socket left lingering due to {exit_on_close, false} will accept writes in a confusing way, returning either enotconn or blocking. This fix allows socket to know that it has been closed recently, and new writes won't pass.
2017-06-13Revert "erts: Do not generate atoms on old latin1 external format"Rickard Green
This reverts commit 65b04e233e09e3cc2e0fda3c28e155b95c5a4baf.
2017-06-13Eliminate warnings for unused variablesBjörn Gustavsson