aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-03-21Point out the correct line in an exception for a bad generatorBjörn Gustavsson
When a generator in a list comprehension was given some other term than a list, the wrong line could be pointed out in the exception. Here is an example: bad_generator() -> [I || %%This line would be pointed out. I <- not_a_list]. https://bugs.erlang.org/browse/ERL-572
2018-03-21Merge pull request #1740 from rickard-green/rickard/signals/OTP-14589Rickard Green
Implementation of true asynchronous signaling between processes
2018-03-21Implementation of true asynchronous signaling between processesRickard Green
Communication between Erlang processes has conceptually always been performed through asynchronous signaling. The runtime system implementation has however previously preformed most operation synchronously. In a system with only one true thread of execution, this is not problematic (often the opposite). In a system with multiple threads of execution (as current runtime system implementation with SMP support) it becomes problematic. This since it often involves locking of structures when updating them which in turn cause resource contention. Utilizing true asynchronous communication often avoids these resource contention issues. The case that triggered this change was contention on the link lock due to frequent updates of the monitor trees during communication with a frequently used server. The signal order delivery guarantees of the language makes it hard to change the implementation of only some signals to use true asynchronous signaling. Therefore the implementations of (almost) all signals have been changed. Currently the following signals have been implemented as true asynchronous signals: - Message signals - Exit signals - Monitor signals - Demonitor signals - Monitor triggered signals (DOWN, CHANGE, etc) - Link signals - Unlink signals - Group leader signals All of the above already defined as asynchronous signals in the language. The implementation of messages signals was quite asynchronous to begin with, but had quite strict delivery constraints due to the ordering guarantees of signals between a pair of processes. The previously used message queue partitioned into two halves has been replaced by a more general signal queue partitioned into three parts that service all kinds of signals. More details regarding the signal queue can be found in comments in the erl_proc_sig_queue.h file. The monitor and link implementations have also been completely replaced in order to fit the new asynchronous signaling implementation as good as possible. More details regarding the new monitor and link implementations can be found in the erl_monitor_link.h file.
2018-03-21Merge branch 'bjorn/misc-beam-fixes'Björn Gustavsson
* bjorn/misc-beam-fixes: Correctly handle get_map_elements with a literal map core_parse: Fix handling of negative sizes in binaries
2018-03-21Merge pull request #1721 from josevalim/jv-no-messageanBjörn Gustavsson
Remove unused cerl_messagean module
2018-03-20Merge branch 'sverker/inline-sys_memcpy'Sverker Eriksson
* sverker/inline-sys_memcpy: erts: Optimize macro DMC_PUSH erts: Make sys_memcpy and friends inline functions
2018-03-20erts: Optimize macro DMC_PUSHSverker Eriksson
to call a common static function dmc_stack_grow() and reduce the code bloat. and did a combined DMC_PUSH2
2018-03-20erts: Make sys_memcpy and friends inline functionsSverker Eriksson
to avoid argument-evaluated-twice bugs like in macro DMC_PUSH. Had to shuffle around some #include and #define to make erl_child_setup build debug target.
2018-03-20Merge pull request #1705 from eltex-ecss/group_exit_signalHans Nilsson
kernel: in the group added processing of 'EXIT' signal from shell OTP-14991
2018-03-20Merge pull request #1744 from uabboli/hasse/stdlib/lists_search/OTP-14675Hans Bolinder
stdlib: Add function lists:search/2
2018-03-20Merge pull request #1742 from michalmuskala/code-ensure-loadedDan Gudmundsson
Short-circuit code:ensure_loaded for already-loaded modules
2018-03-20Merge pull request #1748 from fenollp/more-typosHans Bolinder
More typos
2018-03-20Merge branch 'john/erts/fix-set-owner-group/ERL-589'John Högberg
* john/erts/fix-set-owner-group/ERL-589: Fix file:change_group/change_owner
2018-03-19Correctly handle get_map_elements with a literal mapBjörn Gustavsson
A get_map_elements instruction that has a literal map operand would never be translated to a i_get_map_element instruction. That would be a problem for the following instruction: get_map_elements Fail #{} {x,0}, {x,1} Since the key is not a literal, get_map_element must be used, since get_map_elements requires that a hash value can be calculated for each element. When the instruction is translated to i_get_map_element, the hash value will be set to 0 and an assertion will trigger in the debug build.
2018-03-19core_parse: Fix handling of negative sizes in binariesBjörn Gustavsson
A literal negative size in binary construction would cause a crash.
2018-03-19Merge branch 'bjorn/compiler/misc-fixes'Björn Gustavsson
* bjorn/compiler/misc-fixes: Teach beam_utils:replace_labels/4 to handle recv_{mark,set} v3_kernel: Stop ensuring one return value in #k_try{} v3_kernel_pp: Print return variables for #k_try{}
2018-03-19Fix file:change_group/change_ownerJohn Högberg
It wasn't possible to change group/owner separately, and our test suite lacked coverage for that. ERL-589
2018-03-19Merge branch 'hans/ssh/faster_app_stop/OTP-14988'Hans Nilsson
* hans/ssh/faster_app_stop/OTP-14988: ssh: Remove deadlock in supervisor tree ssh: Remove spawn in ssh_system_sup:stop_system/1 ssh: Removed unused sshc_sup:stop_child/1
2018-03-19Merge branch 'hans/ssh/cuddle_tests_master'Hans Nilsson
* hans/ssh/cuddle_tests_master: ssh: Join basic and renegotiation suites and parallelize ssh: Parallelize ssh_basic_SUITE ssh: Parallelize ssh_renegotiate_SUITE ssh: Fix non-working test + add log in test suite
2018-03-16ssh: Remove deadlock in supervisor treeHans Nilsson
2018-03-16ssh: Remove spawn in ssh_system_sup:stop_system/1Hans Nilsson
2018-03-16ssh: Removed unused sshc_sup:stop_child/1Hans Nilsson
2018-03-16ssh: Join basic and renegotiation suites and parallelizeHans Nilsson
2018-03-16ssh: Parallelize ssh_basic_SUITEHans Nilsson
2018-03-16ssh: Parallelize ssh_renegotiate_SUITEHans Nilsson
2018-03-16Merge branch 'maint'Ingela Anderton Andin
* maint: Updated OTP version Update release notes ssl: Prepare for release ssl: Remove duplicate release note ssl: Fix filter function to not discard AEAD cipher suites Conflicts: OTP_VERSION
2018-03-16more-typos: s%vaues%values%gPierre Fenoll
2018-03-16more-typos: s%follwing%following%gPierre Fenoll
2018-03-16mikpe/process_info-1-no-messages/PR-1745/OTP-14986Lukas Larsson
make erlang:process_info/1 not retrieve messages
2018-03-16Merge pull request #1746 from legoscia/erl_nif.xml-spellingLukas Larsson
Fix typos in erl_nif.xml
2018-03-15Merge pull request #1747 from vladimir-vg/patch-1Lukas Larsson
Tracing MatchSpec docs update
2018-03-15Tracing MatchSpec docs updateVladimir Gordeev
I was running this code in shell and expected it to take default `self()` meta tracer, and start tracing `erlang:put/2`. ``` F = fun F() -> timer:sleep(5000), erlang:get(unique_field), erlang:put(unique_field, 123), F() end. erlang:trace_pattern({erlang, put, 2}, [{['$1', '_'], [{'==', '$1', unique_field}], []}], [global]). erlang:trace_pattern({erlang, get, 1}, [{['_'], [], [{trace, [], [call, timestamp]}]}], [meta]). Pid = spawn(F). ``` But tracing didn't start: ``` 6> flush(). Shell got {trace_ts,<0.70.0>,call, {erlang,get,[unique_field]}, {1521,118606,753838}} Shell got {trace_ts,<0.70.0>,call, {erlang,get,[unique_field]}, {1521,118611,754798}} Shell got {trace_ts,<0.70.0>,call, {erlang,get,[unique_field]}, {1521,118616,755705}} ok 7> erlang:trace_info(Pid, flags). {flags,[]} ``` Turns out that I had false expectations, that `{trace, _, _}` would enable tracing on that process, inheriting meta tracer process as consumer of trace messages. Instead it tried to take tracer from executing process (which is pointed out in docs). But there was none, so no tracing was started and flags were simply ignored (which is not that obvious from docs). Updated docs to point out that there are cases when flags would be simply ignored, and no tracing would start.
2018-03-15Updated OTP versionOTP-20.3.1Erlang/OTP
2018-03-15Update release notesErlang/OTP
2018-03-15Merge branch 'ingela/ssl/filter-bug/OTP-14981' into maint-20Erlang/OTP
* ingela/ssl/filter-bug/OTP-14981: ssl: Prepare for release ssl: Remove duplicate release note ssl: Fix filter function to not discard AEAD cipher suites
2018-03-15ssl: Prepare for releaseIngela Anderton Andin
2018-03-15ssh: Fix non-working test + add log in test suiteHans Nilsson
2018-03-15ssl: Remove duplicate release noteIngela Anderton Andin
2018-03-15Merge pull request #1739 from lucafavatella/http_uri-bin-validatePéter Dimitrov
inets: fix scheme validation in http_uri:parse when binary URI
2018-03-15ssl: Fix filter function to not discard AEAD cipher suitesIngela Anderton Andin
2018-03-14erts: Fix faulty sys_memcpy of 0 bytesSverker Eriksson
2018-03-14inets: fix scheme validation in http_uri:parse when binary URILuca Favatella
2018-03-14Teach beam_utils:replace_labels/4 to handle recv_{mark,set}Björn Gustavsson
The missing support for renumbering labels in recv_mark and recv_set did not seem to cause any problems, probably because the insructions are introduced late and their labels would keep their numbers. But it there will definitely be a problem if the recv_mark and recv_set instructions would be introduced much earlier.
2018-03-14v3_kernel: Stop ensuring one return value in #k_try{}Björn Gustavsson
For unclear reasons, v3_kernel attempts to guarantee that #k_try{} always has at least one return value, even if it will never be used. I said "attempts", because the handler block that is executed when an exception is caught does not have the same guarantee. That means that if an exception is thrown, the return value will not actually be set. In practice, however, this is not a problem for the existing code generator (v3_codegen). The generated code will still be safe. If we are to rewrite the code generator to generate an SSA-based intermediate format, this inconsistency *will* cause problems when creating phi nodes. While at it, also remove an unecessary creation of new variables in generation of #k_try_enter{}.
2018-03-14v3_kernel_pp: Print return variables for #k_try{}Björn Gustavsson
2018-03-14Remove accidentally added file t.erlBjörn Gustavsson
2018-03-14Merge branch 'maint'Henrik
Conflicts: OTP_VERSION
2018-03-14Merge branch 'ingela/ssl/no-sslv2-hello-support/OTP-14824'Ingela Anderton Andin
* ingela/ssl/no-sslv2-hello-support/OTP-14824: ssl: Remove interoperability option v2_hello_compatible
2018-03-13Merge PR-1699 from sverker/hipe-amd64-high-code/OTP-14951Sverker Eriksson
Remove low memory need for HiPE on x86_64
2018-03-13Merge branch 'sverker/send-tick/OTP-14681'Sverker Eriksson
* sverker/send-tick/OTP-14681: kernel: Fix and improve send_tick logic