aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2018-08-09Merge branch 'ingela/ssl/error-state/ERL-685/OTP-15216' into maintIngela Anderton Andin
* ingela/ssl/error-state/ERL-685/OTP-15216: ssl: Correct close handling
2018-08-08Fix bug in binary matchingBjörn Gustavsson
The compiler generates incorrect code for the following example: decode_binary(_, <<Length, Data/binary>>) -> case {Length, Data} of {0, _} -> %% When converting the match context back to a binary, %% Data will be set to the entire original binary, %% that is, to <<0>> instead of <<>>. {{0, 0, 0}, Data}; {4, <<Y:16/little, M, D, Rest/binary>>} -> {{Y, M, D}, Rest} end. The problem is the delayed sub binary creation optimization, which is not safe to do in this case. This commit introduces a heuristic that will disable the delayed sub binary creation optimization for this example. Unfortunately, the heuristic may turn off the optimization when it would actually be safe. In the OTP codebase, the optimization is turned off in two instances, once in string.erl and once in dets_v9.erl. https://bugs.erlang.org/browse/ERL-689
2018-08-08Merge pull request #1903 from michalmuskala/mm/useless-callBjörn Gustavsson
Eliminate double computation of next var
2018-08-08Merge pull request #1907 from bjorng/bjorn/compiler/fragile/ERL-684Björn Gustavsson
beam_validator: Fix false diagnostic for a receive nested in a try OTP-15218
2018-08-08Fix side-effect optimization when compiling from Core ErlangJohn Högberg
When an expression is only used for its side effects, we try to remove everything that doesn't tie into a side-effect, but we went a bit too far when we applied the optimization to funs defined in such a context. Consider the following: do letrec 'f'/0 = fun () -> ... whatever ... in call 'side':'effect'(apply 'f'/0()) 'ok' When f/0 is optimized under the assumption that its return value is unused, side:effect/1 will be fed the result of the last side-effecting expression in f/0 instead of its actual result. https://bugs.erlang.org/browse/ERL-658 Co-authored-by: Björn Gustavsson <[email protected]>
2018-08-08Do NOT disc_load from ram_copies when master_node is setDan Gudmundsson
Setting master_nodes to a node with ram_copies replica and that node had not loaded the table, could cause it load an empty table, even though (non master) nodes had disc_replicas. This meant that tables where unexpected empty after multiple failures happened. When this happen do not load the table and wait for user to force_load it on some node, preferably with a disk copy.
2018-08-07ssl: Make sure that a correct cipher suite is selectedIngela Anderton Andin
The keyexchange ECDHE-RSA requires an RSA-keyed server cert (corresponding for ECDHE-ECDSA), the code did not assert this resulting in that a incorrect cipher suite could be selected. Alas test code was also wrong hiding the error.
2018-08-07ssl: Correct close handlingIngela Anderton Andin
Transport accepted sockets that are in the error state, was not closed properly.
2018-08-07Eliminate double computation of next varMichał Muskała
My compiler benchmarks on modules with huge functions, show the next_free_variable_name call to be expensive. It turns out one of the 3 calls to the function was completely ignored.
2018-08-07Merge branch 'ingela/ssl/typos' into maintIngela Anderton Andin
* ingela/ssl/typos: ssl: Fix typos
2018-08-07Merge pull request #1906 from elbrujohalcon/patch-3Siri Hansen
Update documentation for ct:timetrap/1
2018-08-07Merge pull request #1872 from sunboshan/patch-1Siri Hansen
Fix kernel_app doc logger_level defaults
2018-08-07ssl: Fix typosIngela Anderton Andin
2018-08-06beam_validator: Fix false diagnostic for a receive nested in a tryBjörn Gustavsson
When nesting a receive in a try/catch, there could be a false diagnostic that a fragile term is used. https://bugs.erlang.org/browse/ERL-684
2018-08-06ssl: Make sure that a correct cipher suite is selectedIngela Anderton Andin
The keyexchange ECDHE-RSA requires an RSA-keyed server cert (corresponding for ECDHE-ECDSA), the code did not assert this resulting in that a incorrect cipher suite could be selected. Alas test code was also wrong hiding the error.
2018-08-06Update documentation for ct:timetrap/1Brujo Benavides
Even when `ct:sleep/1` accepts `Millisecs` as floats, `ct:timetrap/1` does not. If you try to use it in a test, you get the following error: ```erlang {invalid_time_format,0.1} ```
2018-08-06Merge pull request #1807 from milmazz/improve-cover-html-pagesSiri Hansen
Improve Cover HTML page OTP-15213
2018-08-03Merge branch 'maint-20' into maintRaimo Niskanen
* maint-20: Updated OTP version Prepare release Fix NIF stack recursion bug and enforce a limit Conflicts: OTP_VERSION lib/asn1/doc/src/notes.xml lib/asn1/vsn.mk otp_versions.table
2018-08-03erts: Fix seq_trace to not clear token for system messagesLukas Larsson
A lot of erts internal messages used behind APIs to create non-blocking calls, e.g. port_command, would cause the seq_trace token to be cleared from the caller when it should not. This commit fixes that and adds asserts that makes sure that all messages sent have to correct token set. Fixes: ERL-602
2018-08-03Merge branch 'lukas/erts/fix_udp_realloc_bug' into maintLukas Larsson
* lukas/erts/fix_udp_realloc_bug: erts: Limit the automatic max buffer for UDP to 2^16 erts: Free udp buffer when getting EAGAIN
2018-08-02Prepare releaseErlang/OTP
2018-08-02Fix NIF stack recursion bug and enforce a limitRaimo Niskanen
Fix recursion bug when decoding Constructed value within another value - here the allowed buffer for the recursed decode shall only be the size of the enclosing value, not the whole buffer. Return ASN1_ERROR if BER decode recurses more than about 8 kWords.
2018-08-01Fixes ERL-675Stevie Graham
RSA options rsa_mgf1_md, rsa_oaep_md, and rsa_oaep_label do not work. PR #838, which reimplemented various parts of the crypto application to use OpenSSL EVP APIs was merged manually. During the manual merge the macro define for HAVE_RSA_OAEP_MD was lost. The result being that setting rsa_mgf1_md and rsa_oaep_md for any other value than sha causes the nif to return not_sup. Support for configurable MGF1 digests and OAEP labels is available in OpenSSL version 1.1.0, a cursory look at libressl does not seem to reveal support, so it is not added in this PR. The defective functionality has been returned by defining HAVE_RSA_OAEP_MD alongside HAVE_CHACHA20_POLY1305, i.e. OpenSSL >= 1.1.0 and NOT libressl.
2018-07-31tomas-abrahamsson/dialyzer-syntax-tools/PR-1888/OTP-15207Lukas Larsson
Fix spec for erl_syntax_lib:analyze_type_application/1
2018-07-30erts: Limit the automatic max buffer for UDP to 2^16Lukas Larsson
There is no reason to have a larger buffer than this as the recvmsg call will never return more data. OTP-15206
2018-07-26Merge branch 'maint-21' into maintJohn Högberg
2018-07-24Merge branch 'maint-20' into maintJohn Högberg
* maint-20: Updated OTP version Prepare release ssl: Engine key trumps certfile option inets: Prepare for release inets: Improve error handling
2018-07-23Merge pull request #1887 from goofansu/xmerl/string-equiv-typo-fixLukas Larsson
Fix typo in xmerl_scan:string/1
2018-07-23Fix typo in xmerl_scan:string/1YeJun Su
2018-07-20Fix spec for erl_syntax_lib:analyze_type_application/1Tomas Abrahamsson
2018-07-20Merge PR-1881 from f3c0/mnesia-spec-fix OTP-15201Sverker Eriksson
fix type spec of mnesia:change_config
2018-07-20Prepare releaseErlang/OTP
2018-07-20Merge branch ↵Erlang/OTP
'ingela/inets/error-handling-eisdir-mod-get/ERIERL-207/OTP-15192' into maint-20 * ingela/inets/error-handling-eisdir-mod-get/ERIERL-207/OTP-15192: inets: Prepare for release inets: Improve error handling
2018-07-20Merge branch 'sverker/ic/encode-long-buffer-overflow/OTP-15179' into maint-20Erlang/OTP
* sverker/ic/encode-long-buffer-overflow/OTP-15179: ic: Tweak tests to provoke more outbuf reallocations ic: Fix memory leak in oe_ei_decode_wstring ic: Fix correct external format sizes
2018-07-20Merge branch 'ingela/ssl/engine-vs-certfile/ERLERL-211/OTP-15193' into maint-20Erlang/OTP
* ingela/ssl/engine-vs-certfile/ERLERL-211/OTP-15193: ssl: Engine key trumps certfile option
2018-07-20Merge branch 'ingela/maint-20/chipher-suite-handling/OTP-15178' into maint-20Erlang/OTP
* ingela/maint-20/chipher-suite-handling/OTP-15178: ssl: Prepare for release ssl: Fix test case to only check relevant info for the test ssl: Correct connection_information on ECC-curves ssl: No cipher suite sign restriction in TLS-1.2 ssl: Add psk as anonymous key exchange in ssl_handshake:select_hashsign/5 ssl: anon test should use dh or ecdh anon keyexchange ssl: Correct key_usage check ssl: Fix ECDSA key decode clause ssl: Avoid hardcoding of cipher suites and fix ECDH suite handling ssl: Run all test case combinations ssl: Correct ECC suite and DTLS ECC handling
2018-07-19add more specific type spec for mnesia:change_configFerenc Böröczki
2018-07-18fix return type of mnesia:change_configFerenc Böröczki
2018-07-18kernel: Improve net_ticktime docsSverker Eriksson
2018-07-18Merge branch 'sverker/erl_interface/valgrind/OTP-15171' into maintSverker Eriksson
* sverker/erl_interface/valgrind/OTP-15171: erl_interface: Fix bug in ei_*receive_msg* functions erl_interface: Seal test case memory leaks erl_interface: Initialize erl_errno to zero erts: Remove use of VALGRIND_PRINTF_XML erl_interface: Add valgrind ability for test port programs erts: Fix benign bug in cerl for valgrind erts: Fix buggy calls to erts_sys_explicit_8bit_getenv
2018-07-18erl_interface: Fix bug in ei_*receive_msg* functionsSverker Eriksson
2018-07-18erl_interface: Seal test case memory leaksSverker Eriksson
to appease valgrind.
2018-07-18erl_interface: Initialize erl_errno to zeroSverker Eriksson
Makes valgrind happy.
2018-07-18Merge pull request #1875 from ↵John Högberg
jhogberg/john/compiler/fix-varsize-binary-comprehension/OTP-15186/ERL-665 Fix a crash when compiling variable-sized binary comprehensions
2018-07-18Fix node crash on passing bad arguments to file:read_file_info/2John Högberg
2018-07-17ssl: Improve error messageIngela Anderton Andin
2018-07-17ssl: Engine key trumps certfile optionIngela Anderton Andin
2018-07-17inets: Prepare for releaseIngela Anderton Andin
2018-07-17inets: Improve error handlingIngela Anderton Andin
2018-07-16Merge pull request #1873 from sunboshan/patch-2Sverker Eriksson
Fix typo in logger docs