aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2018-07-20Merge branch 'peterdmv/ssl/version_extension_updates/OTP-15059'Péter Dimitrov
* peterdmv/ssl/version_extension_updates/OTP-15059: ssl: Fix handling of TLS record versions ssl: Update hello state (TLS 1.3) ssl: Implement 'supported_versions' extension ssl: Sort supported versions in handle_options ssl: Add experimental version 'tlsv1.3' Change-Id: I071d24242103cc066c5ee8154effc5ee01b04703
2018-07-20Merge branch 'maint'Sverker Eriksson
2018-07-20Merge PR-1881 from f3c0/mnesia-spec-fix OTP-15201Sverker Eriksson
fix type spec of mnesia:change_config
2018-07-20Merge PR-1878 from michalmuskala/mm/map-new-bif-2 OTP-15200Sverker Eriksson
maps:new/0 is no longer a BIF
2018-07-19ssl: Fix handling of TLS record versionsPéter Dimitrov
- Introduce new macro ALL_TLS_RECORD_VERSIONS to decouple ALL_AVAILABLE_VERSIONS from the list of valid TLS record versions. It consists of versions allowed in TLSCiphertext.version (TLS 1.2 and prior) and TLSCiphertext.legacy_record_version (TLS 1.3). - TLS 1.3 sets TLSCiphertext.legacy_record_version to 0x0303 for all records generated other than an initial ClientHello, where it MAY also be 0x0301. - TLSPlaintext.legacy_record_version is ignored. Change-Id: Iabb1a954ab21f8be012e6460ae99ab533e31e123
2018-07-19ssl: Update hello state (TLS 1.3)Péter Dimitrov
Update hello state to handle the "supported_versions" extension defined by TLS 1.3: - If "supported_versions" is present in ServerHello, the client will aboirt the handshake with an "illegal_parameter" alert. - If "supported_versions" is present in ClientHello, the server will select a version from "supported_versions" and ignore ClientHello.legacy_version. If it only supports versions greater than "supported_versions", the server aborts the handshake with a "protocol_version" alert. - If "supported_versions" is absent in ClientHello, the server negotiates the minimum of ClientHello.legacy_version and TLS 1.2. If it only supports version greater than ClientHello.legacy_version, the server aborts the handshake with a "protocol_version" alert. Change-Id: I16eef15d77bf21209c6cc103546ddddca518483b
2018-07-19ssl: Implement 'supported_versions' extensionPéter Dimitrov
Change-Id: I8bb015e97ab4c317ef380123cf94350ed509c36f
2018-07-19ssl: Sort supported versions in handle_optionsPéter Dimitrov
Sort supported versions (highest first) in handle options to reflect the order expected by TLS 1.3. Change-Id: I06bb43ac81eeaca681c122d815a024c8444e3726
2018-07-19Merge branch 'maint'Sverker Eriksson
2018-07-19ssl: Add experimental version 'tlsv1.3'Péter Dimitrov
- Add 'tlsv1.3' to the available versions. It can be used to trigger experimental behavior while implementing TLS 1.3. - Add dummy clauses for handling version {3,4} of TLS. - Update ssl_logger to handle unknown versions of TLS. Change-Id: I564ffa47dca18b59f0dc16c9809dfd7adaf2d333
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 'maint'Sverker 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 branch 'maint'John Högberg
* maint: Abort size calculation when a matched-out variable is used
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-18Merge pull request #1812 from michalmuskala/mm/make-fun-loaderJohn Högberg
Optimise creation of anonymous functions
2018-07-17maps:new/0 is no longer a BIFMichał Muskała
Implementing it in Erlang allows taking advantage of the literal pool optimisation, this means the function implemented in Erlang does no allocations, while the BIF had to allocate new map each time it was called. Benchmarks show the function is also slightly faster now.
2018-07-17Optimise creation of anonymous functionsMichał Muskała
This introduces a similar optimisation for normal funs to what was introduced for external funs in #1725. It is possible to allocate the fun as a literal, if it does not capture the environment (i.e. it does not close over any variables). Unfortunately it's not possible to do this in the compiler due to problems with representation of such functions in the `.beam` files. Fortunately, we can do this in the loader. Simple evaluation shows that functions that don't capture the enviornment consistute over 60% of all funs in the source code of Erlang/OTP itself. The only downside is that we lose a meningful value in the `pid` field of the fun. The goal of this field, beyond debugging, was to be able to identify the original node of a function. To be able to still do this, the functions that are created in the loader are assigned the init pid as the creator. To solve issues with staryp, initially set the `erts_init_process_id` to `ERTS_INVALID_PID` and skip the described optimisation if the value is still uninitialised.
2018-07-16Merge branch 'maint'Sverker Eriksson
2018-07-16Merge pull request #1873 from sunboshan/patch-2Sverker Eriksson
Fix typo in logger docs
2018-07-16Merge branch 'maint'Sverker Eriksson
2018-07-16Merge branch 'sverker/erl_interface/ei_connect_init-thread-safe/OTP-15191' ↵Sverker Eriksson
into maint
2018-07-16erl_interface: Add valgrind ability for test port programsSverker Eriksson
Run under valgrind if environment variable VALGRIND_LOG_DIR is set.
2018-07-16Merge branch 'maint'Lukas Larsson
2018-07-16Merge branch 'lukas/clean_doc_xmldir/OTP-15190' into maintLukas Larsson
* lukas/clean_doc_xmldir/OTP-15190: docs: make clean all XMLDIR
2018-07-16Abort size calculation when a matched-out variable is usedJohn Högberg
Referencing a matched-out variable in a size expression makes it impossible to calculate the size of the result based on the size of the matched binary. The compiler would still generate code to do this however, which would crash since the variable isn't defined at the size calculation.
2018-07-14Fix typo in logger docssunboshan
2018-07-13docs: make clean all XMLDIRLukas Larsson
2018-07-13Merge branch 'maint'Rickard Green
* maint: Updated OTP version Update release notes Update version numbers Fix trace_info/2 Provide build support for standalone corba repo Fix release notes for OTP-21.0.2 Move to a dirty scheduler even when we have pending system tasks
2018-07-13Merge branch 'maint-21' into maintRickard Green
* maint-21: Updated OTP version Update release notes Update version numbers Fix trace_info/2 Provide build support for standalone corba repo Fix release notes for OTP-21.0.2 Move to a dirty scheduler even when we have pending system tasks
2018-07-13Merge branch 'maint'Siri Hansen
2018-07-13Merge branch 'siri/logger/post-21/OTP-15132' into maintSiri Hansen
* siri/logger/post-21/OTP-15132: [logger] Allow setting kernel parameter 'logger_level' to 'all' [kernel] Reduce risk of dead lock when terminating logger_sup [logger] Fix regexp replacement for unicode strings Update proc_lib:report_cb to obey logger formatter's size limiting params [logger] Allow report callback with two arguments returning a string Don't call report_cb from cth_log_redirect - formatter does that Add legacy test of sasl_report_file_h and size limiting [logger] Remove compiler warnings in test [logger] Fix problem with test cases waiting for handler restart [logger] Add ?LOG macro which takes Level as argument [logger] Improve spec for set_handler_config/3 and set_primary_config/2 [logger] Generate .png file from .dia [logger] Update documentation
2018-07-13[logger] Allow setting kernel parameter 'logger_level' to 'all'Siri Hansen
2018-07-13[kernel] Reduce risk of dead lock when terminating logger_supSiri Hansen
2018-07-13[logger] Fix regexp replacement for unicode stringsSiri Hansen
2018-07-13Update proc_lib:report_cb to obey logger formatter's size limiting paramsSiri Hansen
2018-07-13[logger] Allow report callback with two arguments returning a stringSiri Hansen
If the report callback is a fun of arity 2, then the second argument is a map with the keys 'encoding', 'depth' and 'chars_limit', and the fun must return a string which is size limited according to the given depth and chars_limit. If the report callback is a fun of arity 1, then it must return a tuple containing a format string and a list of arguments. The formatter will produce the string, and limit it's size.
2018-07-13Don't call report_cb from cth_log_redirect - formatter does thatSiri Hansen
2018-07-13Add legacy test of sasl_report_file_h and size limitingSiri Hansen
2018-07-13[logger] Remove compiler warnings in testSiri Hansen
2018-07-13[logger] Fix problem with test cases waiting for handler restartPeter Andersson
2018-07-13[logger] Add ?LOG macro which takes Level as argumentSiri Hansen
2018-07-13[logger] Improve spec for set_handler_config/3 and set_primary_config/2Siri Hansen
Specify which keys and associated values are allowed.
2018-07-13[logger] Generate .png file from .diaSiri Hansen
2018-07-12erl_interface: Make ei_connect_init more thread safeSverker Eriksson
by not using unsafe ei_gethostbyname.