aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
AgeCommit message (Collapse)Author
2017-10-05Merge branch 'sverker/bad-dist-msg-bug/ERIERL-80/OTP-14661' into maint-19Erlang/OTP
* sverker/bad-dist-msg-bug/ERIERL-80/OTP-14661: erts: Fix bug when detecting bad dist message Add distribution_SUITE:bad_dist_ext_size
2017-10-05Merge branch 'sverker/19/on_load-on_load-bug/OTP-14612' into maint-19Erlang/OTP
* sverker/19/on_load-on_load-bug/OTP-14612: erts: Fix 'on_load' tracing bug for modules with -on_load code_SUITE:on_load_trace_on_load
2017-10-05Merge branch 'sverker/19/binary_to_atom-utf8-crash/ERL-474/OTP-14590' into ↵Erlang/OTP
maint-19 * sverker/19/binary_to_atom-utf8-crash/ERL-474/OTP-14590: erts: Fix crash in binary_to_atom/term for invalid utf8
2017-10-05Merge branch 'rickard/timer-sid-bug/OTP-14548' into maint-19Erlang/OTP
* rickard/timer-sid-bug/OTP-14548: Fix scheduler id field in timers
2017-10-02erts: Fix bug when detecting bad dist messageSverker Eriksson
We can't just leave it in queue with dist_ext=NULL. Two symptoms seen: 1. 'receive' trying to deref dist_ext as NULL. 2. GC think it's a term and put THE_NON_VALUE in root set.
2017-10-02Add distribution_SUITE:bad_dist_ext_sizeSverker Eriksson
2017-09-13erts: Fix 'on_load' tracing bug for modules with -on_loadSverker Eriksson
Symptom: VM crash when erlang:trace_pattern(on_load, ..) is set and module with -on_load is loaded. Problem: Tracing and -on_load clash in their use of Export.beam[1] Solution: Do not do call set_default_trace_pattern in finish_loading_1 for modules with -on_load. finish_after_on_load_2 will do that anyway.
2017-08-30Merge tag 'OTP-19.0' into sverker/19/binary_to_atom-utf8-crash/ERL-474/OTP-14590Sverker Eriksson
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-08-23Fix scheduler id field in timersRickard Green
2017-07-25Merge branch 'sverker/big-bxor-bug/ERL-450/OTP-14514' into maint-19Erlang/OTP
* sverker/big-bxor-bug/ERL-450/OTP-14514: erts: Fix bug in bxor of a big negative number
2017-07-25Merge branch 'john/erts/fix-tcp-send-timeout/OTP-14509/ERL-448' into maint-19Erlang/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/prealloc-race-bug/OTP-14491' into maint-19Erlang/OTP
* sverker/prealloc-race-bug/OTP-14491: erts: Fix bug in quick alloc
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-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-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-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-22Fix statistics(wall_clock) and statistics(runtime) implementationRickard Green
2017-06-14fixup! erts: Cleanup dropped port tasks correctlyLukas Larsson
2017-06-14erts: Add tests to detect port close raceLukas Larsson
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-07Merge branch 'lukas/erts/fix_zz_sigterm_kill/OTP-14451' into maint-19Erlang/OTP
* lukas/erts/fix_zz_sigterm_kill/OTP-14451: erts: Fix so that 81b628 (sigterm=kill) works
2017-06-07Merge branch 'rickard/purge-hibernated-19/ERIERL-24/OTP-14444' into maint-19Erlang/OTP
* rickard/purge-hibernated-19/ERIERL-24/OTP-14444: Update testcase to check that purge handle hibernated process correct Do not GC hibernated process from other processes Fix check_process_code() on hibernated process
2017-06-07Merge branch 'john/erts/fix-zombie-tcp-ports/ERL-430/OTP-14441' into maint-19Erlang/OTP
* john/erts/fix-zombie-tcp-ports/ERL-430/OTP-14441: Unconditionally clear IO buffers on send/shutdown errors
2017-06-05erts: Fix so that 81b628 (sigterm=kill) worksLukas Larsson
OTP-14451
2017-06-01Merge branch 'rickard/purge-hibernated' into rickard/purge-hibernated-19Rickard Green
* rickard/purge-hibernated: Update testcase to check that purge handle hibernated process correct Conflicts: erts/emulator/test/code_SUITE.erl
2017-06-01Update testcase to check that purge handle hibernated process correctRickard Green
2017-06-01Merge branch 'rickard/purge-hibernated' into rickard/purge-hibernated-19Rickard Green
* rickard/purge-hibernated: Do not GC hibernated process from other processes Fix check_process_code() on hibernated process Conflicts: erts/emulator/beam/beam_bif_load.c erts/emulator/beam/erl_gc.c erts/emulator/beam/erl_process.h
2017-06-01Do not GC hibernated process from other processesRickard Green
2017-06-01Fix check_process_code() on hibernated processRickard Green
2017-06-01Unconditionally clear IO buffers on send/shutdown errorsJohn Högberg
This fixes a bug where a send/shutdown error on an active-mode socket results in the port never being properly closed.
2017-05-19erts: Add undocumented option to do default SIGTERMLukas Larsson
This is a stopgap measure before the release of OTP-20 where that makes it possible for the user to make the vm not do anything with SIGTERM and instead rely on the OS default. To enable this behaviour the user should set the environment variable ERL_ZZ_SIGTERM_KILL="true".
2017-04-26erl_mseg.c: don't use invalid indices in - > cache_powered_node[]Mikael Pettersson
2017-04-21Do not ignore SIGTERM when VM has been started with +BiRickard Green
2017-03-31Merge branch 'raimo/file-read_file-leaks-file-descriptors/ERL-383/OTP-14308' ↵Erlang/OTP
into maint-19 * raimo/file-read_file-leaks-file-descriptors/ERL-383/OTP-14308: Close FD after trying to open a directory
2017-03-29Close FD after trying to open a directoryRaimo Niskanen
2017-03-21erts: Make sigterm signal safe for non-smp beamBjörn-Egil Dahlberg
The signal handler will now schedule a sigterm message instead of sending the message in the signal handler. The signal handler must refrain from memory allocations and thus the event is scheduled.
2017-03-10Update copyright yearRickard Green
2017-03-01Merge branch 'lukas/erts/port_control_emasculate_binary/OTP-14231' into maintLukas Larsson
* lukas/erts/port_control_emasculate_binary/OTP-14231: erts: Fix emasculation of binaries in port_control
2017-02-27Merge branch 'rickard/prim_eval_receive' into maintRickard Green
OTP-14241 * rickard/prim_eval_receive: Ensure prim_eval:'receive' wont clobber def_arg_reg[0]
2017-02-27erts: Fix emasculation of binaries in port_controlLukas Larsson
This fixes a bug introduced in 3671dd2d
2017-02-23Merge branch 'sverker/include-module-literal-size/OTP-14228' into maintSverker Eriksson
again * sverker/include-module-literal-size: erts: Beautify loaded() erts: Fix literal size bug when only old instance exists
2017-02-21erts: Beautify loaded()Sverker Eriksson
by removing some unnecessary conditions and remove unused and faulty summation for 'cur' and 'old'.
2017-02-21erts: Fix literal size bug when only old instance existsSverker Eriksson
fix for already merged but not releases 808b2f4d53e446aed07f85716c5c4b85abb3d18a
2017-02-21erts: Emasculate binaries that are scheduled in port_controlLukas Larsson
2017-02-20Ensure prim_eval:'receive' wont clobber def_arg_reg[0]Rickard Green
def_arg_reg[0] is used for storage of timeout instruction when a 'receive after' is executed. When a process was scheduled out inside prim_eval:'receive'/0 due to a function call, def_arg_reg[0] was overwritten due to storage of live registers. prim_eval:'receive'/2 now calls arg_reg_alloc/0 which bumps all reductions and then calls arg_reg_alloc/7 which will cause an allocation of a new arg_reg array since def_arg_reg only can hold 6 values. This ensures that the timeout instruction in def_arg_reg[0] used for the timeout wont be overwritten.