diff options
118 files changed, 4269 insertions, 629 deletions
diff --git a/OTP_VERSION b/OTP_VERSION index e9f5a5d36d..1c847c53ee 100644 --- a/OTP_VERSION +++ b/OTP_VERSION @@ -1 +1 @@ -23.0-rc3 +24.0-rc0 diff --git a/bootstrap/lib/stdlib/ebin/otp_internal.beam b/bootstrap/lib/stdlib/ebin/otp_internal.beam Binary files differindex 547f105df8..c712df50d0 100644 --- a/bootstrap/lib/stdlib/ebin/otp_internal.beam +++ b/bootstrap/lib/stdlib/ebin/otp_internal.beam diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 14f9b5a79f..9b2605d3e4 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -375,7 +375,7 @@ Z = erlang:adler32_combine(X,Y,iolist_size(Data2)).</code> </func> <func> - <name name="atom_to_binary" arity="1" since="OTP @OTP-15995@"/> + <name name="atom_to_binary" arity="1" since="OTP 23.0"/> <fsummary>Return the binary representation of an atom.</fsummary> <desc> <p> @@ -457,7 +457,7 @@ Z = erlang:adler32_combine(X,Y,iolist_size(Data2)).</code> </func> <func> - <name name="binary_to_atom" arity="1" since="OTP @OTP-15995@"/> + <name name="binary_to_atom" arity="1" since="OTP 23.0"/> <fsummary>Convert from text representation to an atom.</fsummary> <desc> <p> @@ -493,7 +493,7 @@ Z = erlang:adler32_combine(X,Y,iolist_size(Data2)).</code> </func> <func> - <name name="binary_to_existing_atom" arity="1" since="OTP @OTP-15995@"/> + <name name="binary_to_existing_atom" arity="1" since="OTP 23.0"/> <fsummary>Convert from text representation to an atom.</fsummary> <desc> <p> @@ -2147,25 +2147,6 @@ true</pre> </func> <func> - <name name="get_stacktrace" arity="0" since=""/> - <fsummary>Get the call stack back-trace of the last exception.</fsummary> - <type name="stack_item"/> - <desc> - <warning><p><c>erlang:get_stacktrace/0</c> is deprecated and - will be removed in OTP 24. Starting from OTP 23, - <c>erlang:get_stacktrace/0</c> returns <c>[]</c>.</p></warning> - <p>Instead of using <c>erlang:get_stacktrace/0</c> to retrieve - the call stack back-trace, use the following syntax:</p> -<pre> -try Expr -catch - Class:Reason:Stacktrace -> - {Class,Reason,Stacktrace} -end</pre> - </desc> - </func> - - <func> <name name="group_leader" arity="0" since=""/> <fsummary>Get the group leader for the calling process.</fsummary> <desc> @@ -6315,7 +6296,7 @@ true</pre> </func> <func> - <name name="spawn_monitor" arity="2" since="OTP @OTP-15251@"/> + <name name="spawn_monitor" arity="2" since="OTP 23.0"/> <fsummary>Create and monitor a new process with a fun as entry point. </fsummary> <desc> @@ -6346,7 +6327,7 @@ true</pre> </func> <func> - <name name="spawn_monitor" arity="4" since="OTP @OTP-15251@"/> + <name name="spawn_monitor" arity="4" since="OTP 23.0"/> <fsummary>Create and monitor a new process with a function as entry point. </fsummary> <desc> @@ -6564,7 +6545,7 @@ true</pre> </func> <func> - <name name="spawn_request" arity="1" since="OTP @OTP-15251@"/> + <name name="spawn_request" arity="1" since="OTP 23.0"/> <fsummary>Asynchronously send a request to spawn a new process.</fsummary> <desc> <p> @@ -6576,7 +6557,7 @@ true</pre> </func> <func> - <name name="spawn_request" arity="2" clause_i="1" since="OTP @OTP-15251@"/> + <name name="spawn_request" arity="2" clause_i="1" since="OTP 23.0"/> <fsummary>Asynchronously send a request to spawn a new process.</fsummary> <desc> <p> @@ -6588,7 +6569,7 @@ true</pre> </func> <func> - <name name="spawn_request" arity="2" clause_i="2" since="OTP @OTP-15251@"/> + <name name="spawn_request" arity="2" clause_i="2" since="OTP 23.0"/> <fsummary>Asynchronously send a request to spawn a new process.</fsummary> <desc> <p> @@ -6600,7 +6581,7 @@ true</pre> </func> <func> - <name name="spawn_request" arity="3" clause_i="1" since="OTP @OTP-15251@"/> + <name name="spawn_request" arity="3" clause_i="1" since="OTP 23.0"/> <fsummary>Asynchronously send a request to spawn a new process.</fsummary> <desc> <p> @@ -6620,7 +6601,7 @@ true</pre> </func> <func> - <name name="spawn_request" arity="3" clause_i="2" since="OTP @OTP-15251@"/> + <name name="spawn_request" arity="3" clause_i="2" since="OTP 23.0"/> <fsummary>Asynchronously send a request to spawn a new process.</fsummary> <desc> <p> @@ -6632,7 +6613,7 @@ true</pre> </func> <func> - <name name="spawn_request" arity="4" clause_i="1" since="OTP @OTP-15251@"/> + <name name="spawn_request" arity="4" clause_i="1" since="OTP 23.0"/> <fsummary>Asynchronously send a request to spawn a new process.</fsummary> <desc> <p> @@ -6644,7 +6625,7 @@ true</pre> </func> <func> - <name name="spawn_request" arity="4" clause_i="2" since="OTP @OTP-15251@"/> + <name name="spawn_request" arity="4" clause_i="2" since="OTP 23.0"/> <fsummary>Asynchronously send a request to spawn a new process.</fsummary> <desc> <p> @@ -6656,7 +6637,7 @@ true</pre> </func> <func> - <name name="spawn_request" arity="5" since="OTP @OTP-15251@"/> + <name name="spawn_request" arity="5" since="OTP 23.0"/> <fsummary>Asynchronously send a request to spawn a new process.</fsummary> <desc> <p> @@ -6893,7 +6874,7 @@ true</pre> </func> <func> - <name name="spawn_request_abandon" arity="1" since="OTP @OTP-15251@"/> + <name name="spawn_request_abandon" arity="1" since="OTP 23.0"/> <fsummary>Abandon a previously issued spawn request.</fsummary> <desc> <p> @@ -10217,7 +10198,7 @@ hello </func> <func> - <name name="term_to_iovec" arity="1" since="OTP @OTP-15618@"/> + <name name="term_to_iovec" arity="1" since="OTP 23.0"/> <fsummary>Encode a term to an Erlang external term format as iovec(). </fsummary> <desc> @@ -10242,7 +10223,7 @@ hello </func> <func> - <name name="term_to_iovec" arity="2" since="OTP @OTP-15618@"/> + <name name="term_to_iovec" arity="2" since="OTP 23.0"/> <fsummary>Encode a term to en Erlang external term format as iovec(). </fsummary> <desc> diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 5ad026f8e4..cdee14a460 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,675 @@ </header> <p>This document describes the changes made to the ERTS application.</p> +<section><title>Erts 11.0.1</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + The functionality utilized by BIFs for temporary + disabling of garbage collection while yielding could + cause system task queues to become inconsistent on a + process executing such a BIF. Process system tasks are + for example utilized when purging code, garbage + collecting literal data, and when issuing an ordinary + garbage collection from another process.</p> + <p> + The bug does not trigger frequently. Multiple code purges + in direct sequence makes it more likely that this bug is + triggered. In the cases observed, this has resulted in a + hanging code purge operation.</p> + <p> + Own Id: OTP-16639 Aux Id: ERL-1236 </p> + </item> + <item> + <p> + SCTP and UDP recv/2,3 hangs indefinitely if socket is + closed while recv is called (socket in passive mode).</p> + <p> + Own Id: OTP-16654 Aux Id: ERL-1242 </p> + </item> + </list> + </section> + +</section> + +<section><title>Erts 11.0</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p>BIFs now behave like ordinary functions with regard to + tracing, allowing <c>call_count</c> tracing and fixing a + few bugs where return trace messages were lost when BIFs + tail-called themselves or other functions + ("trapping").</p> + <p> + Own Id: OTP-14734 Aux Id: ERL-496 </p> + </item> + <item> + <p> + Fix various compiler warnings on 64-bit Windows.</p> + <p> + Own Id: OTP-15800</p> + </item> + <item> + <p><c>erlang:fun_info(fun foo/1, name/1)</c> used to + return a function name based on the name of the function + that <c>fun foo/1</c> was used in. The name returned is + now <c>-fun.foo/1-</c>.</p> + <p> + Own Id: OTP-15837</p> + </item> + <item> + <p><c>file:allocate/3</c> will now update the file size + on all platforms.</p> + <p> + Own Id: OTP-16155 Aux Id: PR-2408 </p> + </item> + <item> + <p> + <c>erlang:decode_packet</c> with type set to <c>httph</c> + no longer accepts http headers that have whitespaces in + between the header name and the colon. That is:</p> + <p> + <c> Content-Type : text/html </c></p> + <p> + is no longer allowed. This has been changed to conform + with RFC 7230 and thus protect against http desync + attacks.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16168 Aux Id: ERL-1053 </p> + </item> + <item> + <p> + Fix the quoting rules in <c>erl -args_file</c>, + <c>ERL_FLAGS</c>, <c>ERL_AFLAGS</c> and <c>ERL_ZFLAGS</c> + to work as unix sh quoting.</p> + <p> + This bug fix can make previous configuration options to + <c>erl</c> passed through <c>ERL_FLAGS</c>, + <c>ERL_AFLAGS</c>, <c>ERL_ZFLAGS</c> or <c>-args_file</c> + not be interpreted in the same way as before the fix.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16244 Aux Id: ERL-1051 </p> + </item> + <item> + <p> + Fix the Erlang distribution to handle the scenario when a + node connects that can handle message fragmentation but + can not handle the atom cache. This bug only affects + users that have implemented a custom distribution + carrier. It has been present since OTP-21.</p> + <p> + The <c>DFLAG_FRAGMENT</c> distribution flag was added to + the set of flags that can be rejected by a distribution + implementation.</p> + <p> + Own Id: OTP-16284</p> + </item> + <item> + <p> + Compiling a match specification with excessive nesting + caused the runtime system to crash due to scheduler stack + exhaustion. Instead of crashing the runtime system, + effected functions will now raise a <c>system_limit</c> + error exception in this situation.</p> + <p> + Own Id: OTP-16431 Aux Id: ERL-592 </p> + </item> + <item> + <p>Fixed a bug that prevented Erlang from being started + on Windows if it were installed on certain paths.</p> + <p> + Own Id: OTP-16478 Aux Id: ERL-1115 </p> + </item> + <item> + <p>Fix bug on Windows causing bad performance when + standard input is closed, especially if the VM is only + assigned one CPU core. Could be provoked for example by + starting erl or escript via function <c>os:cmd/1</c>. + Could be avoided with command line option + <c>-noinput</c>.</p> <p>The bad performance was caused by + an io thread spinning indefinitely.</p> + <p> + Own Id: OTP-16521 Aux Id: ERL-716 </p> + </item> + <item> + <p>Fixed a bug on Unix platforms that would cause + <c>file:read_file_info/1</c> to return incorrect results + if the emulator's effective user or group id differed + from its actual ones.</p> + <p> + Own Id: OTP-16571</p> + </item> + <item> + <p> + socket: Compile problems on Android when PACKET_FASTROUTE + and PACKET_USER are both defined and has the same value. + Use of PACKET_FASTROUTE has been removed as it may be + unused and also only for none user-land.</p> + <p> + Own Id: OTP-16576 Aux Id: ERL-1208 </p> + </item> + <item> + <p> + Fixed bug in erl_crash.dump generation that could cause a + SEGV core dump if a recently cancelled timer was found.</p> + <p> + Own Id: OTP-16596 Aux Id: ERL-1105, PR-2606 </p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Improved concurrency of <c>erlang:load_nif/2</c> as it + does no longer block other schedulers from executing + during initial load of a NIF library.</p> + <p> + Own Id: OTP-10278</p> + </item> + <item> + <p>EEP-52 has been implemented.</p> + <p>In binary matching, the size of the segment to be + matched is now allowed to be a guard expression, and + similarly in map matching the keys can now be guard + expressions. See the Erlang Reference Manual and + Programming Examples for more details.</p> + <p>Language compilers or code generators that generate + Core Erlang code may need to be updated to be compatible + with the compiler in OTP 23. For more details, see the + section Backwards Compatibility in <url + href="http://erlang.org/eeps/eep-0052.html">EEP + 52</url>.</p> + <p> + Own Id: OTP-14708</p> + </item> + <item> + <p>Internally in BEAM, handling of continuation pointers + has been simplified. This change is not user-visible, + except when examing a process stack in the crashdump + viewer. The continuation pointer for a function will now + be stored below the y(0) for that function.</p> + <p> + Own Id: OTP-15077</p> + </item> + <item> + <p><c>seq_trace</c> tokens are now propagated to spawned + processes.</p> + <p> + Own Id: OTP-15232 Aux Id: ERL-700 </p> + </item> + <item> + <p>Improvements of distributed spawn operations. These + include both scalability and performance improvements as + well as new functionality.</p> <p>New functionality:</p> + <list> <item><p>A distributed <seemfa + marker="erts:erlang#spawn_monitor/4"><c>spawn_monitor()</c></seemfa> + BIF.</p></item> <item><p>Support for <c>monitor</c> + option in the distributed <seemfa + marker="erts:erlang#spawn_opt/5"><c>spawn_opt()</c></seemfa> + BIF.</p></item> <item><p>New <seemfa + marker="erts:erlang#spawn_request/5"><c>spawn_request()</c></seemfa> + BIFs for asynchronous spawn of processes. + <c>spawn_request()</c> supports all options that + <c>spawn_opt()</c> support plus a few more.</p></item> + </list> + <p> + Own Id: OTP-15251</p> + </item> + <item> + <p> + Make <c>ets:insert/2</c> and <c>ets:insert_new/2</c> + yield scheduler execution on long lists of records to + insert.</p> + <p> + Own Id: OTP-15517 Aux Id: ERL-560 </p> + </item> + <item> + <p> + Increased size of node incarnation numbers (aka + "creation"), from 2 bits to 32 bits. This will reduce the + risk of pids/ports/refs, from different node incarnation + with the same name, being mixed up.</p> + <p> + Own Id: OTP-15603</p> + </item> + <item> + <p>The runtime system can now encode Erlang terms to the + Erlang external term format as I/O vectors. The main + benefit of this is that reference counted binaries can be + referred to directly instead of copied into a new + binary.</p> <p>The default Erlang distribution over TCP + will always utilize this. Alternate distribution + implementations utilizing a port as distribution + controller will utilize this if the driver implements the + <seecref + marker="erts:driver_entry#outputv"><c>outputv</c></seecref> + callback. Alternate Erlang distribution implementations + utilizing a process as distribution controller will + utilize this if I/O vectors are utilized by the + functionality that processes the data returned from + <seemfa + marker="erts:erlang#dist_ctrl_get_data/1"><c>erlang:dist_ctrl_get_data()</c></seemfa>.</p> + <p>The return type for data returned by <seemfa + marker="erts:erlang#dist_ctrl_get_data/1"><c>erlang:dist_ctrl_get_data()</c></seemfa> + has been changed from <c>iodata()</c> to <c>iovec()</c>. + Note that <c>iovec()</c> data is valid <c>iodata()</c> so + old implementations using + <c>erlang:dist_ctrl_get_data()</c> do not need to be + changed, but may benefit from being changed depending on + usage scenario.</p> <p>The new BIFs <seemfa + marker="erts:erlang#term_to_iovec/1"><c>term_to_iovec/1</c></seemfa> + and <seemfa + marker="erts:erlang#term_to_iovec/2"><c>term_to_iovec/2</c></seemfa> + have been introduced. These work exactly as + <c>term_to_binary()</c> with the corresponding arity + except the return type.</p> + <p> + Own Id: OTP-15618</p> + </item> + <item> + <p>Improved ETS scalability of concurrent calls that + change the size of a table, like <c>ets:insert/2</c> and + <c>ets:delete/2</c>.</p> <p>This performance feature was + implemented for <c>ordered_set</c> in OTP 22.0 and does + now apply for all ETS table types.</p> <p>The improved + scalability may come at the cost of longer latency of + <c>ets:info(T,size)</c> and <c>ets:info(T,memory)</c>. A + new table option <c>decentralized_counters</c> has + therefore been added. It is default <c>true</c> for + <c>ordered_set</c> with <c>write_concurrency</c> enabled + and default <c>false</c> for all other table types.</p> + <p> + Own Id: OTP-15744 Aux Id: OTP-15623, PR-2229 </p> + </item> + <item> + <p>Directories can now be opened by <c>file:open/2</c> + when passing the <c>directory</c> option.</p> + <p> + Own Id: OTP-15835 Aux Id: PR-2212 </p> + </item> + <item> + <p> + Add Hygon Dhyana as known processor to enable support for + atomic operations.</p> + <p> + Own Id: OTP-15840</p> + </item> + <item> + <p> + Make <c>erlang:phash2</c> functions consume reductions + proportional to the size of the input term and yield + scheduler when reductions are depleted.</p> + <p> + Own Id: OTP-15842 Aux Id: PR-2182 </p> + </item> + <item> + <p> + Fix various build issues when compiling Erlang/OTP to the + IBM AIX platform.</p> + <p> + Own Id: OTP-15866 Aux Id: PR-2110 </p> + </item> + <item> + <p> + Add configure options <c>--enable-pie</c> and + <c>--disable-pie</c> to control the build of position + independent executables.</p> + <p> + Own Id: OTP-15868</p> + </item> + <item> + <p><c>file:read_file_info/2</c> can now be used on opened + files and directories.</p> + <p> + Own Id: OTP-15956 Aux Id: PR-2231 </p> + </item> + <item> + <p> + Add arity-1 versions of <c>atom_to_binary</c>, + <c>binary_to_atom</c> and <c>binary_to_existing_atom</c>, + all with <c>utf8</c> as default encoding.</p> + <p> + Own Id: OTP-15995 Aux Id: PR-2358 </p> + </item> + <item> + <p> + Optimized the erts internal hash table implementation for + faster lookups. The internal hash is used for things + like; the process registry, executing erlang:apply/2, + executing M:func(test), and more.</p> + <p> + Own Id: OTP-16014 Aux Id: PR-2345 </p> + </item> + <item> + <p>CPU quotas are now taken into account when deciding + the default number of online schedulers, improving + performance in container environments where quotas are + applied, such as <c>docker</c> with the <c>--cpus</c> + flag.</p> + <p> + Own Id: OTP-16105 Aux Id: ERL-927 </p> + </item> + <item> + <p> + The <c>-config</c> option to <c>erl</c> now can take + multiple config files without repeating the + <c>-config</c> option. Example:</p> + <p> + erl -config sys local</p> + <p> + Own Id: OTP-16148 Aux Id: PR-2373 </p> + </item> + <item> + <p> + Removed the <c>scheduler_poll</c> and <c>async I/O</c> + dtrace and LTTng trace probes.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16215</p> + </item> + <item> + <p> + Optimized <c>persistent_term:put/2</c> and <c>erase/1</c> + to consume less CPU in many cases.</p> + <p> + Own Id: OTP-16237 Aux Id: PR-2389 </p> + </item> + <item> + <p>The possibility to run Erlang distribution without + relying on EPMD has been extended. To achieve this a + couple of new options to the inet distribution has been + added.</p> <taglist> <tag>-dist_listen false</tag> + <item>Setup the distribution channel, but do not listen + for incoming connection. This is useful when you want to + use the current node to interact with another node on the + same machine without it joining the entire + cluster.</item> <tag>-erl_epmd_port Port</tag> + <item>Configure a default port that the built-in EPMD + client should return. This allows the local node to know + the port to connect to for any other node in the + cluster.</item> </taglist> <p>The <c>erl_epmd</c> + callback API has also been extended to allow returning + <c>-1</c> as the creation which means that a random + creation will be created by the node.</p> + <p>In addition a new callback function called + <c>listen_port_please</c> has been added that allows the + callback to return which listen port the distribution + should use. This can be used instead of + <c>inet_dist_listen_min/max</c> if the listen port is to + be fetched from an external service.</p> + <p> + Own Id: OTP-16250</p> + </item> + <item> + <p> + On systems without <c>closefrom()</c>, such as Linux, + iterating over all possible file descriptors and calling + <c>close()</c> for each is inefficient. This is markedly + so when the maximum number of file descriptors has been + tuned to a large number.</p> + <p> + Instead, in erl_child_setup, walk the open descriptors + under <c>/dev/fd</c> and close only those which are open.</p> + <p> + This optimization affects the CPU usage of starting a new + Erlang instance.</p> + <p> + Own Id: OTP-16270</p> + </item> + <item> + <p> + Optimized <c>maps:merge/2</c> for trivial cases of an + empty map(s) or same map.</p> + <p> + Own Id: OTP-16283 Aux Id: PR-2441 </p> + </item> + <item> + <p> + The new experimental <c>socket</c> module has been moved + to the Kernel application.</p> + <p> + Own Id: OTP-16312</p> + </item> + <item> + <p>Improved the presentation of allocations and carriers + in the <c>instrument</c> module.</p> + <p> + Own Id: OTP-16327</p> + </item> + <item> + <p> + As announced in OTP 22.0, the previously existing limited + support for VxWorks has now been removed.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16329 Aux Id: OTP-15621 </p> + </item> + <item> + <p> The return value when using the <c>httph</c> and + <c>httph_bin</c> option to <c>erlang:decode_packet/3</c> + and <c>inet:setopts/2</c> has been changed to also + include the original header unmodified. See <seemfa + marker="erlang#decode_packet/3"><c>erlang:decode_packet/3</c></seemfa>. + Example: </p> <pre> > + erlang:decode_packet(httph_bin,<<"HELLO: + hi\r\n\r\n">>,[]). + {ok,{http_header,0,<<"Hello">>,<<"HELLO">>,<<"hi">>},<<"\r\n">>} + </pre> + <p> + Own Id: OTP-16347 Aux Id: PR-2466 </p> + </item> + <item> + <p> + Ensure <c>net_kernel:monitor_nodes/1</c> sends + <c>nodedown</c> messages of a failed connection before + <c>nodeup</c> messages of a reestablished connection + toward the same node.</p> + <p> + Own Id: OTP-16362</p> + </item> + <item> + <p> + Update of <seeerl + marker="kernel:seq_trace#whatis">sequential + tracing</seeerl> to also support other information + transfers than message passing.</p> + <p> + Own Id: OTP-16370 Aux Id: OTP-15251, OTP-15232 </p> + </item> + <item> + <p> + socket: It is now possible to create a socket from an + already existing file descriptor.</p> + <p> + Own Id: OTP-16398 Aux Id: ERL-1154 </p> + </item> + <item> + <p> + socket: The socket:supports/1 function now also report if + netns is supported or not.</p> + <p> + Own Id: OTP-16432</p> + </item> + <item> + <p><c>=:=</c> has been optimized to return <c>false</c> + immediately when comparing two maps of different + sizes.</p> + <p> + Own Id: OTP-16454</p> + </item> + <item> + <p> + Changed the behaviour of passing the <c>erl</c> command + line argument <seecom + marker="erts:erl#async_thread_pool_size"><c>+A + 0</c></seecom> to silently imply <c>+A 1</c>. That is, it + will no longer be possible to completely disable the + async thread pool. Disabling of the async thread pool has + since OTP 21 had no benefits; only lots of drawbacks.</p> + <p> + Own Id: OTP-16482</p> + </item> + <item> + <p>The deprecated <c>erlang:get_stacktrace/0</c> BIF now + returns an empty list instead of a stacktrace. To + retrieve the stacktrace, use the extended try/catch + syntax that was introduced in OTP 21. + <c>erlang:get_stacktrace/0</c> is scheduled for removal + in OTP 24.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16484</p> + </item> + <item> + <p> + <seemfa + marker="erts:init#restart/1"><c>init:restart/1</c></seemfa> + has been introduced. <c>init:restart/1</c> can be + utilized for changing the code loading mode during a + restart.</p> + <p> + Own Id: OTP-16492 Aux Id: PR-2461 </p> + </item> + <item> + <p> + Improve configure for the net nif, which should increase + portability.</p> + <p> + Own Id: OTP-16530 Aux Id: OTP-16464 </p> + </item> + <item> + <p> + socket: Socket counters and socket global counters are + now represented as maps (instead of property lists).</p> + <p> + Own Id: OTP-16535</p> + </item> + <item> + <p>Reduced the resource usage of <c>erlc</c> in parallel + builds (e.g. <c>make -j128</c>).</p> + <p> + Own Id: OTP-16543 Aux Id: ERL-1186 </p> + </item> + <item> + <p> + The experimental socket module has gotten restrictions + removed so now the 'seqpacket' socket type should work + for any communication domain (protocol family) where the + OS supports it, typically the Unix Domain.</p> + <p> + Own Id: OTP-16550 Aux Id: ERIERL-476 </p> + </item> + <item> + <p>Updated the internal <c>pcre</c> library to + <c>8.44</c>.</p> + <p> + Own Id: OTP-16557</p> + </item> + <item> + <p>There is now cost in terms of reductions when copying + binary data using the binary syntax.</p> + <p> + Own Id: OTP-16601 Aux Id: OTP-16577 </p> + </item> + <item> + <p> + The executable <c>erl_call</c> is now part of the + <c>erts</c> distribution in addition to + <c>erl_interface</c>.</p> + <p> + Own Id: OTP-16602</p> + </item> + <item> + <p> + Fix a buffer overflow bug that caused EPMD to consume + 100% CPU after many nodes had been connected on the same + time on NetBSD.</p> + <p> + Own Id: OTP-16615</p> + </item> + <item> + <p> + <c>erl -remsh</c> now uses the dynamic node names feature + by default. See the <seecom + marker="erts:erl">erl</seecom> documentation for details.</p> + <p> + Own Id: OTP-16616</p> + </item> + <item> + <p> + socket: By default the socket options rcvtimeo and + sndtimeo are now disabled. To enable these, OTP now has + to be built with the configure option + --enable-esock-rcvsndtimeo</p> + <p> + Own Id: OTP-16620</p> + </item> + <item> + <p> + The environment variable $HOME does no longer have to be + set before Erlang can be started.</p> + <p> + Own Id: OTP-16635 Aux Id: ERL-476 PR-2390 </p> + </item> + </list> + </section> + +</section> + +<section><title>Erts 10.7.2.1</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Fixed bug in erl_crash.dump generation that could cause a + SEGV core dump if a recently cancelled timer was found.</p> + <p> + Own Id: OTP-16596 Aux Id: ERL-1105, PR-2606 </p> + </item> + <item> + <p> + The functionality utilized by BIFs for temporary + disabling of garbage collection while yielding could + cause system task queues to become inconsistent on a + process executing such a BIF. Process system tasks are + for example utilized when purging code, garbage + collecting literal data, and when issuing an ordinary + garbage collection from another process.</p> + <p> + The bug does not trigger frequently. Multiple code purges + in direct sequence makes it more likely that this bug is + triggered. In the cases observed, this has resulted in a + hanging code purge operation.</p> + <p> + Own Id: OTP-16639 Aux Id: ERL-1236 </p> + </item> + <item> + <p> + SCTP and UDP recv/2,3 hangs indefinitely if socket is + closed while recv is called (socket in passive mode).</p> + <p> + Own Id: OTP-16654 Aux Id: ERL-1242 </p> + </item> + </list> + </section> + +</section> + <section><title>Erts 10.7.2</title> <section><title>Fixed Bugs and Malfunctions</title> @@ -1792,6 +2461,64 @@ </section> +<section><title>Erts 10.3.5.12</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + The functionality utilized by BIFs for temporary + disabling of garbage collection while yielding could + cause system task queues to become inconsistent on a + process executing such a BIF. Process system tasks are + for example utilized when purging code, garbage + collecting literal data, and when issuing an ordinary + garbage collection from another process.</p> + <p> + The bug does not trigger frequently. Multiple code purges + in direct sequence makes it more likely that this bug is + triggered. In the cases observed, this has resulted in a + hanging code purge operation.</p> + <p> + Own Id: OTP-16639 Aux Id: ERL-1236 </p> + </item> + <item> + <p> + A literal area could prematurely be released before all + uses of it had been removed. This occurred either when a + terminating process had a complex exit reason referring + to a literal that concurrently was removed, or when a + terminating process continued executing a dirty NIF + accessing a literal (via the heap) that concurrently was + removed.</p> + <p> + Own Id: OTP-16640 Aux Id: OTP-16193 </p> + </item> + <item> + <p> + The VM could potentially crash when checking process code + of a process that terminated while executing a dirty NIF. + The checking of process code is part of a code purge + operation.</p> + <p> + Own Id: OTP-16641</p> + </item> + <item> + <p> + System tasks of <c>low</c> priority were not interleaved + with <c>normal</c> priority system tasks as they should. + This could potentially delay garbage collection of + another process longer than intended if the garbage + collection was requested from a <c>low</c> priority + process.</p> + <p> + Own Id: OTP-16642</p> + </item> + </list> + </section> + +</section> + <section><title>Erts 10.3.5.11</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c index 5beab81b98..aafd25e4ea 100644 --- a/erts/emulator/beam/bif.c +++ b/erts/emulator/beam/bif.c @@ -1032,13 +1032,6 @@ BIF_RETTYPE hibernate_3(BIF_ALIST_3) } /**********************************************************************/ - -BIF_RETTYPE get_stacktrace_0(BIF_ALIST_0) -{ - BIF_RET(NIL); -} - -/**********************************************************************/ /* * This is like exit/1, except that errors are logged if they terminate * the process, and the final error value will be {Term,StackTrace}. @@ -1132,12 +1125,11 @@ BIF_RETTYPE raise_3(BIF_ALIST_3) reason = EXC_THROWN; } else goto error; reason &= ~EXF_SAVETRACE; - - /* Check syntax of stacktrace, and count depth. - * Accept anything that can be returned from erlang:get_stacktrace/0, - * as well as a 2-tuple with a fun as first element that the - * error_handler may need to give us. Also allow old-style - * MFA three-tuples. + + /* Check syntax of stacktrace, and count depth. Accept anything + * that can be returned from a stacktrace from try/catch, as well + * as a 2-tuple with a fun as first element that the error_handler + * may need to give us. Also allow old-style MFA three-tuples. */ for (l = stacktrace, depth = 0; is_list(l); diff --git a/erts/emulator/beam/bif.tab b/erts/emulator/beam/bif.tab index 5fb8441a15..c55189f8a7 100644 --- a/erts/emulator/beam/bif.tab +++ b/erts/emulator/beam/bif.tab @@ -283,7 +283,6 @@ bif erts_internal:is_process_alive/2 bif erlang:error/1 error_1 bif erlang:error/2 error_2 bif erlang:raise/3 raise_3 -bif erlang:get_stacktrace/0 bif erlang:is_builtin/3 diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index 0a1e274396..6c83693df8 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -11188,7 +11188,7 @@ erts_set_gc_state(Process *c_p, int enable) first1 = dgc_tsk_qs->q[prio]; last1 = first1->prev; first2 = stsk_qs->q[prio]; - last2 = first1->prev; + last2 = first2->prev; last1->next = first2; first2->prev = last1; diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c index 42a5936513..6797b5d32f 100644 --- a/erts/emulator/drivers/common/inet_drv.c +++ b/erts/emulator/drivers/common/inet_drv.c @@ -12254,14 +12254,15 @@ static void packet_inet_stop(ErlDrvData e) into "udp_descriptor*" or "inet_descriptor*": */ udp_descriptor * udesc = (udp_descriptor*) e; - inet_descriptor* descr = INETP(udesc); + inet_descriptor* desc = INETP(udesc); if (udesc->i_buf != NULL) { release_buffer(udesc->i_buf); udesc->i_buf = NULL; } - ASSERT(NO_SUBSCRIBERS(&(descr->empty_out_q_subs))); - inet_stop(descr); + ASSERT(NO_SUBSCRIBERS(&(desc->empty_out_q_subs))); + async_error_am_all(desc, am_closed); + inet_stop(desc); } static int packet_error(udp_descriptor* udesc, int err) diff --git a/erts/emulator/test/exception_SUITE.erl b/erts/emulator/test/exception_SUITE.erl index 5dfa9bb4e0..4d20e1cef3 100644 --- a/erts/emulator/test/exception_SUITE.erl +++ b/erts/emulator/test/exception_SUITE.erl @@ -327,7 +327,6 @@ stacktrace_1(X, C1, Y) -> C1 -> value1 catch C1:D1:Stk1 -> - [] = erlang:get_stacktrace(), {caught1,D1,Stk1} after foo(Y) @@ -335,7 +334,6 @@ stacktrace_1(X, C1, Y) -> V2 -> {value2,V2} catch C2:D2:Stk2 -> - [] = erlang:get_stacktrace(), {caught2,{C2,D2},Stk2} after ok @@ -462,7 +460,6 @@ my_abs(X) -> abs(X). gunilla(Config) when is_list(Config) -> {throw,kalle} = gunilla_1(), - [] = erlang:get_stacktrace(), ok. gunilla_1() -> diff --git a/erts/etc/win32/nsis/erlang20.nsi b/erts/etc/win32/nsis/erlang20.nsi index 63e63a06cb..950f3ec0a3 100644 --- a/erts/etc/win32/nsis/erlang20.nsi +++ b/erts/etc/win32/nsis/erlang20.nsi @@ -52,7 +52,7 @@ Var STARTMENU_FOLDER !define MY_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
;General
- OutFile "${OUTFILEDIR}\otp_${WINTYPE}_${OTP_VERSION}.exe"
+ OutFile "${OUTFILEDIR}\otp_${WINTYPE}_${OTP_RELEASE_VERSION}.exe"
;Folder selection page
!if ${WINTYPE} == "win64"
@@ -68,7 +68,7 @@ Var STARTMENU_FOLDER !if ${WINTYPE} == "win64"
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "${OTP_PRODUCT} ${OTP_VERSION} (x64)"
!else
- !define MUI_STARTMENUPAGE_DEFAULTFOLDER "${OTP_PRODUCT} ${OTP_VERSION}"
+ !define MUI_STARTMENUPAGE_DEFAULTFOLDER "${OTP_PRODUCT} ${OTP_VERSION} (i386)"
!endif
;--------------------------------
@@ -201,7 +201,7 @@ done_startmenu: WriteRegStr HKLM \
"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})" \
- "DisplayName" "Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})"
+ "DisplayName" "Erlang OTP ${OTP_RELEASE_VERSION} (${ERTS_VERSION})"
WriteRegStr HKLM \
"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})" \
"UninstallString" "$INSTDIR\Uninstall.exe"
@@ -225,7 +225,7 @@ done_startmenu: WriteRegStr HKCU \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})" \
- "DisplayName" "Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})"
+ "DisplayName" "Erlang OTP ${OTP_RELEASE_VERSION} (${ERTS_VERSION})"
WriteRegStr HKCU \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Erlang OTP ${OTP_VERSION} (${ERTS_VERSION})" \
"UninstallString" "$INSTDIR\Uninstall.exe"
diff --git a/erts/etc/win32/wsl_tools/SetupWSLcross.bat b/erts/etc/win32/wsl_tools/SetupWSLcross.bat index 860a7d5e60..5de4cd8bb1 100644 --- a/erts/etc/win32/wsl_tools/SetupWSLcross.bat +++ b/erts/etc/win32/wsl_tools/SetupWSLcross.bat @@ -8,11 +8,6 @@ IF "%~1"=="x64" GOTO search GOTO badarg :search -IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat". ( - call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %~1 > nul - goto continue -) - IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat". ( call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %~1 > nul goto continue @@ -33,6 +28,11 @@ IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat". goto continue ) +IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat". ( + call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" %~1 > nul + goto continue +) + GOTO no_vcvars :continue diff --git a/erts/preloaded/ebin/erlang.beam b/erts/preloaded/ebin/erlang.beam Binary files differindex 61e841b703..9bf538de29 100644 --- a/erts/preloaded/ebin/erlang.beam +++ b/erts/preloaded/ebin/erlang.beam diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl index a9d8803575..c3d3e387e3 100644 --- a/erts/preloaded/src/erlang.erl +++ b/erts/preloaded/src/erlang.erl @@ -54,13 +54,13 @@ dist_ctrl_set_opt/3, dist_get_stat/1]). --deprecated([{get_stacktrace,0, - "use the new try/catch syntax for retrieving the " - "stack backtrace"}]). -deprecated([{now,0, "see the \"Time and Time Correction in Erlang\" " "chapter of the ERTS User's Guide for more information"}]). -removed([{hash,2,"use erlang:phash2/2 instead"}]). +-removed([{get_stacktrace,0, + "use the new try/catch syntax for retrieving the " + "stack backtrace"}]). %% Get rid of autoimports of spawn to avoid clashes with ourselves. -compile({no_auto_import,[spawn_link/1]}). @@ -146,7 +146,7 @@ -export([fun_info/2, fun_info_mfa/1, fun_to_list/1, function_exported/3]). -export([garbage_collect/0, garbage_collect/1, garbage_collect/2]). -export([garbage_collect_message_area/0, get/0, get/1, get_keys/0, get_keys/1]). --export([get_module_info/1, get_stacktrace/0, group_leader/0]). +-export([get_module_info/1, group_leader/0]). -export([group_leader/2]). -export([halt/0, halt/1, halt/2, has_prepared_code_on_load/1, hibernate/3]). @@ -1063,11 +1063,6 @@ get_keys(_Val) -> get_module_info(_Module) -> erlang:nif_error(undefined). -%% get_stacktrace/0 --spec erlang:get_stacktrace() -> [stack_item()]. -get_stacktrace() -> - erlang:nif_error(undefined). - %% group_leader/0 -spec group_leader() -> pid(). group_leader() -> diff --git a/erts/preloaded/src/erts.app.src b/erts/preloaded/src/erts.app.src index c3e5182a60..3a98f6f0f1 100644 --- a/erts/preloaded/src/erts.app.src +++ b/erts/preloaded/src/erts.app.src @@ -42,7 +42,7 @@ {registered, []}, {applications, []}, {env, []}, - {runtime_dependencies, ["stdlib-@OTP-15251@", "kernel-@OTP-15251@", "sasl-3.3"]} + {runtime_dependencies, ["stdlib-3.13", "kernel-7.0", "sasl-3.3"]} ]}. %% vim: ft=erlang diff --git a/erts/vsn.mk b/erts/vsn.mk index cba7ace509..1f9796c5cd 100644 --- a/erts/vsn.mk +++ b/erts/vsn.mk @@ -18,7 +18,7 @@ # %CopyrightEnd% # -VSN = 10.7.2 +VSN = 11.0.1 # Port number 4365 in 4.2 # Port number 4366 in 4.3 diff --git a/lib/asn1/doc/src/notes.xml b/lib/asn1/doc/src/notes.xml index 3351d8f195..0412d40423 100644 --- a/lib/asn1/doc/src/notes.xml +++ b/lib/asn1/doc/src/notes.xml @@ -32,6 +32,41 @@ <p>This document describes the changes made to the asn1 application.</p> +<section><title>Asn1 5.0.13</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Adhere to the ASN.1 specification for hstring & + bstring lexical items. That is they may include white + space.</p> + <p> + Own Id: OTP-16490</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>Refactored the internal handling of deprecated and + removed functions.</p> + <p> + Own Id: OTP-16469</p> + </item> + <item> + <p> + Improve handling of ellipsis in a CHOICE</p> + <p> + Own Id: OTP-16554 Aux Id: ERL-1189 </p> + </item> + </list> + </section> + +</section> + <section><title>Asn1 5.0.12</title> <section><title>Improvements and New Features</title> diff --git a/lib/asn1/vsn.mk b/lib/asn1/vsn.mk index 4451489b68..8ebbe907bc 100644 --- a/lib/asn1/vsn.mk +++ b/lib/asn1/vsn.mk @@ -1 +1 @@ -ASN1_VSN = 5.0.12 +ASN1_VSN = 5.0.13 diff --git a/lib/common_test/doc/src/notes.xml b/lib/common_test/doc/src/notes.xml index 70653c0711..9545d8352e 100644 --- a/lib/common_test/doc/src/notes.xml +++ b/lib/common_test/doc/src/notes.xml @@ -33,6 +33,44 @@ <file>notes.xml</file> </header> +<section><title>Common_Test 1.19</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + The function <c>ct_property_test:init_tool/1</c> is added + for the cases when the user does not want + ct_property_test to compile properties. init_tool/1 can + be used to set the property_test_tool config value.</p> + <p> + Own Id: OTP-16029 Aux Id: PR-2145 </p> + </item> + <item> + <p> + The built-in Common Test Hook, <c>cth_log_redirect</c>, + has been updated to use the system <c>default</c> Logger + handler's configuration instead of its own. See the + section on <seeguide + marker="common_test:ct_hooks_chapter#built-in-cths">Built-in + Hooks</seeguide> in the Common Test User's Guide.</p> + <p> + Own Id: OTP-16273</p> + </item> + <item> + <p> + Calls of deprecated functions in the <seeguide + marker="crypto:new_api#the-old-api">Old Crypto + API</seeguide> are replaced by calls of their <seeguide + marker="crypto:new_api#the-new-api">substitutions</seeguide>.</p> + <p> + Own Id: OTP-16346</p> + </item> + </list> + </section> + +</section> + <section><title>Common_Test 1.18.2</title> <section><title>Improvements and New Features</title> diff --git a/lib/common_test/vsn.mk b/lib/common_test/vsn.mk index 1e6991d73a..b5fa287e1f 100644 --- a/lib/common_test/vsn.mk +++ b/lib/common_test/vsn.mk @@ -1 +1 @@ -COMMON_TEST_VSN = 1.18.2 +COMMON_TEST_VSN = 1.19 diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml index 079c84b776..a37ac251de 100644 --- a/lib/compiler/doc/src/notes.xml +++ b/lib/compiler/doc/src/notes.xml @@ -32,6 +32,129 @@ <p>This document describes the changes made to the Compiler application.</p> +<section><title>Compiler 7.6.1</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + In rare circumstances, a guard using 'not' could evaluate + to the wrong boolean value.</p> + <p> + Own Id: OTP-16652 Aux Id: ERL-1246 </p> + </item> + <item> + <p>A guard expression that referenced a variable bound to + a boolean expression could evaluate to the wrong + value.</p> + <p> + Own Id: OTP-16657 Aux Id: ERL-1253 </p> + </item> + </list> + </section> + +</section> + +<section><title>Compiler 7.6</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p><c>erlang:fun_info(fun foo/1, name/1)</c> used to + return a function name based on the name of the function + that <c>fun foo/1</c> was used in. The name returned is + now <c>-fun.foo/1-</c>.</p> + <p> + Own Id: OTP-15837</p> + </item> + <item> + <p> Initialization of record fields using <c>_</c> is no + longer allowed if the number of affected fields is zero. + </p> + <p> + Own Id: OTP-16516</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>EEP-52 has been implemented.</p> + <p>In binary matching, the size of the segment to be + matched is now allowed to be a guard expression, and + similarly in map matching the keys can now be guard + expressions. See the Erlang Reference Manual and + Programming Examples for more details.</p> + <p>Language compilers or code generators that generate + Core Erlang code may need to be updated to be compatible + with the compiler in OTP 23. For more details, see the + section Backwards Compatibility in <url + href="http://erlang.org/eeps/eep-0052.html">EEP + 52</url>.</p> + <p> + Own Id: OTP-14708</p> + </item> + <item> + <p> Allow underscores in numeric literals to improve + readability. Examples: <c>123_456_789</c>, + <c>16#1234_ABCD</c>. </p> + <p> + Own Id: OTP-16007 Aux Id: PR-2324 </p> + </item> + <item> + <p>Improved the type optimization pass' inference of + types that depend on themselves, giving us more accurate + types and letting us track the content types of + lists.</p> + <p> + Own Id: OTP-16214 Aux Id: PR-2460 </p> + </item> + <item> + <p> + Support message queue optimization also for references + returned from the new <seemfa + marker="erts:erlang#spawn_request/5"><c>spawn_request()</c></seemfa> + BIFs.</p> + <p> + Own Id: OTP-16367 Aux Id: OTP-15251 </p> + </item> + <item> + <p>The compiler will now raise a warning when inlining is + used in modules that load NIFs.</p> + <p> + Own Id: OTP-16429 Aux Id: ERL-303 </p> + </item> + <item> + <p>Refactored the internal handling of deprecated and + removed functions.</p> + <p> + Own Id: OTP-16469</p> + </item> + <item> + <p>Line information was sometimes incorrect for + floating-point math exceptions.</p> + <p> + Own Id: OTP-16505 Aux Id: ERL-1178 </p> + </item> + <item> + <p>The <c>debug_info</c> option can now be specified in + <c>-compile()</c> attributes.</p> + <p> + Own Id: OTP-16523 Aux Id: ERL-1058 </p> + </item> + <item> + <p>Reduced the resource usage of <c>erlc</c> in parallel + builds (e.g. <c>make -j128</c>).</p> + <p> + Own Id: OTP-16543 Aux Id: ERL-1186 </p> + </item> + </list> + </section> + +</section> + <section><title>Compiler 7.5.4</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/compiler/src/beam_ssa_bool.erl b/lib/compiler/src/beam_ssa_bool.erl index 7ae9070df2..5b81ca2be1 100644 --- a/lib/compiler/src/beam_ssa_bool.erl +++ b/lib/compiler/src/beam_ssa_bool.erl @@ -922,9 +922,11 @@ opt_digraph_instr(#b_set{dst=Dst}=I, G0, St) -> %% Rewriting 'xor' is not practical. Fortunately, %% 'xor' is almost never used in practice. not_possible(); - #b_set{op={bif,'not'},args=[#b_var{}=Bool]} -> - G = convert_to_br_node(I, Fail, G1, St), - redirect_test(Bool, {fail,Succ}, G, St); + #b_set{op={bif,'not'}} -> + %% This is suprisingly rare. The previous attempt to + %% optimize it was broken, which wasn't noticed because + %% very few test cases triggered this code. + not_possible(); #b_set{op=phi,dst=Bool} -> Vtx = get_vertex(Bool, St), G2 = del_out_edges(Vtx, G1), @@ -1070,7 +1072,60 @@ redirect_phi(Phi, Args, SuccFail, G0, St) -> redirect_phi_1(PhiVtx, [{#b_literal{val=false},FalseExit}, {#b_var{}=SuccBool,_BoolExit}], SuccFail, G0, St) -> + %% This was most likely an `andalso` in the source code. BoolVtx = get_vertex(SuccBool, St), + + %% We must be careful when rewriting guards that reference boolean + %% expressions defined before the guard. Here is an example: + %% + %% Bool = Z =:= false, + %% if + %% X =:= Y andalso Bool -> ok; + %% true -> error + %% end. + %% + %% Slightly simplified, the SSA code will look like this: + %% + %% 10: Bool = bif:'=:=' _2, `false` + %% br ^11 + %% + %% 11: B = bif:'=:=' X, Y + %% br B, ^20, ^30 + %% + %% 20: br ^40 + %% 30: br ^40 + %% + %% 40: Phi = phi { `true`, ^20 }, { Bool, ^30 } + %% br Phi, ^100, ^200 + %% + %% 100: ret `ok` + %% 200: ret `error' + %% + %% The usual rewriting of the phi node will result in the following + %% SSA code: + %% + %% 10: Bool = bif:'=:=' _2, `false` + %% br Bool, ^100, ^200 + %% + %% 11: B = bif:'=:=' X, Y + %% br B, ^100, ^200 + %% + %% 20: br ^40 + %% 30: br ^40 + %% + %% 40: Phi = phi { `true`, ^20 }, { Bool, ^30 } + %% br Phi, ^100, ^200 + %% + %% 100: ret `ok` + %% 200: ret `error' + %% + %% Block 11 is no longer reachable; thus, the X =:= Y test has been dropped. + %% To avoid dropping tests, we should check whether if there is a path from + %% 10 to block 20. If there is, the optimization in its current form is not + %% safe. + %% + ensure_disjoint_paths(G0, BoolVtx, FalseExit), + [FalseOut] = beam_digraph:out_edges(G0, FalseExit), G1 = beam_digraph:del_edge(G0, FalseOut), case SuccFail of @@ -1088,6 +1143,11 @@ redirect_phi_1(PhiVtx, [{#b_literal{val=true},TrueExit}, {fail,Fail}, G0, St) -> %% This was probably an `orelse` in the source code. BoolVtx = get_vertex(SuccBool, St), + + %% See the previous clause for an explanation of why we + %% must ensure that paths are disjoint. + ensure_disjoint_paths(G0, BoolVtx, TrueExit), + [TrueOut] = beam_digraph:out_edges(G0, TrueExit), G1 = beam_digraph:del_edge(G0, TrueOut), G2 = beam_digraph:add_edge(G1, TrueExit, PhiVtx, next), @@ -1117,6 +1177,18 @@ digraph_bool_def(G) -> Ds = [{Dst,Vtx} || {Vtx,#b_set{dst=Dst}} <- Vs], maps:from_list(Ds). + +%% ensure_disjoint_paths(G, Vertex1, Vertex2) -> ok. +%% Ensure that there is no path from Vertex1 to Vertex2 in +%% either direction. (It is probably overkill to test both +%% directions, but better safe than sorry.) + +ensure_disjoint_paths(G, V1, V2) -> + case beam_digraph:is_path(G, V1, V2) orelse beam_digraph:is_path(G, V2, V1) of + true -> not_possible(); + false -> ok + end. + %%% %%% Shortcut branches that branch to other branches. %%% diff --git a/lib/compiler/src/compiler.app.src b/lib/compiler/src/compiler.app.src index 234f0b7780..92e9fa74e5 100644 --- a/lib/compiler/src/compiler.app.src +++ b/lib/compiler/src/compiler.app.src @@ -80,5 +80,5 @@ {registered, []}, {applications, [kernel, stdlib]}, {env, []}, - {runtime_dependencies, ["stdlib-@OTP-15251@","kernel-@OTP-15251@","hipe-3.12","erts-@OTP-15251@", + {runtime_dependencies, ["stdlib-3.13","kernel-7.0","hipe-3.12","erts-11.0", "crypto-3.6"]}]}. diff --git a/lib/compiler/test/guard_SUITE.erl b/lib/compiler/test/guard_SUITE.erl index 4a53698e15..0558b8f300 100644 --- a/lib/compiler/test/guard_SUITE.erl +++ b/lib/compiler/test/guard_SUITE.erl @@ -2300,6 +2300,8 @@ beam_bool_SUITE(_Config) -> in_catch(), recv_semi(), andalso_repeated_var(), + erl1246(), + erl1253(), ok. before_and_inside_if() -> @@ -2597,6 +2599,170 @@ andalso_repeated_var() -> andalso_repeated_var(B) when B andalso B -> ok; andalso_repeated_var(_) -> error. +-record(erl1246, {tran_stat = 0}). + +erl1246() -> + false = erl1246(#erl1246{tran_stat = 0}, #{cid => 1131}), + false = erl1246(#erl1246{tran_stat = 12}, #{cid => 1131}), + false = erl1246(#erl1246{tran_stat = 12}, #{cid => 9502}), + true = erl1246(#erl1246{tran_stat = 0}, #{cid => 9502}), + ok. + +erl1246(Rec, #{cid := CollID}) -> + {GiftCollID, _} = erl1246_conf(gift_coll), + IsTranStat = Rec#erl1246.tran_stat =:= erl1246_conf(transform_id), + if + %% Optimization of 'not' in a guard was broken. + CollID =:= GiftCollID andalso not IsTranStat -> + true; + true -> + false + end. + +erl1246_conf(gift_coll) -> {9502, {112, 45}}; +erl1246_conf(transform_id) -> 12; +erl1246_conf(_) -> undefined. + +erl1253() -> + ok = erl1253_orelse_false(a, a, any), + ok = erl1253_orelse_false(a, a, true), + ok = erl1253_orelse_false(a, a, false), + error = erl1253_orelse_false(a, b, any), + error = erl1253_orelse_false(a, b, true), + ok = erl1253_orelse_false(a, b, false), + + ok = erl1253_orelse_true(a, a, any), + ok = erl1253_orelse_true(a, a, true), + ok = erl1253_orelse_true(a, a, false), + error = erl1253_orelse_true(a, b, any), + ok = erl1253_orelse_true(a, b, true), + error = erl1253_orelse_true(a, b, false), + + error = erl1253_andalso_false(a, a, any), + error = erl1253_andalso_false(a, a, true), + ok = erl1253_andalso_false(a, a, false), + error = erl1253_andalso_false(a, b, any), + error = erl1253_andalso_false(a, b, true), + error = erl1253_andalso_false(a, b, false), + + error = erl1253_andalso_true(a, a, any), + ok = erl1253_andalso_true(a, a, true), + error = erl1253_andalso_true(a, a, false), + error = erl1253_andalso_true(a, b, any), + error = erl1253_andalso_true(a, b, true), + error = erl1253_andalso_true(a, b, false), + + ok. + +erl1253_orelse_false(X, Y, Z) -> + Res = erl1253_orelse_false_1(X, Y, Z), + Res = erl1253_orelse_false_2(X, Y, Z), + Res = erl1253_orelse_false_3(X, Y, Z). + +erl1253_orelse_false_1(X, Y, Z) -> + Bool = Z =:= false, + if + X =:= Y orelse Bool -> ok; + true -> error + end. + +erl1253_orelse_false_2(X, Y, Z) -> + Bool = Z =:= false, + if + Bool orelse X =:= Y -> ok; + true -> error + end. + +erl1253_orelse_false_3(X, Y, Z) -> + Bool1 = X =:= Y, + Bool2 = Z =:= false, + if + Bool1 orelse Bool2 -> ok; + true -> error + end. + +erl1253_orelse_true(X, Y, Z) -> + Res = erl1253_orelse_true_1(X, Y, Z), + Res = erl1253_orelse_true_2(X, Y, Z), + Res = erl1253_orelse_true_3(X, Y, Z). + +erl1253_orelse_true_1(X, Y, Z) -> + Bool = Z =:= true, + if + X =:= Y orelse Bool -> ok; + true -> error + end. + +erl1253_orelse_true_2(X, Y, Z) -> + Bool = Z =:= true, + if + Bool orelse X =:= Y -> ok; + true -> error + end. + +erl1253_orelse_true_3(X, Y, Z) -> + Bool1 = X =:= Y, + Bool2 = Z =:= true, + if + Bool1 orelse Bool2 -> ok; + true -> error + end. + +erl1253_andalso_false(X, Y, Z) -> + Res = erl1253_andalso_false_1(X, Y, Z), + Res = erl1253_andalso_false_2(X, Y, Z), + Res = erl1253_andalso_false_3(X, Y, Z). + +erl1253_andalso_false_1(X, Y, Z) -> + Bool = Z =:= false, + if + X =:= Y andalso Bool -> ok; + true -> error + end. + +erl1253_andalso_false_2(X, Y, Z) -> + Bool1 = X =:= Y, + Bool2 = Z =:= false, + if + Bool1 andalso Bool2 -> ok; + true -> error + end. + +erl1253_andalso_false_3(X, Y, Z) -> + Bool1 = X =:= Y, + Bool2 = Z =:= false, + if + Bool1 andalso Bool2 -> ok; + true -> error + end. + +erl1253_andalso_true(X, Y, Z) -> + Res = erl1253_andalso_true_1(X, Y, Z), + Res = erl1253_andalso_true_2(X, Y, Z), + Res = erl1253_andalso_true_3(X, Y, Z). + +erl1253_andalso_true_1(X, Y, Z) -> + Bool = Z =:= true, + if + X =:= Y andalso Bool -> ok; + true -> error + end. + +erl1253_andalso_true_2(X, Y, Z) -> + Bool = Z =:= true, + if + Bool andalso X =:= Y-> ok; + true -> error + end. + +erl1253_andalso_true_3(X, Y, Z) -> + Bool1 = X =:= Y, + Bool2 = Z =:= true, + if + Bool1 andalso Bool2 -> ok; + true -> error + end. + %%% %%% End of beam_bool_SUITE tests. %%% diff --git a/lib/compiler/test/trycatch_SUITE.erl b/lib/compiler/test/trycatch_SUITE.erl index 18926a23ee..148969a4d1 100644 --- a/lib/compiler/test/trycatch_SUITE.erl +++ b/lib/compiler/test/trycatch_SUITE.erl @@ -1141,7 +1141,6 @@ stacktrace(_Config) -> error:{badmatch,_}:Stk2 -> [{?MODULE,stacktrace_2,0,_}, {?MODULE,stacktrace,1,_}|_] = Stk2, - [] = erlang:get_stacktrace(), ok end, @@ -1149,7 +1148,6 @@ stacktrace(_Config) -> stacktrace_3(a, b) catch error:function_clause:Stk3 -> - [] = erlang:get_stacktrace(), case lists:module_info(native) of false -> [{lists,prefix,[a,b],_}|_] = Stk3; @@ -1170,7 +1168,6 @@ stacktrace_1(X, C1, Y) -> C1 -> value1 catch C1:D1:Stk1 -> - [] = erlang:get_stacktrace(), {caught1,D1,Stk1} after foo(Y) @@ -1178,7 +1175,6 @@ stacktrace_1(X, C1, Y) -> V2 -> {value2,V2} catch C2:D2:Stk2 -> - [] = erlang:get_stacktrace(), {caught2,{C2,D2},Stk2} end. diff --git a/lib/compiler/vsn.mk b/lib/compiler/vsn.mk index 87d821d7e8..e167c63a7d 100644 --- a/lib/compiler/vsn.mk +++ b/lib/compiler/vsn.mk @@ -1 +1 @@ -COMPILER_VSN = 7.5.4 +COMPILER_VSN = 7.6.1 diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml index b22b46d5e5..5903226f6e 100644 --- a/lib/crypto/doc/src/notes.xml +++ b/lib/crypto/doc/src/notes.xml @@ -31,6 +31,93 @@ </header> <p>This document describes the changes made to the Crypto application.</p> +<section><title>Crypto 4.7</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Crypto reported unsupported elliptic curves as supported + on e.g Fedora distros.</p> + <p> + Own Id: OTP-16579 Aux Id: ERL-825 </p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Support for ed25519 and ed448 added to + <c>crypto:generate_key</c>.</p> + <p> + Own Id: OTP-15967 Aux Id: PR-2329 </p> + </item> + <item> + <p> + The <seeguide marker="crypto:new_api#the-new-api">new + crypto functions api</seeguide> (crypto_init, + crypto_update and crypto_one_time) has been updated.</p> + <p> + There is now a function <seemfa + marker="crypto:crypto#crypto_final/1"><c>crypto_final/1</c></seemfa> + and a possibility to set options in <seemfa + marker="crypto:crypto#crypto_init/3"><c>crypto_init/3</c></seemfa> + and <seemfa + marker="crypto:crypto#crypto_init/4"><c>crypto_init/4</c></seemfa>. + See the manual for details.</p> + <p> + Own Id: OTP-16160</p> + </item> + <item> + <p> + As <seeguide + marker="crypto:notes#crypto-4.5">announced</seeguide> in + OTP 22.0, a New API was introduced in CRYPTO. See the + <seeguide marker="crypto:new_api"><i>New and Old + API</i></seeguide> chapter in the CRYPTO User's Guide for + more information and suggested replacement functions.</p> + <p> + <seeguide marker="crypto:new_api#the-old-api">The Old + API</seeguide> is now deprecated in OTP-23.0 and will be + removed in OTP-24.0.</p> + <p> + This deprecation includes cipher names. See the section + <seeguide + marker="crypto:new_api#retired-cipher-names">Retired + cipher names</seeguide> in the crypto User's Guide, + chapter <seeguide marker="crypto:new_api#the-old-api">The + Old API</seeguide>.</p> + <p> + Own Id: OTP-16232</p> + </item> + <item> + <p> + Fix C-compilation without deprecated OpenSSL cryptolib + APIs</p> + <p> + Own Id: OTP-16369 Aux Id: PR-2474 </p> + </item> + <item> + <p>Refactored the internal handling of deprecated and + removed functions.</p> + <p> + Own Id: OTP-16469</p> + </item> + <item> + <p> + Added missing 'eddh' to <seemfa + marker="crypto:crypto#supports/1">crypto:supports(public_keys)</seemfa>.</p> + <p> + Own Id: OTP-16583</p> + </item> + </list> + </section> + +</section> + <section><title>Crypto 4.6.5</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index ca72601bef..df830b32f6 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -135,6 +135,7 @@ groups() -> {group, dh}, {group, ecdh}, + {group, eddh}, {group, srp}, {group, chacha20_poly1305}, @@ -217,7 +218,7 @@ groups() -> {dss, [], [sign_verify %% Does not work yet: ,public_encrypt, private_encrypt ]}, - {ecdsa, [], [sign_verify + {ecdsa, [], [sign_verify, use_all_ec_sign_verify %% Does not work yet: ,public_encrypt, private_encrypt ]}, {ed25519, [], [sign_verify, @@ -229,7 +230,8 @@ groups() -> generate ]}, {dh, [], [generate_compute, compute_bug]}, - {ecdh, [], [use_all_elliptic_curves, compute, generate]}, + {ecdh, [], [compute, generate, use_all_ecdh_generate_compute]}, + {eddh, [], [compute, generate, use_all_eddh_generate_compute]}, {srp, [], [generate_compute]}, {des_cbc, [], [block, api_ng, api_ng_one_shot, api_ng_tls]}, {des_cfb, [], [block, api_ng, api_ng_one_shot, api_ng_tls]}, @@ -330,7 +332,7 @@ init_per_suite(Config) -> {ok, _} = zip:unzip("cmactestvectors.zip"), {ok, _} = zip:unzip("gcmtestvectors.zip"), - try crypto:start() of + try is_ok(crypto:start()) of ok -> catch ct:comment("~s",[element(3,hd(crypto:info_lib()))]), catch ct:log("crypto:info_lib() -> ~p~n" @@ -353,10 +355,18 @@ init_per_suite(Config) -> crypto:rand_seed(<< <<Bin/binary>> || _ <- lists:seq(1,16) >>), Config end - catch _:_ -> + + catch C:E:S -> + ct:log("~p ~p~n~p", [C,E,S]), {fail, "Crypto did not start"} end. +is_ok(ok) -> ok; +is_ok({error, already_started}) -> ok; +is_ok({error,{already_started,crypto}}) -> ok. + + + end_per_suite(_Config) -> application:stop(crypto). @@ -471,8 +481,7 @@ hmac() -> [{doc, "Test hmac function"}]. hmac(Config) when is_list(Config) -> Tuples = lazy_eval(proplists:get_value(hmac, Config)), - lists:foreach(fun hmac_check/1, Tuples), - lists:foreach(fun hmac_check/1, mac_listify(Tuples)). + do_cipher_tests(fun hmac_check/1, Tuples++mac_listify(Tuples)). %%-------------------------------------------------------------------- no_hmac() -> @@ -500,8 +509,7 @@ cmac() -> [{doc, "Test all different cmac functions"}]. cmac(Config) when is_list(Config) -> Pairs = lazy_eval(proplists:get_value(cmac, Config)), - lists:foreach(fun cmac_check/1, Pairs), - lists:foreach(fun cmac_check/1, mac_listify(Pairs)). + do_cipher_tests(fun cmac_check/1, Pairs ++ mac_listify(Pairs)). %%-------------------------------------------------------------------- poly1305() -> @@ -531,8 +539,7 @@ block() -> [{doc, "Test block ciphers"}]. block(Config) when is_list(Config) -> [_|_] = Blocks = lazy_eval(proplists:get_value(cipher, Config)), - lists:foreach(fun block_cipher/1, Blocks), - lists:foreach(fun block_cipher/1, block_iolistify(Blocks)), + do_cipher_tests(fun block_cipher/1, Blocks++block_iolistify(Blocks)), lists:foreach(fun block_cipher_increment/1, block_iolistify(Blocks)). %%-------------------------------------------------------------------- @@ -604,7 +611,7 @@ api_ng_cipher_increment_loop(Ref, InTexts) -> Bin catch error:Error -> - ct:pal("Txt = ~p",[Txt]), + ct:log("Txt = ~p",[Txt]), ct:fail("~p",[Error]) end end, InTexts). @@ -676,17 +683,16 @@ api_ng_tls(Config) when is_list(Config) -> lists:foreach(fun do_api_ng_tls/1, Ciphers). -do_api_ng_tls({Type, Key, PlainTexts}=_X) -> - ct:log("~p",[_X]), +do_api_ng_tls({Type, Key, PlainTexts}) -> do_api_ng_tls({Type, Key, <<>>, PlainTexts}); -do_api_ng_tls({Type, Key, IV, PlainTexts}=_X) -> - ct:log("~p",[_X]), +do_api_ng_tls({Type, Key, IV, PlainTexts}) -> do_api_ng_tls({Type, Key, IV, PlainTexts, undefined}); -do_api_ng_tls({Type, Key, IV, PlainText0, ExpectedEncText}=_X) -> - ct:log("~p",[_X]), +do_api_ng_tls({Type, Key, IV, PlainText0, ExpectedEncText}) -> PlainText = iolist_to_binary(lazy_eval(PlainText0)), + ct:log("Type = ~p~nKey = ~p~nIV = ~p~nPlainText = ~p~nExpectedEncText = ~p", + [Type, Key, IV, PlainText, ExpectedEncText]), Renc = crypto:crypto_dyn_iv_init(Type, Key, true), Rdec = crypto:crypto_dyn_iv_init(Type, Key, false), EncTxt = crypto:crypto_dyn_iv_update(Renc, PlainText, IV), @@ -832,8 +838,6 @@ no_stream_ivec(Config) when is_list(Config) -> notsup(fun crypto:stream_init/3, [Type, <<"Key">>, <<"Ivec">>]). %%-------------------------------------------------------------------- -aead() -> - [{doc, "Test AEAD ciphers"}]. aead(Config) when is_list(Config) -> [_|_] = AEADs = lazy_eval(proplists:get_value(cipher, Config)), FilteredAEADs = @@ -848,7 +852,7 @@ aead(Config) when is_list(Config) -> IVLen >= 12 end, AEADs) end, - lists:foreach(fun aead_cipher/1, FilteredAEADs). + do_cipher_tests(fun aead_cipher/1, FilteredAEADs). %%-------------------------------------------------------------------- aead_ng(Config) when is_list(Config) -> @@ -865,7 +869,7 @@ aead_ng(Config) when is_list(Config) -> IVLen >= 12 end, AEADs) end, - lists:foreach(fun aead_cipher_ng/1, FilteredAEADs ++ spec_0_bytes(Config)). + do_cipher_tests(fun aead_cipher_ng/1, FilteredAEADs ++ spec_0_bytes(Config)). %%-------------------------------------------------------------------- aead_bad_tag(Config) -> @@ -882,7 +886,7 @@ aead_bad_tag(Config) -> IVLen >= 12 end, AEADs) end, - lists:foreach(fun aead_cipher_bad_tag/1, FilteredAEADs). + do_cipher_tests(fun aead_cipher_bad_tag/1, FilteredAEADs). %%-------------------------------------------------------------------- sign_verify() -> @@ -902,6 +906,7 @@ no_sign_verify(Config) when is_list(Config) -> public_encrypt() -> [{doc, "Test public_encrypt/decrypt "}]. public_encrypt(Config) when is_list(Config) -> + ct:log("public_encrypt", []), Params = proplists:get_value(pub_pub_encrypt, Config, []), lists:foreach(fun do_public_encrypt/1, Params). @@ -961,9 +966,7 @@ compute(Config) when is_list(Config) -> Gen = proplists:get_value(compute, Config), lists:foreach(fun do_compute/1, Gen). %%-------------------------------------------------------------------- -use_all_elliptic_curves() -> - [{doc, " Test that all curves from crypto:ec_curves/0"}]. -use_all_elliptic_curves(_Config) -> +use_all_ec_sign_verify(_Config) -> Msg = <<"hello world!">>, Sups = crypto:supports(), Curves = proplists:get_value(curves, Sups), @@ -975,6 +978,7 @@ use_all_elliptic_curves(_Config) -> Results = [{{Curve,Hash}, try + ct:log("~p ~p",[Curve,Hash]), {Pub,Priv} = crypto:generate_key(ecdh, Curve), true = is_binary(Pub), true = is_binary(Priv), @@ -1000,6 +1004,57 @@ use_all_elliptic_curves(_Config) -> end. %%-------------------------------------------------------------------- +use_all_ecdh_generate_compute(Config) -> + Curves = crypto:supports(curves) -- [ed25519, ed448, x25519, x448], + do_dh_curves(Config, Curves). + +use_all_eddh_generate_compute(Config) -> + AllCurves = crypto:supports(curves), + Curves = [C || C <- [x25519, x448], + lists:member(C, AllCurves)], + do_dh_curves(Config, Curves). + +do_dh_curves(_Config, Curves) -> + ct:log("Lib: ~p~nFIPS: ~p~nCurves:~n~p~n", [crypto:info_lib(), + crypto:info_fips(), + Curves]), + Results = + [{Curve, + try + ct:log("~p",[Curve]), + {APub,APriv} = crypto:generate_key(ecdh, Curve), + {BPub,BPriv} = crypto:generate_key(ecdh, Curve), + true = is_binary(APub), + true = is_binary(APriv), + true = is_binary(BPub), + true = is_binary(BPriv), + + ACommonSecret = crypto:compute_key(ecdh, BPub, APriv, Curve), + BCommonSecret = crypto:compute_key(ecdh, APub, BPriv, Curve), + ACommonSecret == BCommonSecret + catch + C:E -> + {C,E} + end} + || Curve <- Curves + ], + + Fails = + lists:filter(fun({_,true}) -> false; + (_) -> true + end, Results), + + case Fails of + [] -> + ct:comment("All ~p passed",[length(Results)]), + ok; + _ -> + ct:comment("passed: ~p, failed: ~p",[length(Results),length(Fails)]), + ct:log("Fails:~n~p",[Fails]), + ct:fail("Bad curve(s)",[]) + end. + +%%-------------------------------------------------------------------- generate() -> [{doc, " Test crypto:generate_key"}]. generate(Config) when is_list(Config) -> @@ -1065,13 +1120,14 @@ cipher_info(Config) when is_list(Config) -> of _ -> Ok catch Cls:Exc -> - ct:pal("~p:~p ~p",[Cls,Exc,C]), + ct:log("~p:~p ~p",[Cls,Exc,C]), false end end, true, -crypto:supports(ciphers)) of -%% proplists:get_value(ciphers, crypto:supports())) of + crypto:supports(ciphers) + ) + of true -> ok; false -> @@ -1175,76 +1231,49 @@ hmac_increment(State0, [Increment | Rest]) -> hmac_increment(State, Rest). %%%---------------------------------------------------------------- -cmac_check({cmac, Type, Key, Text, CMac}) -> +cmac_check({cmac, Type, Key, Text, CMac}=T) -> ExpCMac = iolist_to_binary(CMac), - case crypto:cmac(Type, Key, Text) of - ExpCMac -> - ok; - Other -> - ct:fail({{crypto, cmac, [Type, Key, Text]}, {expected, ExpCMac}, {got, Other}}) - end; -cmac_check({cmac, Type, Key, Text, Size, CMac}) -> + cipher_test(T, + fun() -> crypto:cmac(Type, Key, Text) end, + ExpCMac); +cmac_check({cmac, Type, Key, Text, Size, CMac}=T) -> ExpCMac = iolist_to_binary(CMac), - case crypto:cmac(Type, Key, Text, Size) of - ExpCMac -> - ok; - Other -> - ct:fail({{crypto, cmac, [Type, Key, Text, Size]}, {expected, ExpCMac}, {got, Other}}) - end. - + cipher_test(T, + fun() -> crypto:cmac(Type, Key, Text, Size) end, + ExpCMac). -mac_check({MacType, SubType, Key, Text, Mac}) -> +mac_check({MacType, SubType, Key, Text, Mac}=T) -> ExpMac = iolist_to_binary(Mac), - case crypto:mac(MacType, SubType, Key, Text) of - ExpMac -> - ok; - Other -> - ct:fail({{crypto, mac, [MacType, SubType, Key, Text]}, {expected, ExpMac}, {got, Other}}) - end; -mac_check({MacType, SubType, Key, Text, Size, Mac}) -> + cipher_test(T, + fun() -> crypto:mac(MacType, SubType, Key, Text) end, + ExpMac); +mac_check({MacType, SubType, Key, Text, Size, Mac}=T) -> ExpMac = iolist_to_binary(Mac), - case crypto:mac(MacType, SubType, Key, Text, Size) of - ExpMac -> - ok; - Other -> - ct:fail({{crypto, mac, [MacType, SubType, Key, Text]}, {expected, ExpMac}, {got, Other}}) - end. + cipher_test(T, + fun() -> crypto:mac(MacType, SubType, Key, Text, Size) end, + ExpMac). - -block_cipher({Type, Key, PlainText}) -> +block_cipher({Type, Key, PlainText}=T) -> Plain = iolist_to_binary(PlainText), CipherText = crypto:block_encrypt(Type, Key, PlainText), - case crypto:block_decrypt(Type, Key, CipherText) of - Plain -> - ok; - Other -> - ct:fail({{crypto, block_decrypt, [Type, Key, CipherText]}, {expected, Plain}, {got, Other}}) - end; + cipher_test(T, + fun() -> crypto:block_decrypt(Type, Key, CipherText) end, + Plain); -block_cipher({Type, Key, IV, PlainText}) -> +block_cipher({Type, Key, IV, PlainText}=T) -> Plain = iolist_to_binary(PlainText), CipherText = crypto:block_encrypt(Type, Key, IV, PlainText), - case crypto:block_decrypt(Type, Key, IV, CipherText) of - Plain -> - ok; - Other -> - ct:fail({{crypto, block_decrypt, [Type, Key, IV, CipherText]}, {expected, Plain}, {got, Other}}) - end; + cipher_test(T, + fun() -> crypto:block_decrypt(Type, Key, IV, CipherText) end, + Plain); -block_cipher({Type, Key, IV, PlainText, CipherText}) -> +block_cipher({Type, Key, IV, PlainText, CipherText}=T) -> Plain = iolist_to_binary(PlainText), - case crypto:block_encrypt(Type, Key, IV, Plain) of - CipherText -> - ok; - Other0 -> - ct:fail({{crypto, block_encrypt, [Type, Key, IV, Plain]}, {expected, CipherText}, {got, Other0}}) - end, - case crypto:block_decrypt(Type, Key, IV, CipherText) of - Plain -> - ok; - Other1 -> - ct:fail({{crypto, block_decrypt, [Type, Key, IV, CipherText]}, {expected, Plain}, {got, Other1}}) - end. + cipher_test(T, + fun() -> crypto:block_encrypt(Type, Key, IV, Plain) end, + CipherText, + fun() -> crypto:block_decrypt(Type, Key, IV, CipherText) end, + Plain). block_cipher_increment({Type, Key, IV, PlainTexts}) when Type == des_cbc ; Type == des3_cbc ; @@ -1365,124 +1394,99 @@ stream_cipher_incment_loop(State0, OrigState, [PlainText | PlainTexts], Acc, Pla {State, CipherText} = crypto:stream_encrypt(State0, PlainText), stream_cipher_incment_loop(State, OrigState, PlainTexts, [CipherText | Acc], Plain). -aead_cipher({Type, Key, PlainText, IV, AAD, CipherText, CipherTag, Info}) -> +aead_cipher({Type, Key, PlainText, IV, AAD, CipherText, CipherTag, _Info}=T) -> Plain = iolist_to_binary(PlainText), - case crypto:block_encrypt(Type, Key, IV, {AAD, Plain}) of - {CipherText, CipherTag} -> - ok; - Other0 -> - ct:fail({{crypto, - block_encrypt, - [{info,Info}, {key,Key}, {pt,PlainText}, {iv,IV}, {aad,AAD}, {ct,CipherText}, {tag,CipherTag}]}, - {expected, {CipherText, CipherTag}}, - {got, Other0}}) - end, - case crypto:block_decrypt(Type, Key, IV, {AAD, CipherText, CipherTag}) of - Plain -> - ok; - Other1 -> - ct:fail({{crypto, - block_decrypt, - [{info,Info}, {key,Key}, {pt,PlainText}, {iv,IV}, {aad,AAD}, {ct,CipherText}, {tag,CipherTag}]}, - {expected, Plain}, - {got, Other1}}) - end; -aead_cipher({Type, Key, PlainText, IV, AAD, CipherText, CipherTag, TagLen, Info}) -> + cipher_test(T, + fun() -> crypto:block_encrypt(Type, Key, IV, {AAD, Plain}) end, + {CipherText, CipherTag}, + fun() -> crypto:block_decrypt(Type, Key, IV, {AAD, CipherText, CipherTag}) end, + Plain); +aead_cipher({Type, Key, PlainText, IV, AAD, CipherText, CipherTag, TagLen, _Info}=T) -> <<TruncatedCipherTag:TagLen/binary, _/binary>> = CipherTag, Plain = iolist_to_binary(PlainText), - try crypto:block_encrypt(Type, Key, IV, {AAD, Plain, TagLen}) of - {CipherText, TruncatedCipherTag} -> - ok; - Other0 -> - ct:fail({{crypto, - block_encrypt, - [{info,Info}, {key,Key}, {pt,PlainText}, {iv,IV}, {aad,AAD}, {ct,CipherText}, {tag,CipherTag}, {taglen,TagLen}]}, - {expected, {CipherText, TruncatedCipherTag}}, - {got, Other0}}) - catch - error:E -> - ct:log("~p",[{Type, Key, PlainText, IV, AAD, CipherText, CipherTag, TagLen, Info}]), - try crypto:crypto_one_time_aead(Type, Key, IV, PlainText, AAD, TagLen, true) - of - RR -> - ct:log("Works: ~p",[RR]) - catch - CC:EE -> - ct:log("~p:~p", [CC,EE]) - end, - ct:fail("~p",[E]) - end, - case crypto:block_decrypt(Type, Key, IV, {AAD, CipherText, TruncatedCipherTag}) of - Plain -> - ok; - Other1 -> - ct:fail({{crypto, - block_decrypt, - [{info,Info}, {key,Key}, {pt,PlainText}, {iv,IV}, {aad,AAD}, {ct,CipherText}, {tag,CipherTag}, - {truncated,TruncatedCipherTag}]}, - {expected, Plain}, - {got, Other1}}) - end. + cipher_test(T, + fun() -> crypto:block_encrypt(Type, Key, IV, {AAD, Plain, TagLen}) end, + {CipherText, TruncatedCipherTag}, + fun() -> crypto:block_decrypt(Type, Key, IV, {AAD, CipherText, TruncatedCipherTag}) end, + Plain). -aead_cipher_ng({Type, Key, PlainText, IV, AAD, CipherText, CipherTag, Info}) -> +aead_cipher_ng({Type, Key, PlainText, IV, AAD, CipherText, CipherTag, _Info}=T) -> Plain = iolist_to_binary(PlainText), - case crypto:crypto_one_time_aead(Type, Key, IV, PlainText, AAD, true) of - {CipherText, CipherTag} -> - ok; - Other0 -> - ct:fail({{crypto, - block_encrypt, - [{info,Info}, {key,Key}, {pt,PlainText}, {iv,IV}, {aad,AAD}, {ct,CipherText}, {tag,CipherTag}]}, - {expected, {CipherText, CipherTag}}, - {got, Other0}}) - end, - case crypto:crypto_one_time_aead(Type, Key, IV, CipherText, AAD, CipherTag, false) of - Plain -> - ok; - Other1 -> - ct:fail({{crypto, - block_decrypt, - [{info,Info}, {key,Key}, {pt,PlainText}, {iv,IV}, {aad,AAD}, {ct,CipherText}, {tag,CipherTag}]}, - {expected, Plain}, - {got, Other1}}) - end; -aead_cipher_ng({Type, Key, PlainText, IV, AAD, CipherText, CipherTag, TagLen, Info}) -> + cipher_test(T, + fun() -> crypto:crypto_one_time_aead(Type, Key, IV, PlainText, AAD, true) end, + {CipherText, CipherTag}, + fun() -> crypto:crypto_one_time_aead(Type, Key, IV, CipherText, AAD, CipherTag, false) end, + Plain); +aead_cipher_ng({Type, Key, PlainText, IV, AAD, CipherText, CipherTag, TagLen, _Info}=T) -> <<TruncatedCipherTag:TagLen/binary, _/binary>> = CipherTag, Plain = iolist_to_binary(PlainText), - try crypto:crypto_one_time_aead(Type, Key, IV, PlainText, AAD, TagLen, true) of - {CipherText, TruncatedCipherTag} -> - ok; - Other0 -> - ct:fail({{crypto, - block_encrypt, - [{info,Info}, {key,Key}, {pt,PlainText}, {iv,IV}, {aad,AAD}, {ct,CipherText}, {tag,CipherTag}, {taglen,TagLen}]}, - {expected, {CipherText, TruncatedCipherTag}}, - {got, Other0}}) + cipher_test(T, + fun() -> crypto:crypto_one_time_aead(Type, Key, IV, PlainText, AAD, TagLen, true) end, + {CipherText, TruncatedCipherTag}, + fun() -> crypto:crypto_one_time_aead(Type, Key, IV, CipherText, AAD, TruncatedCipherTag, false) end, + Plain). + +aead_cipher_bad_tag({Type, Key, _PlainText, IV, AAD, CipherText, CipherTag, _Info}=T) -> + BadTag = mk_bad_tag(CipherTag), + cipher_test(T, + fun() -> crypto:crypto_one_time_aead(Type, Key, IV, CipherText, AAD, BadTag, false) end, + error); +aead_cipher_bad_tag({Type, Key, _PlainText, IV, AAD, CipherText, CipherTag, TagLen, _Info}=T) -> + <<TruncatedCipherTag:TagLen/binary, _/binary>> = CipherTag, + BadTruncatedTag = mk_bad_tag(TruncatedCipherTag), + cipher_test(T, + fun() -> crypto:crypto_one_time_aead(Type, Key, IV, CipherText, AAD, BadTruncatedTag, false) end, + error). + + +cipher_test(T, Fe, Ee, Fd, Ed) -> + %% Test encrypt + Re = cipher_test(encrypt, T, Fe, Ee), + %% Test decrypt + Rd = cipher_test(decrypt, T, Fd, Ed), + case {Re, Rd} of + {ok,ok} -> ok; + {ok,_} -> Rd; + {_,ok} -> Re; + _ -> {Re,Rd} + end. + +cipher_test(T, F, E) -> + cipher_test(notag, T, F, E). + +cipher_test(Tag, T, F, E) -> + try F() of + E -> ok; + Other -> {other, {Tag,T,Other}} catch - error:E -> - ct:log("~p",[{Type, Key, PlainText, IV, AAD, CipherText, CipherTag, TagLen, Info}]), - try crypto:crypto_one_time_aead(Type, Key, IV, PlainText, AAD, TagLen, true) - of - RR -> - ct:log("Works: ~p",[RR]) - catch - CC:EE -> - ct:log("~p:~p", [CC,EE]) - end, - ct:fail("~p",[E]) - end, - case crypto:crypto_one_time_aead(Type, Key, IV, CipherText, AAD, TruncatedCipherTag, false) of - Plain -> - ok; - Other1 -> - ct:fail({{crypto, - block_decrypt, - [{info,Info}, {key,Key}, {pt,PlainText}, {iv,IV}, {aad,AAD}, {ct,CipherText}, {tag,CipherTag}, - {truncated,TruncatedCipherTag}]}, - {expected, Plain}, - {got, Other1}}) + error:Error -> {error, {Tag,T,Error}} + end. + +do_cipher_tests(F, TestVectors) when is_function(F,1) -> + {Passed,Failed} = + lists:partition( + fun(R) -> R == ok end, + lists:map(F, TestVectors) + ), + BothFailed = lists:filter(fun({ok,_}) -> false; + ({_,ok}) -> false; + (ok) -> false; + (_) -> true + end, + Failed), + ct:log("Passed: ~p, BothFailed: ~p OnlyOneFailed: ~p", + [length(Passed), length(BothFailed), length(Failed)-length(BothFailed)]), + case Failed of + [] -> + ct:comment("All ~p passed", [length(Passed)]); + _ -> + ct:log("~p",[hd(Failed)]), + ct:comment("Passed: ~p, BothFailed: ~p OnlyOneFailed: ~p", + [length(Passed), length(BothFailed), length(Failed)-length(BothFailed)]), + ct:fail("Failed", []) end. + mk_bad_tag(CipherTag) -> case <<0:(size(CipherTag))/unit:8>> of CipherTag -> % The correct tag may happen to be a suite of zeroes @@ -1491,30 +1495,6 @@ mk_bad_tag(CipherTag) -> X end. -aead_cipher_bad_tag({Type, Key, PlainText, IV, AAD, CipherText, CipherTag, Info}) -> - Plain = iolist_to_binary(PlainText), - BadTag = mk_bad_tag(CipherTag), - case crypto:crypto_one_time_aead(Type, Key, IV, CipherText, AAD, BadTag, false) of - error -> - ok; - Plain -> - ct:log("~p:~p~n info: ~p~n key: ~p~n pt: ~p~n iv: ~p~n aad: ~p~n ct: ~p~n tag: ~p~n bad tag: ~p~n", - [?MODULE,?LINE,Info, Key, PlainText, IV, AAD, CipherText, CipherTag, BadTag]), - ct:fail("Didn't fail on bad tag") - end; -aead_cipher_bad_tag({Type, Key, PlainText, IV, AAD, CipherText, CipherTag, TagLen, Info}) -> - Plain = iolist_to_binary(PlainText), - <<TruncatedCipherTag:TagLen/binary, _/binary>> = CipherTag, - BadTruncatedTag = mk_bad_tag(TruncatedCipherTag), - case crypto:crypto_one_time_aead(Type, Key, IV, CipherText, AAD, BadTruncatedTag, false) of - error -> - ok; - Plain -> - ct:log("~p:~p~n info: ~p~n key: ~p~n pt: ~p~n iv: ~p~n aad: ~p~n ct: ~p~n tag: ~p~n bad tag: ~p~n", - [Info, Key, PlainText, IV, AAD, CipherText, TruncatedCipherTag, BadTruncatedTag]), - ct:fail("Didn't fail on bad tag") - end. - do_sign_verify({Type, undefined=Hash, Private, Public, Msg, Signature}) -> case crypto:sign(eddsa, Hash, Msg, [Private,Type]) of Signature -> @@ -1598,45 +1578,65 @@ negative_verify(Type, Hash, Msg, Signature, Public, Options) -> end. do_public_encrypt({Type, Public, Private, Msg, Padding}) -> + ct:log("do_public_encrypt Type=~p, Padding=~p,~nPublic = ~p,~nPrivate = ~p,~nMsg = ~p.", + [Type, Padding, Public, Private, Msg]), + timer:sleep(100), try crypto:public_encrypt(Type, Msg, Public, Padding) of PublicEcn -> + ct:log("private_decrypt~nPublicEcn = ~p.", [PublicEcn]), + timer:sleep(100), try crypto:private_decrypt(Type, PublicEcn, Private, Padding) of Msg -> + ct:log("~p:~p ok", [?MODULE,?LINE]), + timer:sleep(100), ok; Other -> + ct:log("~p:~p Other = ~p", [?MODULE,?LINE,Other]), + timer:sleep(100), ct:fail({{crypto, private_decrypt, [Type, PublicEcn, Private, Padding]}, {expected, Msg}, {got, Other}}) catch CC:EE -> + ct:log("~p:~p EXC. ~p:~p", [?MODULE,?LINE,CC,EE]), + timer:sleep(100), ct:fail({{crypto, private_decrypt, [Type, PublicEcn, Private, Padding]}, {expected, Msg}, {got, {CC,EE}}}) end catch CC:EE -> + ct:log("~p:~p EXC 2. ~p:~p", [?MODULE,?LINE,CC,EE]), + timer:sleep(100), ct:fail({{crypto, public_encrypt, [Type, Msg, Public, Padding]}, {got, {CC,EE}}}) end. do_private_encrypt({Type, Public, Private, Msg, Padding}) -> + ct:log("do_private_encrypt Type=~p, Padding=~p,~nPublic = ~p,~nPrivate = ~p,~nMsg = ~p.", + [Type, Padding, Public, Private, Msg]), try crypto:private_encrypt(Type, Msg, Private, Padding) of PrivEcn -> try + ct:log("public_decrypt~nPrivEcn = ~p.", [PrivEcn]), crypto:public_decrypt(Type, PrivEcn, Public, Padding) of Msg -> + ct:log("~p:~p ok", [?MODULE,?LINE]), ok; Other -> + ct:log("~p:~p Other = ~p", [?MODULE,?LINE,Other]), ct:fail({{crypto, public_decrypt, [Type, PrivEcn, Public, Padding]}, {expected, Msg}, {got, Other}}) catch CC:EE -> + ct:log("~p:~p EXC. ~p:~p", [?MODULE,?LINE,CC,EE]), ct:fail({{crypto, public_decrypt, [Type, PrivEcn, Public, Padding]}, {expected, Msg}, {got, {CC,EE}}}) end catch CC:EE -> + ct:log("~p:~p EXC 2. ~p:~p", [?MODULE,?LINE,CC,EE]), ct:fail({{crypto, private_encrypt, [Type, Msg, Private, Padding]}, {got, {CC,EE}}}) end. @@ -1648,6 +1648,9 @@ do_generate_compute({srp = Type, UserPrivate, UserGenParams, UserComParams, UserComParams), SessionKey = crypto:compute_key(Type, UserPublic, {HostPublic, HostPrivate}, HostComParam); + + + do_generate_compute({dh, P, G}) -> {UserPub, UserPriv} = crypto:generate_key(dh, [P, G]), {HostPub, HostPriv} = crypto:generate_key(dh, [P, G]), @@ -1655,6 +1658,7 @@ do_generate_compute({dh, P, G}) -> SharedSecret = crypto:compute_key(dh, UserPub, HostPriv, [P, G]). do_compute({ecdh = Type, Pub, Priv, Curve, SharedSecret}) -> + ct:log("~p ~p", [Type,Curve]), Secret = crypto:compute_key(Type, Pub, Priv, Curve), case Secret of SharedSecret -> @@ -1664,6 +1668,7 @@ do_compute({ecdh = Type, Pub, Priv, Curve, SharedSecret}) -> end. do_generate({Type, Curve, Priv, Pub}) when Type == ecdh ; Type == eddsa -> + ct:log("~p ~p", [Type,Curve]), case crypto:generate_key(Type, Curve, Priv) of {Pub, _} -> ok; @@ -1671,6 +1676,7 @@ do_generate({Type, Curve, Priv, Pub}) when Type == ecdh ; Type == eddsa -> ct:fail({{crypto, generate_key, [Type, Priv, Curve]}, {expected, Pub}, {got, Other}}) end; do_generate({rsa = Type, Mod, Exp}) -> + ct:log("~p", [Type]), case crypto:info_fips() of enabled when Mod < 3072 -> ct:log("SKIP do_generate ~p FIPS=~p, Mod=~p Exp=~p", [Type, enabled, Mod, Exp]), @@ -2101,6 +2107,8 @@ group_config(ecdh, Config) -> Compute = ecdh(), Generate = ecc(), [{compute, Compute}, {generate, Generate} | Config]; +group_config(eddh, Config) -> + [{compute, []}, {generate, []} | Config]; group_config(dh, Config) -> GenerateCompute = [dh()], [{generate_compute, GenerateCompute} | Config]; @@ -2239,12 +2247,13 @@ gen_rsa_sign_verify_tests(Hashs, Msg, Public, Private, Opts) -> gen_rsa_pub_priv_tests(Public, Private, Msg, OptsToTry) -> - SupOpts = proplists:get_value(rsa_opts, crypto:supports(), []), + SupOpts = proplists:get_value(rsa_opts, crypto:supports(), []) -- + [rsa_x931_padding], lists:foldr(fun(Opt, Acc) -> case rsa_opt_is_supported(Opt, SupOpts) of true -> [{rsa, Public, Private, Msg, Opt} | Acc]; - false -> + false -> Acc end end, [], OptsToTry). @@ -3975,11 +3984,13 @@ eddsa(ed448) -> ecdh() -> %% http://csrc.nist.gov/groups/STM/cavp/ - Curves = crypto:ec_curves() ++ - [X || X <- proplists:get_value(curves, crypto:supports(), []), - lists:member(X, [x25519,x448])], - TestCases = - [{ecdh, hexstr2point("42ea6dd9969dd2a61fea1aac7f8e98edcc896c6e55857cc0", "dfbe5d7c61fac88b11811bde328e8a0d12bf01a9d204b523"), + Curves = crypto:supports(curves), + lists:filter( + fun ({_Type, _Pub, _Priv, Curve, _SharedSecret}) -> + lists:member(Curve, Curves) + end, + + [{ecdh, hexstr2point("42ea6dd9969dd2a61fea1aac7f8e98edcc896c6e55857cc0", "dfbe5d7c61fac88b11811bde328e8a0d12bf01a9d204b523"), hexstr2bin("f17d3fea367b74d340851ca4270dcb24c271f445bed9d527"), secp192r1, hexstr2bin("803d8ab2e5b6e6fca715737c3a82f7ce3c783124f6d51cd0")}, @@ -4085,11 +4096,8 @@ ecdh() -> 16#9a8f4925d1519f5775cf46b04b5800d4ee9ee8bae8bc5565d498c28dd9c9baf574a9419744897391006382a6f127ab1d9ac2d8c0a598726b, x448, hexstr2bin("07fff4181ac6cc95ec1c16a94a0f74d12da232ce40a77552281d282bb60c0b56fd2464c335543936521c24403085d59a449a5037514a879d")} - ], - lists:filter(fun ({_Type, _Pub, _Priv, Curve, _SharedSecret}) -> - lists:member(Curve, Curves) - end, - TestCases). + ] + ). dh() -> {dh, 90970053988169282502023478715631717259407236400413906591937635666709823903223997309250405131675572047545403771567755831138144089197560332757755059848492919215391041119286178688014693040542889497092308638580104031455627238700168892909539193174537248629499995652186913900511641708112112482297874449292467498403, 2}. @@ -4143,8 +4151,11 @@ ecc() -> %% information about the curves see %% http://csrc.nist.gov/encryption/dss/ecdsa/NISTReCur.pdf %% - Curves = crypto:ec_curves(), - TestCases = + Curves = crypto:supports(curves), + lists:filter( + fun ({_Type, Curve, _Priv, _Pub}) -> + lists:member(Curve, Curves) + end, [{ecdh,secp192r1,1, hexstr2point("188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012", "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811")}, @@ -4174,12 +4185,9 @@ ecc() -> hexstr2bin("8520f0098930a754748b7ddcb43ef75a0dbf3a0d26381af4eba4a98eaa9b4e6a")}, {ecdh, x25519, hexstr2bin("5dab087e624a8a4b79e17f8b83800ee66f3bb1292618b6fd1c2f8b27ff88e0eb"), - hexstr2bin("de9edb7d7b7dc1b4d35b61c2ece435373f8343c85b78674dadfc7e146f882b4f")}], - lists:filter(fun ({_Type, Curve, _Priv, _Pub}) -> - lists:member(Curve, Curves) - end, - TestCases). - + hexstr2bin("de9edb7d7b7dc1b4d35b61c2ece435373f8343c85b78674dadfc7e146f882b4f")} + ] + ). int_to_bin(X) when X < 0 -> int_to_bin_neg(X, []); int_to_bin(X) -> int_to_bin_pos(X, []). diff --git a/lib/crypto/test/crypto_property_test_SUITE.erl b/lib/crypto/test/crypto_property_test_SUITE.erl index bf137363e8..9c958007c7 100644 --- a/lib/crypto/test/crypto_property_test_SUITE.erl +++ b/lib/crypto/test/crypto_property_test_SUITE.erl @@ -35,6 +35,7 @@ init_per_suite(Config) -> try crypto:start() of ok -> true; {error, already_started} -> true; + {error,{already_started,crypto}} -> true; _ -> false catch _:_ -> false diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk index 72f3b9b792..477280d84b 100644 --- a/lib/crypto/vsn.mk +++ b/lib/crypto/vsn.mk @@ -1 +1 @@ -CRYPTO_VSN = 4.6.5 +CRYPTO_VSN = 4.7 diff --git a/lib/debugger/doc/src/notes.xml b/lib/debugger/doc/src/notes.xml index 64af47a4fb..5e3f2ce878 100644 --- a/lib/debugger/doc/src/notes.xml +++ b/lib/debugger/doc/src/notes.xml @@ -33,6 +33,43 @@ <p>This document describes the changes made to the Debugger application.</p> +<section><title>Debugger 5.0</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>EEP-52 has been implemented.</p> + <p>In binary matching, the size of the segment to be + matched is now allowed to be a guard expression, and + similarly in map matching the keys can now be guard + expressions. See the Erlang Reference Manual and + Programming Examples for more details.</p> + <p>Language compilers or code generators that generate + Core Erlang code may need to be updated to be compatible + with the compiler in OTP 23. For more details, see the + section Backwards Compatibility in <url + href="http://erlang.org/eeps/eep-0052.html">EEP + 52</url>.</p> + <p> + Own Id: OTP-14708</p> + </item> + <item> + <p>The deprecated <c>erlang:get_stacktrace/0</c> BIF now + returns an empty list instead of a stacktrace. To + retrieve the stacktrace, use the extended try/catch + syntax that was introduced in OTP 21. + <c>erlang:get_stacktrace/0</c> is scheduled for removal + in OTP 24.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16484</p> + </item> + </list> + </section> + +</section> + <section><title>Debugger 4.2.8</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/debugger/vsn.mk b/lib/debugger/vsn.mk index 06fc743270..8e334a00f5 100644 --- a/lib/debugger/vsn.mk +++ b/lib/debugger/vsn.mk @@ -1 +1 @@ -DEBUGGER_VSN = 4.2.8 +DEBUGGER_VSN = 5.0 diff --git a/lib/dialyzer/doc/src/notes.xml b/lib/dialyzer/doc/src/notes.xml index b5e6ffb485..675a2b43ef 100644 --- a/lib/dialyzer/doc/src/notes.xml +++ b/lib/dialyzer/doc/src/notes.xml @@ -32,6 +32,20 @@ <p>This document describes the changes made to the Dialyzer application.</p> +<section><title>Dialyzer 4.2</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> Improve handling of <c>maps:remove/2</c>. </p> + <p> + Own Id: OTP-16055 Aux Id: ERL-1002 </p> + </item> + </list> + </section> + +</section> + <section><title>Dialyzer 4.1.1</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/dialyzer/vsn.mk b/lib/dialyzer/vsn.mk index ee680f3bcf..b5a3bbf2b4 100644 --- a/lib/dialyzer/vsn.mk +++ b/lib/dialyzer/vsn.mk @@ -1 +1 @@ -DIALYZER_VSN = 4.1.1 +DIALYZER_VSN = 4.2 diff --git a/lib/edoc/doc/src/notes.xml b/lib/edoc/doc/src/notes.xml index 48bc5d9c74..2871a09476 100644 --- a/lib/edoc/doc/src/notes.xml +++ b/lib/edoc/doc/src/notes.xml @@ -32,6 +32,32 @@ <p>This document describes the changes made to the EDoc application.</p> +<section><title>Edoc 0.12</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> Remove Inets dependency from EDoc. </p> + <p> + Own Id: OTP-15999 Aux Id: PR-2317 </p> + </item> + <item> + <p> + Add support for overloaded Erlang specifications.</p> + <p> + Own Id: OTP-16407 Aux Id: PR-2430 </p> + </item> + <item> + <p>Refactored the internal handling of deprecated and + removed functions.</p> + <p> + Own Id: OTP-16469</p> + </item> + </list> + </section> + +</section> + <section><title>Edoc 0.11</title> <section><title>Improvements and New Features</title> diff --git a/lib/edoc/vsn.mk b/lib/edoc/vsn.mk index 3510fdfccf..5d2bbe769d 100644 --- a/lib/edoc/vsn.mk +++ b/lib/edoc/vsn.mk @@ -1 +1 @@ -EDOC_VSN = 0.11 +EDOC_VSN = 0.12 diff --git a/lib/erl_docgen/doc/src/notes.xml b/lib/erl_docgen/doc/src/notes.xml index e5076a4790..08bcc3d8da 100644 --- a/lib/erl_docgen/doc/src/notes.xml +++ b/lib/erl_docgen/doc/src/notes.xml @@ -31,7 +31,53 @@ </header> <p>This document describes the changes made to the <em>erl_docgen</em> application.</p> - <section><title>Erl_Docgen 0.11</title> + <section><title>Erl_Docgen 1.0</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Embedded documentation (also known as Documentation + Chunks) is now also available in the form of files + according to <url + href="https://www.erlang.org/erlang-enhancement-proposals/eep-0048.html">EEP-48</url>. + The Documentation Chunks are produced by default when + building the other Erlang/OTP documentation. If you want + to only build the embedded documentation you can pass the + <c>DOC_TARGETS=chunks</c> environment variable to make.</p> + <p> + Own Id: OTP-16406</p> + </item> + <item> + <p> + Minor DTD additions.</p> + <p> + Own Id: OTP-16497</p> + </item> + <item> + <p> + The <c>seealso</c> tag has been replaced with type aware + tags instead. The new tags are: + <c>seemfa|seeerl|seetype|seeapp|seecom|seecref|seefile|seeguide</c>.</p> + <p> + <c>fsdescription</c> has been added for adding a title to + groups of functions, for instance Module Callbacks.</p> + <p> + The <c>dtd</c>s of all documentation files have been + trimmed from all unused or rarely-used tags.</p> + <p> + Unused <c>dtd</c>s have been removed.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16503</p> + </item> + </list> + </section> + +</section> + +<section><title>Erl_Docgen 0.11</title> <section><title>Fixed Bugs and Malfunctions</title> <list> diff --git a/lib/erl_docgen/vsn.mk b/lib/erl_docgen/vsn.mk index ebc9516da3..57b2fd10f4 100644 --- a/lib/erl_docgen/vsn.mk +++ b/lib/erl_docgen/vsn.mk @@ -1 +1 @@ -ERL_DOCGEN_VSN = 0.11 +ERL_DOCGEN_VSN = 1.0 diff --git a/lib/erl_interface/doc/src/ei.xml b/lib/erl_interface/doc/src/ei.xml index a7afa1f84b..a47b344c4c 100644 --- a/lib/erl_interface/doc/src/ei.xml +++ b/lib/erl_interface/doc/src/ei.xml @@ -189,7 +189,7 @@ typedef enum { <funcs> <func> - <name since="OTP @OTP-16594@"><ret>int</ret><nametext>ei_cmp_pids(erlang_pid *a, erlang_pid *b)</nametext></name> + <name since="OTP 23.0"><ret>int</ret><nametext>ei_cmp_pids(erlang_pid *a, erlang_pid *b)</nametext></name> <fsummary>Compare two pids.</fsummary> <type> <v><seecref marker="#erlang_pid"><c>erlang_pid</c></seecref></v> @@ -209,7 +209,7 @@ typedef enum { </func> <func> - <name since="OTP @OTP-16594@"><ret>int</ret><nametext>ei_cmp_ports(erlang_port *a, erlang_port *b)</nametext></name> + <name since="OTP 23.0"><ret>int</ret><nametext>ei_cmp_ports(erlang_port *a, erlang_port *b)</nametext></name> <fsummary>Compare two ports.</fsummary> <type> <v><seecref marker="#erlang_port"><c>erlang_port</c></seecref></v> @@ -229,7 +229,7 @@ typedef enum { </func> <func> - <name since="OTP @OTP-16594@"><ret>int</ret><nametext>ei_cmp_refs(erlang_ref *a, erlang_ref *b)</nametext></name> + <name since="OTP 23.0"><ret>int</ret><nametext>ei_cmp_refs(erlang_ref *a, erlang_ref *b)</nametext></name> <fsummary>Compare two references.</fsummary> <type> <v><seecref marker="#erlang_ref"><c>erlang_ref</c></seecref></v> @@ -420,7 +420,7 @@ typedef enum { </func> <func> - <name since="OTP @OTP-16594@"><ret>int</ret><nametext>ei_decode_iodata(const char *buf, int *index, int *size, char *outbuf)</nametext></name> + <name since="OTP 23.0"><ret>int</ret><nametext>ei_decode_iodata(const char *buf, int *index, int *size, char *outbuf)</nametext></name> <fsummary>Decode iodata().</fsummary> <desc> <p>Decodes a term of the type <seeguide marker="system/reference_manual:typespec#builtin_types"><c>iodata()</c></seeguide>. The <c>iodata()</c> term will be diff --git a/lib/erl_interface/doc/src/ei_connect.xml b/lib/erl_interface/doc/src/ei_connect.xml index f85652dd5b..c5ef9440c5 100644 --- a/lib/erl_interface/doc/src/ei_connect.xml +++ b/lib/erl_interface/doc/src/ei_connect.xml @@ -478,8 +478,8 @@ typedef struct { <func> <name since=""><ret>int</ret><nametext>ei_connect(ei_cnode* ec, char *nodename)</nametext></name> <name since=""><ret>int</ret><nametext>ei_xconnect(ei_cnode* ec, Erl_IpAddr adr, char *alivename)</nametext></name> - <name since="OTP @OTP-16251@"><ret>int</ret><nametext>ei_connect_host_port(ei_cnode* ec, char *hostname, int port)</nametext></name> - <name since="OTP @OTP-16251@"><ret>int</ret><nametext>ei_xconnect_host_port(ei_cnode* ec, Erl_IpAddr adr, int port)</nametext></name> + <name since="OTP 23.0"><ret>int</ret><nametext>ei_connect_host_port(ei_cnode* ec, char *hostname, int port)</nametext></name> + <name since="OTP 23.0"><ret>int</ret><nametext>ei_xconnect_host_port(ei_cnode* ec, Erl_IpAddr adr, int port)</nametext></name> <fsummary>Establish a connection to an Erlang node.</fsummary> <type> <v><seecref marker="#ei_cnode"><c>ei_cnode</c></seecref></v> @@ -648,8 +648,8 @@ if (ei_connect_init(&ec, "madonna", "cookie...", n++) < 0) { <func> <name since=""><ret>int</ret><nametext>ei_connect_tmo(ei_cnode* ec, char *nodename, unsigned timeout_ms)</nametext></name> <name since=""><ret>int</ret><nametext>ei_xconnect_tmo(ei_cnode* ec, Erl_IpAddr adr, char *alivename, unsigned timeout_ms)</nametext></name> - <name since="OTP @OTP-16251@"><ret>int</ret><nametext>ei_connect_host_port_tmo(ei_cnode* ec, char *hostname, int port, unsigned ms)</nametext></name> - <name since="OTP @OTP-16251@"><ret>int</ret><nametext>ei_xconnect_host_port_tmo(ei_cnode* ec, Erl_IpAddr adr, int port, unsigned ms)</nametext></name> + <name since="OTP 23.0"><ret>int</ret><nametext>ei_connect_host_port_tmo(ei_cnode* ec, char *hostname, int port, unsigned ms)</nametext></name> + <name since="OTP 23.0"><ret>int</ret><nametext>ei_xconnect_host_port_tmo(ei_cnode* ec, Erl_IpAddr adr, int port, unsigned ms)</nametext></name> <fsummary>Establish a connection to an Erlang node with optional time-out.</fsummary> <type> @@ -722,7 +722,7 @@ if (ei_connect_init(&ec, "madonna", "cookie...", n++) < 0) { </func> <func> - <name since="OTP @OTP-16594@"><ret>int</ret><nametext>ei_make_pid(ei_cnode *ec, erlang_pid *pid)</nametext></name> + <name since="OTP 23.0"><ret>int</ret><nametext>ei_make_pid(ei_cnode *ec, erlang_pid *pid)</nametext></name> <fsummary>Create a new process identifier</fsummary> <type> <v><seecref marker="#ei_cnode"><c>ei_cnode</c></seecref></v> @@ -747,7 +747,7 @@ if (ei_connect_init(&ec, "madonna", "cookie...", n++) < 0) { </func> <func> - <name since="OTP @OTP-16594@"><ret>int</ret><nametext>ei_make_ref(ei_cnode *ec, erlang_ref *ref)</nametext></name> + <name since="OTP 23.0"><ret>int</ret><nametext>ei_make_ref(ei_cnode *ec, erlang_ref *ref)</nametext></name> <fsummary>Create a new reference</fsummary> <type> <v><seecref marker="#ei_cnode"><c>ei_cnode</c></seecref></v> diff --git a/lib/erl_interface/doc/src/notes.xml b/lib/erl_interface/doc/src/notes.xml index ba5f501e85..37eb379d95 100644 --- a/lib/erl_interface/doc/src/notes.xml +++ b/lib/erl_interface/doc/src/notes.xml @@ -31,6 +31,178 @@ </header> <p>This document describes the changes made to the Erl_interface application.</p> +<section><title>Erl_Interface 4.0</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Fix various compiler warnings on 64-bit Windows.</p> + <p> + Own Id: OTP-15800</p> + </item> + <item> + <p><c>erl_call</c> will now work properly on systems that + cannot resolve their own hostname.</p> + <p> + Own Id: OTP-16604</p> + </item> + <item> + <p>Various bug fixes:</p> <list> <item>Internal error + checking in various functions.</item> <item><seecref + marker="ei_connect#ei_rpc"><c>ei_rpc()</c></seecref> + accepted any 2-tuple message as an rpc response.</item> + <item><seecref + marker="ei#ei_decode_ref"><c>ei_decode_ref()</c></seecref> + now refuse to write outside of allocated memory in case a + huge reference is decoded.</item> <item><seecref + marker="ei#ei_decode_ei_term"><c>ei_decode_ei_term()</c></seecref> + now reports the same term types as <seecref + marker="ei#ei_get_type"><c>ei_get_type()</c></seecref>.</item> + </list> + <p> + Own Id: OTP-16623</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>A client node can receive its node name dynamically + from the node that it first connects to. This featured + can by used by</p> <list> <item><p>starting with <c>erl + -sname undefined</c></p></item> <item><p>erl_interface + functions <c>ei_connect_init</c> and friends</p></item> + <item><p><c>erl_call -R</c></p></item> </list> + <p> + Own Id: OTP-13812</p> + </item> + <item> + <p> + Increased size of node incarnation numbers (aka + "creation"), from 2 bits to 32 bits. This will reduce the + risk of pids/ports/refs, from different node incarnation + with the same name, being mixed up.</p> + <p> + Own Id: OTP-15603</p> + </item> + <item> + <p> + Fix various build issues when compiling Erlang/OTP to the + IBM AIX platform.</p> + <p> + Own Id: OTP-15866 Aux Id: PR-2110 </p> + </item> + <item> + <p> + Improved node connection setup handshake protocol. Made + possible to agree on protocol version without dependence + on <c>epmd</c> or other prior knowledge of peer node + version. Also added exchange of node incarnation + ("creation") values and expanded the distribution + capability flag field from 32 to 64 bits.</p> + <p> + Own Id: OTP-16229</p> + </item> + <item> + <p> + New <c>erl_call</c> option <c>-address [Host]:Port</c> to + connect directly to a node without being dependent on + <c>epmd</c> to resolve the node name.</p> + <p> + Own Id: OTP-16251</p> + </item> + <item> + <p> + As announced in OTP 22.0, the deprecated parts of + <c>erl_interface</c> have now been removed (essentially + all C functions with prefix <c>erl_</c>).</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16328</p> + </item> + <item> + <p> + As announced in OTP 22.0, the previously existing limited + support for VxWorks has now been removed.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16329 Aux Id: OTP-15621 </p> + </item> + <item> + <p> + New function <c>ei_connect_host_port</c> and friends to + allow node connection without being dependent on + <c>epmd</c> for node name resolution.</p> + <p> + Own Id: OTP-16496 Aux Id: OTP-16251 </p> + </item> + <item> + <p>A number of new functions have been added to the + <c>erl_interface</c> API:</p> <list> <item><seecref + marker="erl_interface:ei#ei_cmp_pids"><c>ei_cmp_pids()</c></seecref></item> + <item><seecref + marker="erl_interface:ei#ei_cmp_ports"><c>ei_cmp_ports()</c></seecref></item> + <item><seecref + marker="erl_interface:ei#ei_cmp_refs"><c>ei_cmp_refs()</c></seecref></item> + <item><seecref + marker="erl_interface:ei#ei_decode_iodata"><c>ei_decode_iodata()</c></seecref></item> + <item><seecref + marker="erl_interface:ei_connect#ei_make_pid"><c>ei_make_pid()</c></seecref></item> + <item><seecref + marker="erl_interface:ei_connect#ei_make_ref"><c>ei_make_ref()</c></seecref></item> + </list> + <p> + Own Id: OTP-16594</p> + </item> + <item> + <p>Added a <c>-timeout</c> option to <c>erl_call</c>.</p> + <p> + Own Id: OTP-16624</p> + </item> + <item> + <p>The <c>erl_interface</c> <seecref + marker="erl_interface:registry"><c>registry</c></seecref> + functionality is deprecated as of OTP 23, and will be + removed in OTP 24. Reasonably new <c>gcc</c> compilers + will issue deprecation warnings when using this + functionality. In order to disable these warnings, define + the macro <c>EI_NO_DEPR_WARN</c>.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16630</p> + </item> + <item> + <p> + Documentation improvements.</p> + <p> + Own Id: OTP-16633</p> + </item> + </list> + </section> + + + <section><title>Known Bugs and Problems</title> + <list> + <item> + <p> + The <c>ei</c> API for decoding/encoding terms is not + fully 64-bit compatible since terms that have a + representation on the external term format larger than 2 + GB cannot be handled.</p> + <p> + Own Id: OTP-16607 Aux Id: OTP-16608 </p> + </item> + </list> + </section> + +</section> + <section><title>Erl_Interface 3.13.2</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/erl_interface/vsn.mk b/lib/erl_interface/vsn.mk index 31e3d1c0a0..67aac42e4e 100644 --- a/lib/erl_interface/vsn.mk +++ b/lib/erl_interface/vsn.mk @@ -1,2 +1,2 @@ -EI_VSN = 3.13.2 +EI_VSN = 4.0 ERL_INTERFACE_VSN = $(EI_VSN) diff --git a/lib/eunit/doc/src/notes.xml b/lib/eunit/doc/src/notes.xml index 200ffc3714..b015fe1f89 100644 --- a/lib/eunit/doc/src/notes.xml +++ b/lib/eunit/doc/src/notes.xml @@ -33,6 +33,35 @@ </header> <p>This document describes the changes made to the EUnit application.</p> +<section><title>Eunit 2.5</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> Let <c>eunit_surefire</c> skip invalid XML 1.0 + characters. </p> + <p> + Own Id: OTP-15950 Aux Id: PR-2316, ERL-991 </p> + </item> + <item> + <p> + Add new macro ?capturedOutput for enabling to write test + cases that verify data printed to standard out</p> + <p> + Own Id: OTP-16275 Aux Id: PR-2424 </p> + </item> + <item> + <p> + Add option to limit print depth of exceptions generated + by eunit test suites.</p> + <p> + Own Id: OTP-16549 Aux Id: PR-2532 </p> + </item> + </list> + </section> + +</section> + <section><title>Eunit 2.4.1</title> <section><title>Improvements and New Features</title> diff --git a/lib/eunit/vsn.mk b/lib/eunit/vsn.mk index f96db657cf..b8410e4071 100644 --- a/lib/eunit/vsn.mk +++ b/lib/eunit/vsn.mk @@ -1 +1 @@ -EUNIT_VSN = 2.4.1 +EUNIT_VSN = 2.5 diff --git a/lib/hipe/doc/src/HiPE_app.xml b/lib/hipe/doc/src/HiPE_app.xml index 27fbf16fd0..ac6850387f 100644 --- a/lib/hipe/doc/src/HiPE_app.xml +++ b/lib/hipe/doc/src/HiPE_app.xml @@ -72,8 +72,7 @@ </item> <tag>Stack traces</tag> - <item><p>Stack traces returned from <seemfa marker="erts:erlang#get_stacktrace/0"> - <c>erlang:get_stacktrace/0</c></seemfa> or as part of <c>'EXIT'</c> terms + <item><p>Stack traces returned from <c>try</c>/<c>catch</c> or as part of <c>'EXIT'</c> terms can look incomplete if HiPE compiled functions are involved. Typically a stack trace will contain only BEAM compiled functions or only HiPE compiled functions, depending on where the exception was raised.</p> diff --git a/lib/hipe/doc/src/notes.xml b/lib/hipe/doc/src/notes.xml index f13551db83..1f9ab57727 100644 --- a/lib/hipe/doc/src/notes.xml +++ b/lib/hipe/doc/src/notes.xml @@ -31,6 +31,38 @@ </header> <p>This document describes the changes made to HiPE.</p> +<section><title>Hipe 4.0</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p>Fixed a rare miss-compilation of tuple matching.</p> + <p> + Own Id: OTP-16470</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>The deprecated <c>erlang:get_stacktrace/0</c> BIF now + returns an empty list instead of a stacktrace. To + retrieve the stacktrace, use the extended try/catch + syntax that was introduced in OTP 21. + <c>erlang:get_stacktrace/0</c> is scheduled for removal + in OTP 24.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16484</p> + </item> + </list> + </section> + +</section> + <section><title>Hipe 3.19.3</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/hipe/vsn.mk b/lib/hipe/vsn.mk index 5d34c61169..9a612e9063 100644 --- a/lib/hipe/vsn.mk +++ b/lib/hipe/vsn.mk @@ -1 +1 @@ -HIPE_VSN = 3.19.3 +HIPE_VSN = 4.0 diff --git a/lib/inets/doc/src/notes.xml b/lib/inets/doc/src/notes.xml index fe6d7c8c83..0dfd01eab3 100644 --- a/lib/inets/doc/src/notes.xml +++ b/lib/inets/doc/src/notes.xml @@ -33,7 +33,31 @@ <file>notes.xml</file> </header> - <section><title>Inets 7.1.3</title> + <section><title>Inets 7.2</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Remove support for deprecated functionality. Support for + mod_esi eval scheme, mod_htacess, mod_browser, apache + config files and deprecated httpd_conf functions are + dropped. Module http_uri is deprecated.</p> + <p> + Own Id: OTP-16252</p> + </item> + <item> + <p>Refactored the internal handling of deprecated and + removed functions.</p> + <p> + Own Id: OTP-16469</p> + </item> + </list> + </section> + +</section> + +<section><title>Inets 7.1.3</title> <section><title>Fixed Bugs and Malfunctions</title> <list> diff --git a/lib/inets/vsn.mk b/lib/inets/vsn.mk index b0ae8655d2..2eaef40a7a 100644 --- a/lib/inets/vsn.mk +++ b/lib/inets/vsn.mk @@ -19,6 +19,6 @@ # %CopyrightEnd% APPLICATION = inets -INETS_VSN = 7.1.3 +INETS_VSN = 7.2 PRE_VSN = APP_VSN = "$(APPLICATION)-$(INETS_VSN)$(PRE_VSN)" diff --git a/lib/jinterface/doc/src/notes.xml b/lib/jinterface/doc/src/notes.xml index 9eeca8e963..fca0b46878 100644 --- a/lib/jinterface/doc/src/notes.xml +++ b/lib/jinterface/doc/src/notes.xml @@ -31,6 +31,35 @@ </header> <p>This document describes the changes made to the Jinterface application.</p> +<section><title>Jinterface 1.11</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Increased size of node incarnation numbers (aka + "creation"), from 2 bits to 32 bits. This will reduce the + risk of pids/ports/refs, from different node incarnation + with the same name, being mixed up.</p> + <p> + Own Id: OTP-15603</p> + </item> + <item> + <p> + Improved node connection setup handshake protocol. Made + possible to agree on protocol version without dependence + on <c>epmd</c> or other prior knowledge of peer node + version. Also added exchange of node incarnation + ("creation") values and expanded the distribution + capability flag field from 32 to 64 bits.</p> + <p> + Own Id: OTP-16229</p> + </item> + </list> + </section> + +</section> + <section><title>Jinterface 1.10.1</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/jinterface/vsn.mk b/lib/jinterface/vsn.mk index f15a3f323b..f253cf7431 100644 --- a/lib/jinterface/vsn.mk +++ b/lib/jinterface/vsn.mk @@ -1 +1 @@ -JINTERFACE_VSN = 1.10.1 +JINTERFACE_VSN = 1.11 diff --git a/lib/kernel/doc/src/code.xml b/lib/kernel/doc/src/code.xml index 17ab341068..81186b6876 100644 --- a/lib/kernel/doc/src/code.xml +++ b/lib/kernel/doc/src/code.xml @@ -705,7 +705,7 @@ ok = code:finish_loading(Prepared), </desc> </func> <func> - <name name="all_available" arity="0" since="OTP @OTP-16494@"/> + <name name="all_available" arity="0" since="OTP 23.0"/> <fsummary>Get all available modules.</fsummary> <type name="loaded_filename"/> <type name="loaded_ret_atoms"/> @@ -769,7 +769,7 @@ rpc:call(Node, code, load_binary, [Module, Filename, Binary]), </desc> </func> <func> - <name name="get_doc" arity="1" since="OTP @OTP-16406@"/> + <name name="get_doc" arity="1" since="OTP 23.0"/> <fsummary>Gets the documentation for a module.</fsummary> <desc> <p>Searches the code path for EEP-48 style documentation and returns it diff --git a/lib/kernel/doc/src/erl_epmd.xml b/lib/kernel/doc/src/erl_epmd.xml index fbb316bbfc..03aa949516 100644 --- a/lib/kernel/doc/src/erl_epmd.xml +++ b/lib/kernel/doc/src/erl_epmd.xml @@ -73,7 +73,7 @@ </func> <func> - <name name="listen_port_please" arity="2" since="OTP @OTP-16250@"/> + <name name="listen_port_please" arity="2" since="OTP 23.0"/> <fsummary>Returns the port number for the local node.</fsummary> <desc> <p>Called by the distribution module to get which port the diff --git a/lib/kernel/doc/src/erpc.xml b/lib/kernel/doc/src/erpc.xml index d609bc3fd9..64032a7f94 100644 --- a/lib/kernel/doc/src/erpc.xml +++ b/lib/kernel/doc/src/erpc.xml @@ -28,7 +28,7 @@ <date>2020-02-20</date> <rev>A</rev> </header> - <module since="OTP @OTP-13450@">erpc</module> + <module since="OTP 23.0">erpc</module> <modulesummary>Enhanced Remote Procedure Call</modulesummary> <description> <p> @@ -75,8 +75,8 @@ <funcs> <func> - <name name="call" arity="2" since="OTP @OTP-13450@"/> - <name name="call" arity="3" since="OTP @OTP-13450@"/> + <name name="call" arity="2" since="OTP 23.0"/> + <name name="call" arity="3" since="OTP 23.0"/> <fsummary>Evaluate a function call on a node.</fsummary> <desc> <p> @@ -96,8 +96,8 @@ </func> <func> - <name name="call" arity="4" since="OTP @OTP-13450@"/> - <name name="call" arity="5" since="OTP @OTP-13450@"/> + <name name="call" arity="4" since="OTP 23.0"/> + <name name="call" arity="5" since="OTP 23.0"/> <fsummary>Evaluate a function call on a node.</fsummary> <desc> <p> @@ -249,7 +249,7 @@ </func> <func> - <name name="cast" arity="2" since="OTP @OTP-13450@"/> + <name name="cast" arity="2" since="OTP 23.0"/> <fsummary>Evaluate a function call on a node.</fsummary> <desc> <p> @@ -266,7 +266,7 @@ </func> <func> - <name name="cast" arity="4" since="OTP @OTP-13450@"/> + <name name="cast" arity="4" since="OTP 23.0"/> <fsummary>Evaluate a function call on a node ignoring the result.</fsummary> <desc> <p> @@ -298,7 +298,7 @@ </func> <func> - <name name="check_response" arity="2" since="OTP @OTP-13450@"/> + <name name="check_response" arity="2" since="OTP 23.0"/> <fsummary>Check if a message is a response corresponding to a previously sent call request.</fsummary> <desc> @@ -341,8 +341,8 @@ </func> <func> - <name name="multicall" arity="2" since="OTP @OTP-13450@"/> - <name name="multicall" arity="3" since="OTP @OTP-13450@"/> + <name name="multicall" arity="2" since="OTP 23.0"/> + <name name="multicall" arity="3" since="OTP 23.0"/> <fsummary>Evaluate a function call on a node.</fsummary> <desc> <p> @@ -362,8 +362,8 @@ </func> <func> - <name name="multicall" arity="4" since="OTP @OTP-13450@"/> - <name name="multicall" arity="5" since="OTP @OTP-13450@"/> + <name name="multicall" arity="4" since="OTP 23.0"/> + <name name="multicall" arity="5" since="OTP 23.0"/> <fsummary>Evaluate a function call on a number of nodes.</fsummary> <type name="caught_call_exception"/> <type name="stack_item"/> @@ -466,7 +466,7 @@ my_multicall(Nodes, Module, Function, Args) -> </func> <func> - <name name="multicast" arity="2" since="OTP @OTP-13450@"/> + <name name="multicast" arity="2" since="OTP 23.0"/> <fsummary>Evaluate a function call on a set nodes.</fsummary> <desc> <p> @@ -483,7 +483,7 @@ my_multicall(Nodes, Module, Function, Args) -> </func> <func> - <name name="multicast" arity="4" since="OTP @OTP-13450@"/> + <name name="multicast" arity="4" since="OTP 23.0"/> <fsummary>Evaluate a function call on a set of nodes ignoring the result.</fsummary> <desc> <p> @@ -517,8 +517,8 @@ my_multicall(Nodes, Module, Function, Args) -> </func> <func> - <name name="receive_response" arity="1" since="OTP @OTP-13450@"/> - <name name="receive_response" arity="2" since="OTP @OTP-13450@"/> + <name name="receive_response" arity="1" since="OTP 23.0"/> + <name name="receive_response" arity="2" since="OTP 23.0"/> <fsummary>Receive a call response corresponding to a previously sent call request.</fsummary> <desc> @@ -581,7 +581,7 @@ my_call(Node, Module, Function, Args, Timeout) -> </func> <func> - <name name="send_request" arity="2" since="OTP @OTP-13450@"/> + <name name="send_request" arity="2" since="OTP 23.0"/> <fsummary>Send a request to evaluate a function call on a node.</fsummary> <desc> <p> @@ -606,7 +606,7 @@ my_call(Node, Module, Function, Args, Timeout) -> </func> <func> - <name name="send_request" arity="4" since="OTP @OTP-13450@"/> + <name name="send_request" arity="4" since="OTP 23.0"/> <fsummary>Send a request to evaluate a function call on a node.</fsummary> <desc> <p> @@ -633,8 +633,8 @@ my_call(Node, Module, Function, Args, Timeout) -> </func> <func> - <name name="wait_response" arity="1" since="OTP @OTP-13450@"/> - <name name="wait_response" arity="2" since="OTP @OTP-13450@"/> + <name name="wait_response" arity="1" since="OTP 23.0"/> + <name name="wait_response" arity="2" since="OTP 23.0"/> <fsummary>Wait or poll for a call response corresponding to a previously sent call request.</fsummary> <desc> diff --git a/lib/kernel/doc/src/notes.xml b/lib/kernel/doc/src/notes.xml index 624ccb6591..478607d0c8 100644 --- a/lib/kernel/doc/src/notes.xml +++ b/lib/kernel/doc/src/notes.xml @@ -31,6 +31,406 @@ </header> <p>This document describes the changes made to the Kernel application.</p> +<section><title>Kernel 7.0</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Fix race condition during shutdown when + <c>shell_history</c> is enabled. The race condition would + trigger crashes in <c>disk_log</c>.</p> + <p> + Own Id: OTP-16008 Aux Id: PR-2302 </p> + </item> + <item> + <p> + Fix the Erlang distribution to handle the scenario when a + node connects that can handle message fragmentation but + can not handle the atom cache. This bug only affects + users that have implemented a custom distribution + carrier. It has been present since OTP-21.</p> + <p> + The <c>DFLAG_FRAGMENT</c> distribution flag was added to + the set of flags that can be rejected by a distribution + implementation.</p> + <p> + Own Id: OTP-16284</p> + </item> + <item> + <p> + Fix bug where a binary was not allowed to be the format + string in calls to <c>logger:log</c>.</p> + <p> + Own Id: OTP-16395 Aux Id: PR-2444 </p> + </item> + <item> + <p> + Fix bug where <c>logger</c> would end up in an infinite + loop when trying to log the crash of a handler or + formatter.</p> + <p> + Own Id: OTP-16489 Aux Id: ERL-1134 </p> + </item> + <item> + <p> + <c>code:lib_dir/1</c> has been fixed to also return the + lib dir for <c>erts</c>.</p> + <p> + This is been marked as an incompatibility for any + application that depended on <c>{error,bad_name}</c> to + be returned for <c>erts</c>.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16502</p> + </item> + <item> + <p> + The application <c>stop/1</c> callback was not called if + the application master of the application terminated.</p> + <p> + Own Id: OTP-16504 Aux Id: PR-2328 </p> + </item> + <item> + <p> + Fix bug in <c>application:loaded_applications/0</c> that + could cause it to fail with <c>badarg</c> if for example + a concurrent upgrade/downgrade is running.</p> + <p> + Own Id: OTP-16627 Aux Id: PR-2601 </p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>A new module <seeerl + marker="kernel:erpc"><c>erpc</c></seeerl> has been + introduced in the <c>kernel</c> application. The + <c>erpc</c> module implements an enhanced subset of the + operations provided by the <seeerl + marker="kernel:rpc"><c>rpc</c></seeerl> module. Enhanced + in the sense that it makes it possible to distinguish + between returned value, raised exceptions, and other + errors. <c>erpc</c> also has better performance and + scalability than the original <c>rpc</c> implementation. + This by utilizing the newly introduced <seemfa + marker="erts:erlang#spawn_request/5"><c>spawn_request()</c></seemfa> + BIF. Also the <c>rpc</c> module benefits from these + improvements by utilizing <c>erpc</c> when it is + possible. </p><p> This change has been marked as a + potential incompatibility since <seemfa + marker="kernel:rpc#block_call/5"><c>rpc:block_call()</c></seemfa> + now only is guaranteed to block other <c>block_call()</c> + operations. The documentation previously claimed that it + would block all <c>rpc</c> operations. This has however + never been the case. It previously did not block + node-local <c>block_call()</c> operations.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-13450 Aux Id: OTP-15251 </p> + </item> + <item> + <p>A client node can receive its node name dynamically + from the node that it first connects to. This featured + can by used by</p> <list> <item><p>starting with <c>erl + -sname undefined</c></p></item> <item><p>erl_interface + functions <c>ei_connect_init</c> and friends</p></item> + <item><p><c>erl_call -R</c></p></item> </list> + <p> + Own Id: OTP-13812</p> + </item> + <item> + <p> + Improved the printout of single line logger events for + most of the OTP behaviours in STDLIB and Kernel. This + includes <c>proc_lib</c>, <c>gen_server</c>, + <c>gen_event</c>, <c>gen_statem</c>, <c>gen_fsm</c>, + <c>supervisor</c>, <c>supervisor_bridge</c> and + <c>application</c>.</p> + <p> + Improved the <seeerl + marker="kernel:logger_formatter#chars_limit"><c>chars_limit</c></seeerl> + and <seeerl + marker="kernel:logger_formatter#depth"><c>depth</c></seeerl> + handling in <c>proc_lib</c> and when formatting of + exceptions.</p> + <p> + Own Id: OTP-15299</p> + </item> + <item> + <p> + Remove usage and documentation of old requests of the + I/O-protocol.</p> + <p> + Own Id: OTP-15695</p> + </item> + <item> + <p>Directories can now be opened by <c>file:open/2</c> + when passing the <c>directory</c> option.</p> + <p> + Own Id: OTP-15835 Aux Id: PR-2212 </p> + </item> + <item> + <p> + The check of whether to log or not based on the log level + in <c>logger</c> has been optimized by using + <c>persistent_term</c> to store the log level.</p> + <p> + Own Id: OTP-15948 Aux Id: PR-2356 </p> + </item> + <item> + <p><c>file:read_file_info/2</c> can now be used on opened + files and directories.</p> + <p> + Own Id: OTP-15956 Aux Id: PR-2231 </p> + </item> + <item> + <p> + The <c>-config</c> option to <c>erl</c> now can take + multiple config files without repeating the + <c>-config</c> option. Example:</p> + <p> + erl -config sys local</p> + <p> + Own Id: OTP-16148 Aux Id: PR-2373 </p> + </item> + <item> + <p> + Improved node connection setup handshake protocol. Made + possible to agree on protocol version without dependence + on <c>epmd</c> or other prior knowledge of peer node + version. Also added exchange of node incarnation + ("creation") values and expanded the distribution + capability flag field from 32 to 64 bits.</p> + <p> + Own Id: OTP-16229</p> + </item> + <item> + <p>The possibility to run Erlang distribution without + relying on EPMD has been extended. To achieve this a + couple of new options to the inet distribution has been + added.</p> <taglist> <tag>-dist_listen false</tag> + <item>Setup the distribution channel, but do not listen + for incoming connection. This is useful when you want to + use the current node to interact with another node on the + same machine without it joining the entire + cluster.</item> <tag>-erl_epmd_port Port</tag> + <item>Configure a default port that the built-in EPMD + client should return. This allows the local node to know + the port to connect to for any other node in the + cluster.</item> </taglist> <p>The <c>erl_epmd</c> + callback API has also been extended to allow returning + <c>-1</c> as the creation which means that a random + creation will be created by the node.</p> + <p>In addition a new callback function called + <c>listen_port_please</c> has been added that allows the + callback to return which listen port the distribution + should use. This can be used instead of + <c>inet_dist_listen_min/max</c> if the listen port is to + be fetched from an external service.</p> + <p> + Own Id: OTP-16250</p> + </item> + <item> + <p> + A first EXPERIMENTAL module that is a <c>socket</c> + backend to <c>gen_tcp</c> and <c>inet</c> has been + implemented. Others will follow. Feedback will be + appreciated.</p> + <p> + Own Id: OTP-16260 Aux Id: OTP-15403 </p> + </item> + <item> + <p> + The new experimental <c>socket</c> module has been moved + to the Kernel application.</p> + <p> + Own Id: OTP-16312</p> + </item> + <item> + <p> + Replace usage of deprecated function in the <c>group</c> + module.</p> + <p> + Own Id: OTP-16345</p> + </item> + <item> + <p> + Minor updates due to the new spawn improvements made.</p> + <p> + Own Id: OTP-16368 Aux Id: OTP-15251 </p> + </item> + <item> + <p> + Update of <seeerl + marker="kernel:seq_trace#whatis">sequential + tracing</seeerl> to also support other information + transfers than message passing.</p> + <p> + Own Id: OTP-16370 Aux Id: OTP-15251, OTP-15232 </p> + </item> + <item> + <p><c>code:module_status/1</c> now accepts a list of + modules. <c>code:module_status/0</c>, which returns the + statuses for all loaded modules, has been added.</p> + <p> + Own Id: OTP-16402</p> + </item> + <item> + <p><c>filelib:wildcard/1,2</c> is now twice as fast when + a double star (<c>**</c>) is part of the pattern.</p> + <p> + Own Id: OTP-16419</p> + </item> + <item> + <p> A new implementation of distributed named process + groups has been introduced. It is available in the + <seeerl marker="kernel:pg"><c>pg</c></seeerl> module. + </p><p> Note that this <c>pg</c> module only has the name + in common with the experimental <c>pg</c> module that was + present in <c>stdlib</c> up until OTP 17. </p><p> Thanks + to Maxim Fedorov for the implementation. </p> + <p> + Own Id: OTP-16453 Aux Id: PR-2524 </p> + </item> + <item> + <p> The <seeerl marker="kernel:pg2"><c>pg2</c></seeerl> + module has been deprecated. It has also been scheduled + for removal in OTP 24. </p><p> You are advised to replace + the usage of <c>pg2</c> with the newly introduced <seeerl + marker="kernel:pg"><c>pg</c></seeerl> module. <c>pg</c> + has a similar API, but with a more scalable + implementation. </p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16455</p> + </item> + <item> + <p>Refactored the internal handling of deprecated and + removed functions.</p> + <p> + Own Id: OTP-16469</p> + </item> + <item> + <p> + The internal hosts file resolver cache <c>inet_hosts</c> + has been rewritten to behave better when the hosts file + changes. For example the cache is updated per entry + instead of cleared and reloaded so lookups do not + temporarily fail during reloading, and; when multiple + processes simultaneously request reload these are now + folded into one instead of all done in sequence. Reported + and first solution suggestion by Maxim Fedorov.</p> + <p> + Own Id: OTP-16487 Aux Id: PR-2516 </p> + </item> + <item> + <p> + Add <c>code:all_available/0</c> that can be used to get + all available modules.</p> + <p> + Own Id: OTP-16494</p> + </item> + <item> + <p> + As of OTP 23, the distributed <seeerl + marker="kernel:disk_log"><c>disk_log</c></seeerl> feature + has been deprecated. It has also been scheduled for + removal in OTP 24.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16495</p> + </item> + <item> + <p> + Add the function <c>code:fetch_docs/1</c> for fetching + embedded documentation for aa Erlang module.</p> + <p> + Own Id: OTP-16499</p> + </item> + <item> + <p> + Improve configure for the net nif, which should increase + portability.</p> + <p> + Own Id: OTP-16530 Aux Id: OTP-16464 </p> + </item> + <item> + <p> + socket: Socket counters and socket global counters are + now represented as maps (instead of property lists).</p> + <p> + Own Id: OTP-16535</p> + </item> + <item> + <p> + The experimental socket module has gotten restrictions + removed so now the 'seqpacket' socket type should work + for any communication domain (protocol family) where the + OS supports it, typically the Unix Domain.</p> + <p> + Own Id: OTP-16550 Aux Id: ERIERL-476 </p> + </item> + <item> + <p> + Allow using custom IO devices in <c>logger_std_h</c>.</p> + <p> + Own Id: OTP-16563 Aux Id: PR-2523 </p> + </item> + <item> + <p>Added <c>file:del_dir_r/1</c> which deletes a + directory together with all of its contents, similar to + <c>rm -rf</c> on Unix systems.</p> + <p> + Own Id: OTP-16570 Aux Id: PR-2565 </p> + </item> + <item> + <p> + socket: By default the socket options rcvtimeo and + sndtimeo are now disabled. To enable these, OTP now has + to be built with the configure option + --enable-esock-rcvsndtimeo</p> + <p> + Own Id: OTP-16620</p> + </item> + <item> + <p> + The experimental gen_tcp compatibility code utilizing the + socket module could loose buffered data when receiving a + specified number of bytes. This bug has been fixed. + Reported by Maksim Lapshin on bugs.erlang.org ERL-1234</p> + <p> + Own Id: OTP-16632 Aux Id: ERL-1234 </p> + </item> + </list> + </section> + +</section> + +<section><title>Kernel 6.5.2.1</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Fix bug in <c>application:loaded_applications/0</c> that + could cause it to fail with <c>badarg</c> if for example + a concurrent upgrade/downgrade is running.</p> + <p> + Own Id: OTP-16627 Aux Id: PR-2601 </p> + </item> + </list> + </section> + +</section> + <section><title>Kernel 6.5.2</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/kernel/doc/src/socket.xml b/lib/kernel/doc/src/socket.xml index 6ff7376727..5a9fdf98f7 100644 --- a/lib/kernel/doc/src/socket.xml +++ b/lib/kernel/doc/src/socket.xml @@ -505,8 +505,8 @@ </func> <func> - <name name="open" arity="1" since="OTP @OTP-16398@"/> - <name name="open" arity="2" clause_i="1" since="OTP @OTP-16398@"/> + <name name="open" arity="1" since="OTP 23.0"/> + <name name="open" arity="2" clause_i="1" since="OTP 23.0"/> <fsummary>Create an endpoint for communication.</fsummary> <desc> <p>Create an endpoint (socket) for communication based on an diff --git a/lib/kernel/src/kernel.app.src b/lib/kernel/src/kernel.app.src index e58151f295..e9f6049d5f 100644 --- a/lib/kernel/src/kernel.app.src +++ b/lib/kernel/src/kernel.app.src @@ -155,6 +155,6 @@ {shell_docs_ansi,auto} ]}, {mod, {kernel, []}}, - {runtime_dependencies, ["erts-@OTP-15251@", "stdlib-@OTP-15251@", "sasl-3.0"]} + {runtime_dependencies, ["erts-11.0", "stdlib-3.13", "sasl-3.0"]} ] }. diff --git a/lib/kernel/src/kernel.appup.src b/lib/kernel/src/kernel.appup.src index f42dd8ca6e..09a55d6f0a 100644 --- a/lib/kernel/src/kernel.appup.src +++ b/lib/kernel/src/kernel.appup.src @@ -21,6 +21,7 @@ %% versions from the following OTP releases: %% - OTP 21 %% - OTP 22 +%% - OTP 23 %% %% We also allow upgrade from, and downgrade to all %% versions that have branched off from the above @@ -44,7 +45,8 @@ {<<"^6\\.4\\.1(?:\\.[0-9]+)*$">>,[restart_new_emulator]}, {<<"^6\\.5$">>,[restart_new_emulator]}, {<<"^6\\.5\\.0(?:\\.[0-9]+)+$">>,[restart_new_emulator]}, - {<<"^6\\.5\\.1(?:\\.[0-9]+)*$">>,[restart_new_emulator]}], + {<<"^6\\.5\\.1(?:\\.[0-9]+)*$">>,[restart_new_emulator]}, + {<<"^6\\.5\\.2(?:\\.[0-9]+)*$">>,[restart_new_emulator]}], [{<<"^6\\.0$">>,[restart_new_emulator]}, {<<"^6\\.0\\.0(?:\\.[0-9]+)+$">>,[restart_new_emulator]}, {<<"^6\\.0\\.1(?:\\.[0-9]+)*$">>,[restart_new_emulator]}, @@ -62,4 +64,5 @@ {<<"^6\\.4\\.1(?:\\.[0-9]+)*$">>,[restart_new_emulator]}, {<<"^6\\.5$">>,[restart_new_emulator]}, {<<"^6\\.5\\.0(?:\\.[0-9]+)+$">>,[restart_new_emulator]}, - {<<"^6\\.5\\.1(?:\\.[0-9]+)*$">>,[restart_new_emulator]}]}. + {<<"^6\\.5\\.1(?:\\.[0-9]+)*$">>,[restart_new_emulator]}, + {<<"^6\\.5\\.2(?:\\.[0-9]+)*$">>,[restart_new_emulator]}]}. diff --git a/lib/kernel/test/gen_sctp_SUITE.erl b/lib/kernel/test/gen_sctp_SUITE.erl index 65183d83cc..55109a5178 100644 --- a/lib/kernel/test/gen_sctp_SUITE.erl +++ b/lib/kernel/test/gen_sctp_SUITE.erl @@ -41,7 +41,8 @@ peeloff_active_once/1, peeloff_active_true/1, peeloff_active_n/1, buffers/1, names_unihoming_ipv4/1, names_unihoming_ipv6/1, - names_multihoming_ipv4/1, names_multihoming_ipv6/1]). + names_multihoming_ipv4/1, names_multihoming_ipv6/1, + recv_close/1]). suite() -> [{ct_hooks,[ts_install_cth]}, @@ -56,10 +57,25 @@ all() -> {group,G}]. groups() -> - [{smoke,[],[basic,basic_stream]}, - {old_solaris,[],[skip_old_solaris]}, - {extensive,[], - [api_open_close, api_listen, api_connect_init, + [ + {smoke, [], smoke_cases()}, + {old_solaris, [], old_solaris_cases()}, + {extensive, [], extensive_cases()} + ]. + +smoke_cases() -> + [ + basic, + basic_stream + ]. + +old_solaris_cases() -> + [ + skip_old_solaris + ]. + +extensive_cases() -> + [api_open_close, api_listen, api_connect_init, api_opts, xfer_min, xfer_active, def_sndrcvinfo, implicit_inet6, open_multihoming_ipv4_socket, open_unihoming_ipv6_socket, @@ -68,7 +84,8 @@ groups() -> xfer_stream_min, peeloff_active_once, peeloff_active_true, peeloff_active_n, buffers, names_unihoming_ipv4, names_unihoming_ipv6, - names_multihoming_ipv4, names_multihoming_ipv6]}]. + names_multihoming_ipv4, names_multihoming_ipv6, + recv_close]. init_per_suite(_Config) -> case gen_sctp:open() of @@ -1511,6 +1528,111 @@ recv_comm_up_eventually(S) -> recv_comm_up_eventually(S) end. + +%% +recv_close(Config) when is_list(Config) -> + p("create server socket (and listen)"), + {ok, S} = gen_sctp:open(), + gen_sctp:listen(S, true), + {ok, SPort} = inet:port(S), + + p("create client socket (and connect)"), + {ok, C} = gen_sctp:open(), + {ok, _} = gen_sctp:connect(C, localhost, SPort, []), + + TC = self(), + RECV = fun() -> + p("try setup recv(s)"), + ok = recv_close_setup_recv(S), + p("announce ready"), + TC ! {self(), ready}, + p("try data recv"), + Res = gen_sctp:recv(S), + p("recv res: " + "~n ~p", [Res]), + exit(Res) + end, + p("spawn reader - then await reader ready"), + {Pid, MRef} = spawn_monitor(RECV), + receive + {'DOWN', MRef, process, Pid, PreReason} -> + %% Make sure it does not die for some other reason... + p("unexpected reader termination:" + "~n ~p", [PreReason]), + (catch gen_sctp:close(S)), + (catch gen_sctp:close(C)), + ?line ct:fail("Unexpected pre close from reader (~p): ~p", + [Pid, PreReason]); + {Pid, ready} -> + p("reader ready"), + ok + after 30000 -> % Just in case... + %% This is **extreme**, but there is no way to know + %% how long it will take to iterate through all the + %% addresses of a host... + p("reader ready timeout"), + (catch gen_sctp:close(S)), + (catch gen_sctp:close(C)), + ?line ct:fail("Unexpected pre close timeout (~p)", [Pid]) + end, + + p("\"ensure\" reader reading..."), + receive + Any -> + p("Received unexpected message: " + "~n ~p", [Any]), + (catch gen_sctp:close(S)), + (catch gen_sctp:close(C)), + ?line ct:fail("Unexpected message: ~p", [Any]) + after 5000 -> + ok + end, + + p("close server socket"), + ok = gen_sctp:close(S), + p("await reader termination"), + receive + {'DOWN', MRef, process, Pid, {error, closed}} -> + p("expected reader termination result"), + (catch gen_sctp:close(C)), + ok; + {'DOWN', MRef, process, Pid, PostReason} -> + p("unexpected reader termination: " + "~n ~p", [PostReason]), + (catch gen_sctp:close(C)), + ?line ct:fail("Unexpected post close from reader (~p): ~p", + [Pid, PostReason]) + after 5000 -> + p("unexpected reader termination timeout"), + demonitor(MRef, [flush]), + (catch gen_sctp:close(C)), + exit(Pid, kill), + ?line ct:fail("Reader (~p) termination timeout", [Pid]) + end, + p("close client socket"), + (catch gen_sctp:close(C)), + p("done"), + ok. + + +recv_close_setup_recv(S) -> + recv_close_setup_recv(S, 1). + +recv_close_setup_recv(S, N) -> + p("try setup recv ~w", [N]), + case gen_sctp:recv(S, 5000) of + {ok, {Addr, + Port, + _AncData, + Data}} when is_tuple(Addr) andalso is_integer(Port) -> + p("setup recv ~w: " + "~n ~p", [N, Data]), + recv_close_setup_recv(S, N+1); + {error, timeout} -> + ok + end. + + %%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% socket gen_server ultra light @@ -1745,3 +1867,21 @@ match_unless_solaris(A, B) -> timestamp() -> erlang:monotonic_time(). + +formated_timestamp() -> + format_timestamp(os:timestamp()). + +format_timestamp({_N1, _N2, N3} = TS) -> + {_Date, Time} = calendar:now_to_local_time(TS), + {Hour, Min, Sec} = Time, + FormatTS = io_lib:format("~.2.0w:~.2.0w:~.2.0w.~.3.0w", + [Hour, Min, Sec, N3 div 1000]), + lists:flatten(FormatTS). + +p(F) -> + p(F, []). + +p(F, A) -> + io:format("~s ~p " ++ F ++ "~n", [formated_timestamp(), self() | A]). + + diff --git a/lib/kernel/test/gen_udp_SUITE.erl b/lib/kernel/test/gen_udp_SUITE.erl index 2720d3cc77..7ec553ec51 100644 --- a/lib/kernel/test/gen_udp_SUITE.erl +++ b/lib/kernel/test/gen_udp_SUITE.erl @@ -40,25 +40,45 @@ recvtos/1, recvtosttl/1, recvttl/1, recvtclass/1, sendtos/1, sendtosttl/1, sendttl/1, sendtclass/1, local_basic/1, local_unbound/1, - local_fdopen/1, local_fdopen_unbound/1, local_abstract/1]). + local_fdopen/1, local_fdopen_unbound/1, local_abstract/1, + recv_close/1]). suite() -> [{ct_hooks,[ts_install_cth]}, {timetrap,{minutes,1}}]. all() -> - [send_to_closed, buffer_size, binary_passive_recv, max_buffer_size, - bad_address, read_packets, recv_poll_after_active_once, - open_fd, connect, - implicit_inet6, active_n, + [ + send_to_closed, + buffer_size, + binary_passive_recv, + max_buffer_size, + bad_address, + read_packets, + recv_poll_after_active_once, + open_fd, + connect, + implicit_inet6, + active_n, recvtos, recvtosttl, recvttl, recvtclass, sendtos, sendtosttl, sendttl, sendtclass, - {group, local}]. + {group, local}, + recv_close + ]. groups() -> - [{local, [], - [local_basic, local_unbound, - local_fdopen, local_fdopen_unbound, local_abstract]}]. + [ + {local, [], local_cases()} + ]. + +local_cases() -> + [ + local_basic, + local_unbound, + local_fdopen, + local_fdopen_unbound, + local_abstract + ]. init_per_suite(Config) -> Config. @@ -969,6 +989,52 @@ local_handshake(S, SAddr, C, CAddr) -> end. + + +%%------------------------------------------------------------- +%% Open a passive socket. Create a socket that reads from it. +%% Then close the socket. +recv_close(Config) when is_list(Config) -> + {ok, Sock} = gen_udp:open(0, [{active, false}]), + RECV = fun() -> + io:format("~p try recv~n", [self()]), + Res = gen_udp:recv(Sock, 0), + io:format("~p recv res: ~p~n", [self(), Res]), + exit(Res) + end, + io:format("~p spawn reader", [self()]), + {Pid, MRef} = spawn_monitor(RECV), + receive + {'DOWN', MRef, process, Pid, PreReason} -> + %% Make sure id does not die for some other reason... + ?line ct:fail("Unexpected pre close from reader (~p): ~p", + [Pid, PreReason]) + after 5000 -> % Just in case... + ok + end, + io:format("~p close socket", [self()]), + ok = gen_udp:close(Sock), + io:format("~p await reader termination", [self()]), + receive + {'DOWN', MRef, process, Pid, {error, closed}} -> + io:format("~p expected reader termination result", [self()]), + ok; + {'DOWN', MRef, process, Pid, PostReason} -> + io:format("~p unexpected reader termination: ~p", + [self(), PostReason]), + ?line ct:fail("Unexpected post close from reader (~p): ~p", + [Pid, PostReason]) + after 5000 -> + io:format("~p unexpected reader termination timeout", [self()]), + demonitor(MRef, [flush]), + exit(Pid, kill), + ?line ct:fail("Reader (~p) termination timeout", [Pid]) + end, + ok. + + + + %% %% Utils %% diff --git a/lib/kernel/vsn.mk b/lib/kernel/vsn.mk index e578f3dde4..013cc28c40 100644 --- a/lib/kernel/vsn.mk +++ b/lib/kernel/vsn.mk @@ -1 +1 @@ -KERNEL_VSN = 6.5.2 +KERNEL_VSN = 7.0 diff --git a/lib/megaco/doc/src/notes.xml b/lib/megaco/doc/src/notes.xml index 9f9d5a2c23..c2f72e8b2f 100644 --- a/lib/megaco/doc/src/notes.xml +++ b/lib/megaco/doc/src/notes.xml @@ -37,7 +37,47 @@ section is the version number of Megaco.</p> - <section><title>Megaco 3.18.8</title> + <section><title>Megaco 3.19</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>Refactored the internal handling of deprecated and + removed functions.</p> + <p> + Own Id: OTP-16469</p> + </item> + <item> + <p> + The preliminary version 3 codec(s) prev3a, prev3b and + prev3c has been deprecated and will be *removed* in OTP + 24. The encoding config option 'version3' will continue + to work until OTP 24.</p> + <p> + Own Id: OTP-16531</p> + </item> + </list> + </section> + +</section> + + <section><title>Megaco 3.18.8.1</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + The mini parser could not properly decode some IPv6 + addresses.</p> + <p> + Own Id: OTP-16631 Aux Id: ERIERL-491 </p> + </item> + </list> + </section> + +</section> + +<section><title>Megaco 3.18.8</title> <section><title>Fixed Bugs and Malfunctions</title> <list> diff --git a/lib/megaco/src/text/megaco_text_mini_parser.yrl b/lib/megaco/src/text/megaco_text_mini_parser.yrl index af3050a05b..2a4041867e 100644 --- a/lib/megaco/src/text/megaco_text_mini_parser.yrl +++ b/lib/megaco/src/text/megaco_text_mini_parser.yrl @@ -77,7 +77,7 @@ Nonterminals Terminals - %% 'AddToken' + 'AddToken' %% 'AndAUDITselectToken' 'AuditCapToken' 'AuditToken' @@ -106,7 +106,7 @@ Terminals %% 'EmergencyValueToken' 'ErrorToken' %% 'EventBufferToken' - %% 'EventsToken' + 'EventsToken' %% 'ExternalToken' 'FailoverToken' 'ForcedToken' @@ -273,7 +273,7 @@ pathName -> safeToken : ensure_pathName('$1') . safeToken -> safeToken2 : make_safe_token('$1') . -%% safeToken2 -> 'AddToken' : '$1' . +safeToken2 -> 'AddToken' : '$1' . safeToken2 -> 'AuditToken' : '$1' . safeToken2 -> 'AuditCapToken' : '$1' . safeToken2 -> 'AuditValueToken' : '$1' . @@ -298,7 +298,7 @@ safeToken2 -> 'EmbedToken' : '$1' . %% safeToken2 -> 'EmergencyOffToken' : '$1' . safeToken2 -> 'ErrorToken' : '$1' . %% safeToken2 -> 'EventBufferToken' : '$1' . -%% safeToken2 -> 'EventsToken' : '$1' . +safeToken2 -> 'EventsToken' : '$1' . %% safeToken2 -> 'ExternalToken' : '$1' . % v3 safeToken2 -> 'FailoverToken' : '$1' . safeToken2 -> 'ForcedToken' : '$1' . diff --git a/lib/megaco/test/megaco_codec_mini_SUITE.erl b/lib/megaco/test/megaco_codec_mini_SUITE.erl index 12113aae70..6c7f60db05 100644 --- a/lib/megaco/test/megaco_codec_mini_SUITE.erl +++ b/lib/megaco/test/megaco_codec_mini_SUITE.erl @@ -39,7 +39,32 @@ init_per_testcase/2, end_per_testcase/2, otp7672_msg01/1, - otp7672_msg02/1 + otp7672_msg02/1, + + otp16631_msg01/1, + otp16631_msg02/1, + otp16631_msg03/1, + otp16631_msg04/1, + otp16631_msg05/1, + otp16631_msg06/1, + otp16631_msg11/1, + otp16631_msg12/1, + otp16631_msg13/1, + otp16631_msg14/1, + otp16631_msg15/1, + otp16631_msg16/1, + otp16631_msg21/1, + otp16631_msg22/1, + otp16631_msg23/1, + otp16631_msg24/1, + otp16631_msg25/1, + otp16631_msg26/1, + otp16631_msg31/1, + otp16631_msg32/1, + otp16631_msg33/1, + otp16631_msg34/1, + otp16631_msg35/1, + otp16631_msg36/1 ]). @@ -62,15 +87,51 @@ all() -> groups() -> [ - {tickets, [], tickets_cases()} + {tickets, [], tickets_cases()}, + {otp7672, [], otp7672_cases()}, + {otp16631, [], otp16631_cases()} ]. tickets_cases() -> [ + {group, otp7672}, + {group, otp16631} + ]. + +otp7672_cases() -> + [ otp7672_msg01, otp7672_msg02 ]. +otp16631_cases() -> + [ + otp16631_msg01, + otp16631_msg02, + otp16631_msg03, + otp16631_msg04, + otp16631_msg05, + otp16631_msg06, + otp16631_msg11, + otp16631_msg12, + otp16631_msg13, + otp16631_msg14, + otp16631_msg15, + otp16631_msg16, + otp16631_msg21, + otp16631_msg22, + otp16631_msg23, + otp16631_msg24, + otp16631_msg25, + otp16631_msg26, + otp16631_msg31, + otp16631_msg32, + otp16631_msg33, + otp16631_msg34, + otp16631_msg35, + otp16631_msg36 + ]. + %% @@ -200,6 +261,342 @@ otp7672(Msg) -> end. + +%% -------------------------------------------------------------- +%% + +otp16631_msg01(suite) -> + []; +otp16631_msg01(Config) when is_list(Config) -> + d("otp16631_msg01 -> entry", []), + ok = otp16631( otp16631_msg01() ), + ok. + +otp16631_msg01() -> + otp16631_msg("a"). + + +%% -- + +otp16631_msg02(suite) -> + []; +otp16631_msg02(Config) when is_list(Config) -> + d("otp16631_msg02 -> entry", []), + ok = otp16631( otp16631_msg02() ), + ok. + +otp16631_msg02() -> + otp16631_msg("b"). + + +%% -- + +otp16631_msg03(suite) -> + []; +otp16631_msg03(Config) when is_list(Config) -> + d("otp16631_msg03 -> entry", []), + ok = otp16631( otp16631_msg03() ), + ok. + +otp16631_msg03() -> + otp16631_msg("c"). + + +%% -- + +otp16631_msg04(suite) -> + []; +otp16631_msg04(Config) when is_list(Config) -> + d("otp16631_msg04 -> entry", []), + ok = otp16631( otp16631_msg04() ), + ok. + +otp16631_msg04() -> + otp16631_msg("d"). + + +%% -- + +otp16631_msg05(suite) -> + []; +otp16631_msg05(Config) when is_list(Config) -> + d("otp16631_msg05 -> entry", []), + ok = otp16631( otp16631_msg05() ), + ok. + +otp16631_msg05() -> + otp16631_msg("e"). + + +%% -- + +otp16631_msg06(suite) -> + []; +otp16631_msg06(Config) when is_list(Config) -> + d("otp16631_msg06 -> entry", []), + ok = otp16631( otp16631_msg06() ), + ok. + +otp16631_msg06() -> + otp16631_msg("f"). + + +%% -- + +otp16631_msg11(suite) -> + []; +otp16631_msg11(Config) when is_list(Config) -> + d("otp16631_msg11 -> entry", []), + ok = otp16631( otp16631_msg11() ), + ok. + +otp16631_msg11() -> + otp16631_msg("000a"). + + +%% -- + +otp16631_msg12(suite) -> + []; +otp16631_msg12(Config) when is_list(Config) -> + d("otp16631_msg12 -> entry", []), + ok = otp16631( otp16631_msg12() ), + ok. + +otp16631_msg12() -> + otp16631_msg("000b"). + + +%% -- + +otp16631_msg13(suite) -> + []; +otp16631_msg13(Config) when is_list(Config) -> + d("otp16631_msg13 -> entry", []), + ok = otp16631( otp16631_msg13() ), + ok. + +otp16631_msg13() -> + otp16631_msg("000c"). + + +%% -- + +otp16631_msg14(suite) -> + []; +otp16631_msg14(Config) when is_list(Config) -> + d("otp16631_msg14 -> entry", []), + ok = otp16631( otp16631_msg14() ), + ok. + +otp16631_msg14() -> + otp16631_msg("000d"). + + +%% -- + +otp16631_msg15(suite) -> + []; +otp16631_msg15(Config) when is_list(Config) -> + d("otp16631_msg15 -> entry", []), + ok = otp16631( otp16631_msg15() ), + ok. + +otp16631_msg15() -> + otp16631_msg("000e"). + + +%% -- + +otp16631_msg16(suite) -> + []; +otp16631_msg16(Config) when is_list(Config) -> + d("otp16631_msg16 -> entry", []), + ok = otp16631( otp16631_msg16() ), + ok. + +otp16631_msg16() -> + otp16631_msg("000f"). + + +%% -- + +otp16631_msg21(suite) -> + []; +otp16631_msg21(Config) when is_list(Config) -> + d("otp16631_msg21 -> entry", []), + ok = otp16631( otp16631_msg21() ), + ok. + +otp16631_msg21() -> + otp16631_msg("0a12"). + + +%% -- + +otp16631_msg22(suite) -> + []; +otp16631_msg22(Config) when is_list(Config) -> + d("otp16631_msg22 -> entry", []), + ok = otp16631( otp16631_msg22() ), + ok. + +otp16631_msg22() -> + otp16631_msg("0b12"). + + +%% -- + +otp16631_msg23(suite) -> + []; +otp16631_msg23(Config) when is_list(Config) -> + d("otp16631_msg23 -> entry", []), + ok = otp16631( otp16631_msg23() ), + ok. + +otp16631_msg23() -> + otp16631_msg("0c12"). + + +%% -- + +otp16631_msg24(suite) -> + []; +otp16631_msg24(Config) when is_list(Config) -> + d("otp16631_msg24 -> entry", []), + ok = otp16631( otp16631_msg24() ), + ok. + +otp16631_msg24() -> + otp16631_msg("0d12"). + + +%% -- + +otp16631_msg25(suite) -> + []; +otp16631_msg25(Config) when is_list(Config) -> + d("otp16631_msg25 -> entry", []), + ok = otp16631( otp16631_msg25() ), + ok. + +otp16631_msg25() -> + otp16631_msg("0e12"). + + +%% -- + +otp16631_msg26(suite) -> + []; +otp16631_msg26(Config) when is_list(Config) -> + d("otp16631_msg26 -> entry", []), + ok = otp16631( otp16631_msg26() ), + ok. + +otp16631_msg26() -> + otp16631_msg("0f12"). + + +%% -- + +otp16631_msg31(suite) -> + []; +otp16631_msg31(Config) when is_list(Config) -> + d("otp16631_msg31 -> entry", []), + ok = otp16631( otp16631_msg31() ), + ok. + +otp16631_msg31() -> + otp16631_msg("a123"). + + +%% -- + +otp16631_msg32(suite) -> + []; +otp16631_msg32(Config) when is_list(Config) -> + d("otp16631_msg32 -> entry", []), + ok = otp16631( otp16631_msg32() ), + ok. + +otp16631_msg32() -> + otp16631_msg("b123"). + + +%% -- + +otp16631_msg33(suite) -> + []; +otp16631_msg33(Config) when is_list(Config) -> + d("otp16631_msg33 -> entry", []), + ok = otp16631( otp16631_msg33() ), + ok. + +otp16631_msg33() -> + otp16631_msg("c123"). + + +%% -- + +otp16631_msg34(suite) -> + []; +otp16631_msg34(Config) when is_list(Config) -> + d("otp16631_msg34 -> entry", []), + ok = otp16631( otp16631_msg34() ), + ok. + +otp16631_msg34() -> + otp16631_msg("d123"). + + +%% -- + +otp16631_msg35(suite) -> + []; +otp16631_msg35(Config) when is_list(Config) -> + d("otp16631_msg35 -> entry", []), + ok = otp16631( otp16631_msg35() ), + ok. + +otp16631_msg35() -> + otp16631_msg("e123"). + + +%% -- + +otp16631_msg36(suite) -> + []; +otp16631_msg36(Config) when is_list(Config) -> + d("otp16631_msg36 -> entry", []), + ok = otp16631( otp16631_msg36() ), + ok. + +otp16631_msg36() -> + otp16631_msg("f123"). + + +%% ----- + +otp16631( Msg ) -> + Bin = erlang:list_to_binary(Msg), + try megaco_compact_text_encoder:decode_mini_message([], dynamic, Bin) of + {ok, _} -> + ok; + {error, _} = ERROR -> + ERROR + catch + C:E:S -> + {error, {C, E, S}} + end. + + +otp16631_msg(X) when is_list(X) -> + "!/1 [2409:8050:5005:1243:1011::" ++ X ++ + "] T=2523{C=-{SC=ROOT{SV{MT=RS,RE=901,PF=ETSI_BGF/2,V=3}}}}". + + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% p(F, A) -> diff --git a/lib/megaco/vsn.mk b/lib/megaco/vsn.mk index e9c21389bc..3a35c5d125 100644 --- a/lib/megaco/vsn.mk +++ b/lib/megaco/vsn.mk @@ -19,6 +19,6 @@ # %CopyrightEnd% APPLICATION = megaco -MEGACO_VSN = 3.18.8 +MEGACO_VSN = 3.19 PRE_VSN = APP_VSN = "$(APPLICATION)-$(MEGACO_VSN)$(PRE_VSN)" diff --git a/lib/mnesia/doc/src/notes.xml b/lib/mnesia/doc/src/notes.xml index 5cda5ed72e..2fd59e6496 100644 --- a/lib/mnesia/doc/src/notes.xml +++ b/lib/mnesia/doc/src/notes.xml @@ -39,7 +39,51 @@ thus constitutes one section in this document. The title of each section is the version number of Mnesia.</p> - <section><title>Mnesia 4.16.3</title> + <section><title>Mnesia 4.17</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Make <c>mnesia:create_table/2</c> return correct badarg + value.</p> + <p> + Own Id: OTP-16072 Aux Id: PR-2320 </p> + </item> + <item> + <p> + Fixed a bug where mnesia was sometimes not waiting during + start for a commit decision on asymmetric transactions.</p> + <p> + Own Id: OTP-16634 Aux Id: PR-2610 ERL-1227 </p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Remove usage and documentation of old requests of the + I/O-protocol.</p> + <p> + Own Id: OTP-15695</p> + </item> + <item> + <p> + Avoid using <c>rpc</c> calls to do table reads, which + will reduce the load on rpc server and improve + performance.</p> + <p> + Own Id: OTP-16189</p> + </item> + </list> + </section> + +</section> + +<section><title>Mnesia 4.16.3</title> <section><title>Fixed Bugs and Malfunctions</title> <list> diff --git a/lib/mnesia/vsn.mk b/lib/mnesia/vsn.mk index ae849f2771..ba006208cd 100644 --- a/lib/mnesia/vsn.mk +++ b/lib/mnesia/vsn.mk @@ -1 +1 @@ -MNESIA_VSN = 4.16.3 +MNESIA_VSN = 4.17 diff --git a/lib/observer/doc/src/notes.xml b/lib/observer/doc/src/notes.xml index b27de66984..2533f99bd5 100644 --- a/lib/observer/doc/src/notes.xml +++ b/lib/observer/doc/src/notes.xml @@ -32,6 +32,21 @@ <p>This document describes the changes made to the Observer application.</p> +<section><title>Observer 2.9.4</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Minor updates due to the new spawn improvements made.</p> + <p> + Own Id: OTP-16368 Aux Id: OTP-15251 </p> + </item> + </list> + </section> + +</section> + <section><title>Observer 2.9.3</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/observer/src/observer.app.src b/lib/observer/src/observer.app.src index 55de6de0c6..ca65ee703e 100644 --- a/lib/observer/src/observer.app.src +++ b/lib/observer/src/observer.app.src @@ -66,7 +66,7 @@ {registered, []}, {applications, [kernel, stdlib]}, {env, []}, - {runtime_dependencies, ["wx-1.2","stdlib-@OTP-15251@","runtime_tools-1.8.14", - "kernel-@OTP-15251@","et-1.5","erts-@OTP-15251@"]}]}. + {runtime_dependencies, ["wx-1.2","stdlib-3.13","runtime_tools-1.8.14", + "kernel-7.0","et-1.5","erts-11.0"]}]}. diff --git a/lib/observer/vsn.mk b/lib/observer/vsn.mk index 6b733687b8..4de0cc113f 100644 --- a/lib/observer/vsn.mk +++ b/lib/observer/vsn.mk @@ -1 +1 @@ -OBSERVER_VSN = 2.9.3 +OBSERVER_VSN = 2.9.4 diff --git a/lib/odbc/doc/src/notes.xml b/lib/odbc/doc/src/notes.xml index 8d708162e4..d8c6126496 100644 --- a/lib/odbc/doc/src/notes.xml +++ b/lib/odbc/doc/src/notes.xml @@ -32,7 +32,35 @@ <p>This document describes the changes made to the odbc application. </p> - <section><title>ODBC 2.12.4</title> + <section><title>ODBC 2.13</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Fix various compiler warnings on 64-bit Windows.</p> + <p> + Own Id: OTP-15800</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Rewrite due to the removal of <c>erl_interface</c> legacy + functions.</p> + <p> + Own Id: OTP-16544 Aux Id: OTP-16328 </p> + </item> + </list> + </section> + +</section> + +<section><title>ODBC 2.12.4</title> <section><title>Improvements and New Features</title> <list> diff --git a/lib/odbc/vsn.mk b/lib/odbc/vsn.mk index df6db09f2f..cf271f3505 100644 --- a/lib/odbc/vsn.mk +++ b/lib/odbc/vsn.mk @@ -1 +1 @@ -ODBC_VSN = 2.12.4 +ODBC_VSN = 2.13 diff --git a/lib/os_mon/doc/src/notes.xml b/lib/os_mon/doc/src/notes.xml index 63efa96e2f..b08ade9938 100644 --- a/lib/os_mon/doc/src/notes.xml +++ b/lib/os_mon/doc/src/notes.xml @@ -31,6 +31,33 @@ </header> <p>This document describes the changes made to the OS_Mon application.</p> +<section><title>Os_Mon 2.5.2</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Fix various compiler warnings on 64-bit Windows.</p> + <p> + Own Id: OTP-15800</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>Refactored the internal handling of deprecated and + removed functions.</p> + <p> + Own Id: OTP-16469</p> + </item> + </list> + </section> + +</section> + <section><title>Os_Mon 2.5.1</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/os_mon/vsn.mk b/lib/os_mon/vsn.mk index 6081e181ff..e4b7574e02 100644 --- a/lib/os_mon/vsn.mk +++ b/lib/os_mon/vsn.mk @@ -1 +1 @@ -OS_MON_VSN = 2.5.1 +OS_MON_VSN = 2.5.2 diff --git a/lib/parsetools/doc/src/notes.xml b/lib/parsetools/doc/src/notes.xml index f8cd9b972d..3975c55c6c 100644 --- a/lib/parsetools/doc/src/notes.xml +++ b/lib/parsetools/doc/src/notes.xml @@ -31,6 +31,22 @@ </header> <p>This document describes the changes made to the Parsetools application.</p> +<section><title>Parsetools 2.2</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Remove usage and documentation of old requests of the + I/O-protocol.</p> + <p> + Own Id: OTP-15695</p> + </item> + </list> + </section> + +</section> + <section><title>Parsetools 2.1.8</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/parsetools/vsn.mk b/lib/parsetools/vsn.mk index 1a5201ce5d..c18fcbe762 100644 --- a/lib/parsetools/vsn.mk +++ b/lib/parsetools/vsn.mk @@ -1 +1 @@ -PARSETOOLS_VSN = 2.1.8 +PARSETOOLS_VSN = 2.2 diff --git a/lib/public_key/doc/src/notes.xml b/lib/public_key/doc/src/notes.xml index c182a28c53..b15e745252 100644 --- a/lib/public_key/doc/src/notes.xml +++ b/lib/public_key/doc/src/notes.xml @@ -35,6 +35,30 @@ <file>notes.xml</file> </header> +<section><title>Public_Key 1.8</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Added support for RSA-PSS signature schemes</p> + <p> + Own Id: OTP-15247</p> + </item> + <item> + <p> + Calls of deprecated functions in the <seeguide + marker="crypto:new_api#the-old-api">Old Crypto + API</seeguide> are replaced by calls of their <seeguide + marker="crypto:new_api#the-new-api">substitutions</seeguide>.</p> + <p> + Own Id: OTP-16346</p> + </item> + </list> + </section> + +</section> + <section><title>Public_Key 1.7.2</title> <section><title>Improvements and New Features</title> diff --git a/lib/public_key/vsn.mk b/lib/public_key/vsn.mk index 0008cf7a16..0a4bb38f70 100644 --- a/lib/public_key/vsn.mk +++ b/lib/public_key/vsn.mk @@ -1 +1 @@ -PUBLIC_KEY_VSN = 1.7.2 +PUBLIC_KEY_VSN = 1.8 diff --git a/lib/runtime_tools/doc/src/notes.xml b/lib/runtime_tools/doc/src/notes.xml index f6cc85b4a0..c259f890ba 100644 --- a/lib/runtime_tools/doc/src/notes.xml +++ b/lib/runtime_tools/doc/src/notes.xml @@ -32,6 +32,27 @@ <p>This document describes the changes made to the Runtime_Tools application.</p> +<section><title>Runtime_Tools 1.15</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>Improved the presentation of allocations and carriers + in the <c>instrument</c> module.</p> + <p> + Own Id: OTP-16327</p> + </item> + <item> + <p> + Minor updates due to the new spawn improvements made.</p> + <p> + Own Id: OTP-16368 Aux Id: OTP-15251 </p> + </item> + </list> + </section> + +</section> + <section><title>Runtime_Tools 1.14</title> <section><title>Improvements and New Features</title> diff --git a/lib/runtime_tools/src/runtime_tools.app.src b/lib/runtime_tools/src/runtime_tools.app.src index b55d50d040..d7c2975a5b 100644 --- a/lib/runtime_tools/src/runtime_tools.app.src +++ b/lib/runtime_tools/src/runtime_tools.app.src @@ -29,5 +29,5 @@ {applications, [kernel, stdlib]}, {env, []}, {mod, {runtime_tools, []}}, - {runtime_dependencies, ["stdlib-@OTP-15251@","mnesia-4.12","kernel-@OTP-15251@", - "erts-@OTP-15251:OTP-16327@"]}]}. + {runtime_dependencies, ["stdlib-3.13","mnesia-4.12","kernel-7.0", + "erts-11.0"]}]}. diff --git a/lib/runtime_tools/vsn.mk b/lib/runtime_tools/vsn.mk index c01dd60009..4bacd1f571 100644 --- a/lib/runtime_tools/vsn.mk +++ b/lib/runtime_tools/vsn.mk @@ -1 +1 @@ -RUNTIME_TOOLS_VSN = 1.14 +RUNTIME_TOOLS_VSN = 1.15 diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml index 5982ce005d..71705080be 100644 --- a/lib/sasl/doc/src/notes.xml +++ b/lib/sasl/doc/src/notes.xml @@ -31,6 +31,45 @@ </header> <p>This document describes the changes made to the SASL application.</p> +<section><title>SASL 4.0</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Remove usage and documentation of old requests of the + I/O-protocol.</p> + <p> + Own Id: OTP-15695</p> + </item> + <item> + <p> + <c>systools:make_script/2</c> now accepts the name of the + boot file to create, it is not restricted to only + <c>RelName.boot</c> or <c>start.boot</c>.</p> + <p> + <c>systools:make_tar/2</c> now accepts the option + <c>extra_files</c> to add any extra non release related + files to the tar file.</p> + <p> + Own Id: OTP-16561 Aux Id: PR-2420 </p> + </item> + <item> + <p> + <seemfa + marker="systools#make_tar/1"><c>systools:make_tar/1,2</c></seemfa> + now filters out any tools from erts if included in the + release tar ball. See the documentation for more details.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16603</p> + </item> + </list> + </section> + +</section> + <section><title>SASL 3.4.2</title> <section><title>Improvements and New Features</title> diff --git a/lib/sasl/src/sasl.appup.src b/lib/sasl/src/sasl.appup.src index b795123645..621454d6a4 100644 --- a/lib/sasl/src/sasl.appup.src +++ b/lib/sasl/src/sasl.appup.src @@ -21,6 +21,7 @@ %% versions from the following OTP releases: %% - OTP 21 %% - OTP 22 +%% - OTP 23 %% %% We also allow upgrade from, and downgrade to all %% versions that have branched off from the above @@ -34,7 +35,8 @@ {<<"^3\\.3\\.0(?:\\.[0-9]+)+$">>,[restart_new_emulator]}, {<<"^3\\.4$">>,[restart_new_emulator]}, {<<"^3\\.4\\.0(?:\\.[0-9]+)+$">>,[restart_new_emulator]}, - {<<"^3\\.4\\.1(?:\\.[0-9]+)*$">>,[restart_new_emulator]}], + {<<"^3\\.4\\.1(?:\\.[0-9]+)*$">>,[restart_new_emulator]}, + {<<"^3\\.4\\.2(?:\\.[0-9]+)*$">>,[restart_new_emulator]}], [{<<"^3\\.2$">>,[restart_new_emulator]}, {<<"^3\\.2\\.0(?:\\.[0-9]+)+$">>,[restart_new_emulator]}, {<<"^3\\.2\\.1(?:\\.[0-9]+)*$">>,[restart_new_emulator]}, @@ -42,4 +44,5 @@ {<<"^3\\.3\\.0(?:\\.[0-9]+)+$">>,[restart_new_emulator]}, {<<"^3\\.4$">>,[restart_new_emulator]}, {<<"^3\\.4\\.0(?:\\.[0-9]+)+$">>,[restart_new_emulator]}, - {<<"^3\\.4\\.1(?:\\.[0-9]+)*$">>,[restart_new_emulator]}]}. + {<<"^3\\.4\\.1(?:\\.[0-9]+)*$">>,[restart_new_emulator]}, + {<<"^3\\.4\\.2(?:\\.[0-9]+)*$">>,[restart_new_emulator]}]}. diff --git a/lib/sasl/vsn.mk b/lib/sasl/vsn.mk index fd045e49d5..9cab3fd792 100644 --- a/lib/sasl/vsn.mk +++ b/lib/sasl/vsn.mk @@ -1 +1 @@ -SASL_VSN = 3.4.2 +SASL_VSN = 4.0 diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index d4d5dd2f35..52b0b26c84 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -34,7 +34,76 @@ </header> - <section><title>SNMP 5.5</title> + <section><title>SNMP 5.6</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + For manager, fix PrivParams for SNMPv3 USM with AES + privacy; * In `snmp_usm:do_decrypt/3`, pass full + UsmSecParams to `snmp_usm:try_decrypt/5` as expected by + AES clause. * Change `snmpm_usm:aes_encrypt/3` to use + EngineBoots and EngineTime as cached by + `snmpm_config:get_usm_eboots/1` and + `snmpm_config:get_usm_etime/1` instead of + `snmpm_config:get_engine_boots/0` and + `snmpm_config:get_engine_time/0`. This ensures correct + msgPrivacyParameters are sent when AES is used. * Add + test `snmp.snmp_manager_SUITE.usm_priv_aes/1` to avoid + regression.</p> + <p> + Own Id: OTP-16541 Aux Id: #2544 </p> + </item> + <item> + <p> + Invalid character in (manager) usm config entry generator + function.</p> + <p> + Own Id: OTP-16552 Aux Id: ERL-1196 </p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Remove usage and documentation of old requests of the + I/O-protocol.</p> + <p> + Own Id: OTP-15695</p> + </item> + <item> + <p> + Calls of deprecated functions in the <seeguide + marker="crypto:new_api#the-old-api">Old Crypto + API</seeguide> are replaced by calls of their <seeguide + marker="crypto:new_api#the-new-api">substitutions</seeguide>.</p> + <p> + Own Id: OTP-16346</p> + </item> + <item> + <p> + Finalize deprecation. Already deprecated functions has a + "remove version 24" set and "new" functions added to list + of deprecated functions.</p> + <p> + Own Id: OTP-16463</p> + </item> + <item> + <p>Refactored the internal handling of deprecated and + removed functions.</p> + <p> + Own Id: OTP-16469</p> + </item> + </list> + </section> + +</section> + +<section><title>SNMP 5.5</title> <section><title>Improvements and New Features</title> <list> diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk index 84299ec250..39da86b2e1 100644 --- a/lib/snmp/vsn.mk +++ b/lib/snmp/vsn.mk @@ -19,6 +19,6 @@ # %CopyrightEnd% APPLICATION = snmp -SNMP_VSN = 5.5 +SNMP_VSN = 5.6 PRE_VSN = APP_VSN = "$(APPLICATION)-$(SNMP_VSN)$(PRE_VSN)" diff --git a/lib/ssh/doc/src/notes.xml b/lib/ssh/doc/src/notes.xml index 897d194e0d..1cc25c00b3 100644 --- a/lib/ssh/doc/src/notes.xml +++ b/lib/ssh/doc/src/notes.xml @@ -30,6 +30,231 @@ <file>notes.xml</file> </header> +<section><title>Ssh 4.10</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Fix error in ssh_sftpd typespec.</p> + <p> + Own Id: OTP-16363</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + The plug-in file ssh_file.erl, that is responsible for + default file handling, is re-factored, optimized and + re-written.</p> + <p> + Own Id: OTP-11688 Aux Id: OTP-12699 </p> + </item> + <item> + <p> + OpenSSH 6.5 introduced a new file representation of keys + called <url + href="https://cvsweb.openbsd.org/src/usr.bin/ssh/PROTOCOL.key?annotate=1.1">openssh-key-v1</url>.</p> + <p> + OTP/SSH had an experimental implementation of this + format. That implementation is now improved and supported + with the exception of handling encrypted keys.</p> + <p> + Own Id: OTP-15434</p> + </item> + <item> + <p> + TCP/IP port forwarding, a.k.a tunneling a.k.a + tcp-forward/direct-tcp is implemented. In the OpenSSH + client, this corresponds to the options -L and -R.</p> + <p> + The client or server listens to a specified socket, and + when something connects to it with TCP/IP, that + connection is forwarded in an encrypted tunnel to the + peer. The peer then connects to a predefined IP/port pair + and then acts as a proxy.</p> + <p> + See the manual, <seemfa + marker="ssh:ssh#tcpip_tunnel_to_server/6"><c>ssh:tcpip_tunnel_to_server/6</c></seemfa> + and <seemfa + marker="ssh:ssh#tcpip_tunnel_from_server/6"><c>ssh:tcpip_tunnel_from_server/6</c></seemfa>.</p> + <p> + The functionality is disabled per default but can be + enabled when starting a daemon.</p> + <p> + Own Id: OTP-15998 Aux Id: PR-2376, PR-2368 </p> + </item> + <item> + <p> + The client-side of the supervisor tree (under sshc_sup) + was previously not complete; the channel handling + processes were handled with links but had no supervisors.</p> + <p> + This is now corrected with a client-side supervisor tree + under <c>sshc_sup</c>, similar to the server-side + supervisor tree under <c>sshd_sup</c>.</p> + <p> + Own Id: OTP-16026 Aux Id: PR-2368, (OTP-15998) </p> + </item> + <item> + <p> + The extension <url + href="https://cvsweb.openbsd.org/src/usr.bin/ssh/PROTOCOL?annotate=HEAD">posix-rename@openssh.com</url> + is added to the <seemfa + marker="ssh:ssh_sftp#rename/3">ssh/sftp rename</seemfa> + operation.</p> + <p> + Own Id: OTP-16289 Aux Id: PR-2448 </p> + </item> + <item> + <p> + Calls of deprecated functions in the <seeguide + marker="crypto:new_api#the-old-api">Old Crypto + API</seeguide> are replaced by calls of their <seeguide + marker="crypto:new_api#the-new-api">substitutions</seeguide>.</p> + <p> + Own Id: OTP-16346</p> + </item> + <item> + <p> + The default known_hosts file handling is improved to + include ports.</p> + <p> + The handling of the contents in that file is updated to + support the <url + href="https://man.openbsd.org/sshd#SSH_KNOWN_HOSTS_FILE_FORMAT">full + syntax</url>, with exception of 1) the wildcard '?', 2) + wildcards in canonical names and 3) the option + '@cert-authority'</p> + <p> + Own Id: OTP-16506</p> + </item> + <item> + <p> + The MAC (Message Authorization Code) algorithms</p> + <list> <item>hmac-sha1-etm@openssh.com</item> + <item>hmac-sha2-256-etm@openssh.com</item> + <item>hmac-sha2-512-etm@openssh.com</item> </list> <p>are + implemented.</p> + <p> + Own Id: OTP-16508</p> + </item> + <item> + <p> + The key-exchange algorithms + <c>'diffie-hellman-group14-sha1'</c> and + <c>'diffie-hellman-group-exchange-sha1'</c> are disabled + per default. The reason is that SHA1 now is considered + insecure.</p> + <p> + They can be enabled if needed, see <seeapp + marker="ssh:SSH_app#algorithms">SSH (App)</seeapp>.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16509</p> + </item> + <item> + <p> + The public key algorithm <c>'ssh-dss'</c> is disabled per + default. The reason is that it is now considered as + insecure.</p> + <p> + It can be enabled if needed, see <seeapp + marker="ssh:SSH_app#algorithms">SSH (App)</seeapp>.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16510</p> + </item> + <item> + <p> + The public key <c>'ssh-rsa'</c> is now considered as + insecure because of its usage of SHA1.</p> + <p> + It is therefore deprecated and will no longer be enabled + per default in OTP-24.0.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16511</p> + </item> + <item> + <p> + An option <seetype + marker="ssh:ssh_file#optimize_key_lookup">optimize + (optimize_key_lookup)</seetype> is introduced for the + file interface ssh_file.erl</p> + <p> + The option enables the user to select between the default + handling which is fast but memory consuming vs memory + efficient but not as fast. The effect might be observable + only for large files.</p> + <p> + See the manual for <seemfa + marker="ssh:ssh_file#is_host_key/5">ssh_file:is_host_key/5</seemfa> + and <seemfa + marker="ssh:ssh_file#is_auth_key/3">ssh_file:is_auth_key/3</seemfa>.</p> + <p> + Own Id: OTP-16512</p> + </item> + <item> + <p> + The ssh agent is now implemented in the ssh_agent key + callback module. </p> + <p> + Enable with the the option <c> {key_cb, {ssh_agent, + []}}</c> in for example ssh:connect/3.</p> + <p> + See the <seeerl marker="ssh:ssh_agent">ssh_agent + manual</seeerl> for details.</p> + <p> + Own Id: OTP-16513</p> + </item> + <item> + <p> + Algorithm configuration could now be done in a .config + file.</p> + <p> + This is useful for example to enable an algorithm that is + disabled by default. It could now be enabled in an + .config-file without changing the code,</p> + <p> + See the SSH User's Guide chapter <seeguide + marker="ssh:configurations">"Configuration in + SSH"</seeguide>.</p> + <p> + Own Id: OTP-16540</p> + </item> + <item> + <p> + Documented which gen_tcp socket options can't be used in + calls to ssh:connect and ssh:daemon.</p> + <p> + Own Id: OTP-16589</p> + </item> + <item> + <p> + Added <seetype + marker="ssh:ssh#kb_int_fun_4">kb_int_fun_4()</seetype> to + the <seetype + marker="ssh:ssh#authentication_daemon_options">authentication_daemon_options()</seetype> + to enable generating dynamic keyboard-interactive prompts + from the user's state returned from the authentication + fun <seetype + marker="ssh:ssh#pwdfun_4">pwdfun_4()</seetype>.</p> + <p> + Own Id: OTP-16622 Aux Id: PR-2604 </p> + </item> + </list> + </section> + +</section> + <section><title>Ssh 4.9.1</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/ssh/vsn.mk b/lib/ssh/vsn.mk index 1733709f11..732c3f8766 100644 --- a/lib/ssh/vsn.mk +++ b/lib/ssh/vsn.mk @@ -1,4 +1,4 @@ #-*-makefile-*- ; force emacs to enter makefile-mode -SSH_VSN = 4.9.1 +SSH_VSN = 4.10 APP_VSN = "ssh-$(SSH_VSN)" diff --git a/lib/ssl/doc/src/notes.xml b/lib/ssl/doc/src/notes.xml index a8ad59a06c..8eed6a9d1a 100644 --- a/lib/ssl/doc/src/notes.xml +++ b/lib/ssl/doc/src/notes.xml @@ -27,6 +27,161 @@ </header> <p>This document describes the changes made to the SSL application.</p> +<section><title>SSL 10.0</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Fix a bug that causes cross-build failure.</p> + <p> + This change excludes the ssl.d dependency file from the + source tar balls.</p> + <p> + Own Id: OTP-16562 Aux Id: ERL-1168 </p> + </item> + <item> + <p> + Correct translation of OpenSSL legacy names for two + legacy cipher suites</p> + <p> + Own Id: OTP-16573 Aux Id: ERIERL-477 </p> + </item> + <item> + <p> + Correct documentation for PSK identity and SRP username.</p> + <p> + Own Id: OTP-16585</p> + </item> + <item> + <p> + Make sure client hostname check is run when client uses + its own verify_fun</p> + <p> + Own Id: OTP-16626 Aux Id: ERL-1232 </p> + </item> + <item> + <p> + Improved signature selection mechanism in TLS 1.3 for + increased interoperability.</p> + <p> + Own Id: OTP-16638 Aux Id: ERL-1206 </p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Drop support for SSL-3.0. Support for this legacy TLS + version has not been enabled by default since OTP 19. Now + all code to support it has been removed, that is SSL-3.0 + protocol version can not be used and is considered + invalid.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-14790</p> + </item> + <item> + <p> + Added support for RSA-PSS signature schemes</p> + <p> + Own Id: OTP-15247</p> + </item> + <item> + <p> + Improve interoperability by implementing the middlebox + compatiblity mode.</p> + <p> + The middlebox compatibility mode makes the TLS 1.3 + handshake look more like a TLS 1.2 handshake and + increases the chance of successfully establishing TLS 1.3 + connections through legacy middleboxes.</p> + <p> + Own Id: OTP-15589</p> + </item> + <item> + <p> + Utilize new properties of <seemfa + marker="erts:erlang#dist_ctrl_get_data/1"><c>erlang:dist_ctrl_get_data()</c></seemfa> + for performance improvement of Erlang distribution over + TLS.</p> + <p> + Own Id: OTP-16127 Aux Id: OTP-15618 </p> + </item> + <item> + <p> + Calls of deprecated functions in the <seeguide + marker="crypto:new_api#the-old-api">Old Crypto + API</seeguide> are replaced by calls of their <seeguide + marker="crypto:new_api#the-new-api">substitutions</seeguide>.</p> + <p> + Own Id: OTP-16346</p> + </item> + <item> + <p> + Implement cipher suite TLS_AES_128_CCM_8_SHA256.</p> + <p> + Own Id: OTP-16391</p> + </item> + <item> + <p> + This change adds TLS-1.3 to the list of default supported + versions. That is, TLS-1.3 and TLS-1.2 are configured + when ssl option 'versions' is not explicitly set.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-16400</p> + </item> + <item> + <p>Refactored the internal handling of deprecated and + removed functions.</p> + <p> + Own Id: OTP-16469</p> + </item> + <item> + <p> + Extended ssl:versions so that it lists supported, + available and implemented TLS/DTLS versions.</p> + <p> + Own Id: OTP-16519</p> + </item> + <item> + <p> + Added new option exclusive for ssl:cipher_suites/2,3</p> + <p> + Own Id: OTP-16532</p> + </item> + <item> + <p> + Avoid DoS attack against stateful session_tickets by + making session ticket ids unpredictable.</p> + <p> + Own Id: OTP-16533</p> + </item> + <item> + <p> + Add support for the max_fragment_length extension (RFC + 6066).</p> + <p> + Own Id: OTP-16547 Aux Id: PR-2547 </p> + </item> + <item> + <p> + Add srp_username in ssl:connection_info, update the + document with types of this function.</p> + <p> + Own Id: OTP-16584</p> + </item> + </list> + </section> + +</section> + <section><title>SSL 9.6.2</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/ssl/src/ssl.app.src b/lib/ssl/src/ssl.app.src index 1568bfd194..f08cb96d17 100644 --- a/lib/ssl/src/ssl.app.src +++ b/lib/ssl/src/ssl.app.src @@ -73,5 +73,5 @@ {applications, [crypto, public_key, kernel, stdlib]}, {env, []}, {mod, {ssl_app, []}}, - {runtime_dependencies, ["stdlib-3.5","public_key-@OTP-15247@","kernel-6.0", + {runtime_dependencies, ["stdlib-3.5","public_key-1.8","kernel-6.0", "erts-10.0","crypto-4.2", "inets-5.10.7"]}]}. diff --git a/lib/ssl/vsn.mk b/lib/ssl/vsn.mk index fc8d1134f6..14ba8ed31c 100644 --- a/lib/ssl/vsn.mk +++ b/lib/ssl/vsn.mk @@ -1 +1 @@ -SSL_VSN = 9.6.2 +SSL_VSN = 10.0 diff --git a/lib/stdlib/doc/src/c.xml b/lib/stdlib/doc/src/c.xml index 50e1dea52b..b481596379 100644 --- a/lib/stdlib/doc/src/c.xml +++ b/lib/stdlib/doc/src/c.xml @@ -120,7 +120,7 @@ </func> <func> - <name name="h" arity="1" since="OTP @OTP-16222@"/> + <name name="h" arity="1" since="OTP 23.0"/> <fsummary>Module help information</fsummary> <type name="h_return"/> <desc> @@ -129,7 +129,7 @@ </func> <func> - <name name="h" arity="2" since="OTP @OTP-16222@"/> + <name name="h" arity="2" since="OTP 23.0"/> <fsummary>Function help information</fsummary> <type name="h_return"/> <type name="hf_return"/> @@ -139,7 +139,7 @@ </func> <func> - <name name="h" arity="3" since="OTP @OTP-16222@"/> + <name name="h" arity="3" since="OTP 23.0"/> <fsummary>Function help information</fsummary> <type name="h_return"/> <type name="hf_return"/> @@ -149,7 +149,7 @@ </func> <func> - <name name="ht" arity="1" since="OTP @OTP-16222@"/> + <name name="ht" arity="1" since="OTP 23.0"/> <fsummary>Type help information</fsummary> <type name="h_return"/> <desc> @@ -158,7 +158,7 @@ </func> <func> - <name name="ht" arity="2" since="OTP @OTP-16222@"/> + <name name="ht" arity="2" since="OTP 23.0"/> <fsummary>Type help information</fsummary> <type name="h_return"/> <type name="ht_return"/> @@ -168,7 +168,7 @@ </func> <func> - <name name="ht" arity="3" since="OTP @OTP-16222@"/> + <name name="ht" arity="3" since="OTP 23.0"/> <fsummary>Type help information</fsummary> <type name="h_return"/> <type name="ht_return"/> diff --git a/lib/stdlib/doc/src/gen_event.xml b/lib/stdlib/doc/src/gen_event.xml index 3a5e4cb619..2ddff240d2 100644 --- a/lib/stdlib/doc/src/gen_event.xml +++ b/lib/stdlib/doc/src/gen_event.xml @@ -524,9 +524,9 @@ gen_event:stop -----> Module:terminate/2 </func> <func> - <name since="OTP @OTP-16120@">start_monitor() -> Result</name> - <name since="OTP @OTP-16120@">start_monitor(EventMgrName | Options) -> Result</name> - <name since="OTP @OTP-16120@">start_monitor(EventMgrName, Options) -> Result</name> + <name since="OTP 23.0">start_monitor() -> Result</name> + <name since="OTP 23.0">start_monitor(EventMgrName | Options) -> Result</name> + <name since="OTP 23.0">start_monitor(EventMgrName, Options) -> Result</name> <fsummary>Create a stand-alone event manager process.</fsummary> <type> <v>EventMgrName = {local,Name} | {global,GlobalName} | {via,Module,ViaName}</v> diff --git a/lib/stdlib/doc/src/gen_server.xml b/lib/stdlib/doc/src/gen_server.xml index 4ab8360fd1..4abb91439e 100644 --- a/lib/stdlib/doc/src/gen_server.xml +++ b/lib/stdlib/doc/src/gen_server.xml @@ -551,8 +551,8 @@ gen_server:abcast -----> Module:handle_cast/2 </func> <func> - <name since="OTP @OTP-16120@">start_monitor(Module, Args, Options) -> Result</name> - <name since="OTP @OTP-16120@">start_monitor(ServerName, Module, Args, Options) -> Result</name> + <name since="OTP 23.0">start_monitor(Module, Args, Options) -> Result</name> + <name since="OTP 23.0">start_monitor(ServerName, Module, Args, Options) -> Result</name> <fsummary>Create a standalone <c>gen_server</c> process.</fsummary> <type> <v>ServerName = {local,Name} | {global,GlobalName}</v> diff --git a/lib/stdlib/doc/src/gen_statem.xml b/lib/stdlib/doc/src/gen_statem.xml index 4c3197ef4d..fa3f20535d 100644 --- a/lib/stdlib/doc/src/gen_statem.xml +++ b/lib/stdlib/doc/src/gen_statem.xml @@ -2049,8 +2049,8 @@ handle_event(_, _, State, Data) -> </func> <func> - <name name="start_monitor" arity="3" since="OTP @OTP-16120@"/> - <name name="start_monitor" arity="4" since="OTP @OTP-16120@"/> + <name name="start_monitor" arity="3" since="OTP 23.0"/> + <name name="start_monitor" arity="4" since="OTP 23.0"/> <fsummary>Create a standalone <c>gen_statem</c> process.</fsummary> <desc> <p> diff --git a/lib/stdlib/doc/src/notes.xml b/lib/stdlib/doc/src/notes.xml index 5e422c554b..24a8d4c089 100644 --- a/lib/stdlib/doc/src/notes.xml +++ b/lib/stdlib/doc/src/notes.xml @@ -31,6 +31,209 @@ </header> <p>This document describes the changes made to the STDLIB application.</p> +<section><title>STDLIB 3.13</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Compiling a match specification with excessive nesting + caused the runtime system to crash due to scheduler stack + exhaustion. Instead of crashing the runtime system, + effected functions will now raise a <c>system_limit</c> + error exception in this situation.</p> + <p> + Own Id: OTP-16431 Aux Id: ERL-592 </p> + </item> + <item> + <p> Initialization of record fields using <c>_</c> is no + longer allowed if the number of affected fields is zero. + </p> + <p> + Own Id: OTP-16516</p> + </item> + <item> + <p> Fix bugs in <c>eval_bits</c>. </p> + <p> + Own Id: OTP-16545</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Improved the printout of single line logger events for + most of the OTP behaviours in STDLIB and Kernel. This + includes <c>proc_lib</c>, <c>gen_server</c>, + <c>gen_event</c>, <c>gen_statem</c>, <c>gen_fsm</c>, + <c>supervisor</c>, <c>supervisor_bridge</c> and + <c>application</c>.</p> + <p> + Improved the <seeerl + marker="kernel:logger_formatter#chars_limit"><c>chars_limit</c></seeerl> + and <seeerl + marker="kernel:logger_formatter#depth"><c>depth</c></seeerl> + handling in <c>proc_lib</c> and when formatting of + exceptions.</p> + <p> + Own Id: OTP-15299</p> + </item> + <item> + <p> + Remove usage and documentation of old requests of the + I/O-protocol.</p> + <p> + Own Id: OTP-15695</p> + </item> + <item> + <p>Improved ETS scalability of concurrent calls that + change the size of a table, like <c>ets:insert/2</c> and + <c>ets:delete/2</c>.</p> <p>This performance feature was + implemented for <c>ordered_set</c> in OTP 22.0 and does + now apply for all ETS table types.</p> <p>The improved + scalability may come at the cost of longer latency of + <c>ets:info(T,size)</c> and <c>ets:info(T,memory)</c>. A + new table option <c>decentralized_counters</c> has + therefore been added. It is default <c>true</c> for + <c>ordered_set</c> with <c>write_concurrency</c> enabled + and default <c>false</c> for all other table types.</p> + <p> + Own Id: OTP-15744 Aux Id: OTP-15623, PR-2229 </p> + </item> + <item> + <p> Handle Unicode filenames in the <c>zip</c> module. + </p> + <p> + Own Id: OTP-16005 Aux Id: ERL-1003, ERL-1150 </p> + </item> + <item> + <p> + Unicode support was updated to the Unicode 12.1 standard.</p> + <p> + Own Id: OTP-16073 Aux Id: PR-2339 </p> + </item> + <item> + <p> + All of the modules <seemfa + marker="stdlib:proc_lib#start_monitor/3"><c>proc_lib</c></seemfa>, + <seemfa + marker="stdlib:gen_server#start_monitor/3"><c>gen_server</c></seemfa>, + <seemfa + marker="stdlib:gen_statem#start_monitor/3"><c>gen_statem</c></seemfa>, + and <seemfa + marker="stdlib:gen_event#start_monitor/0"><c>gen_event</c></seemfa> + have been extended with a <c>start_monitor()</c> + function. For more information, see the documentation of + <c>start_monitor()</c> for these modules.</p> + <p> + Own Id: OTP-16120 Aux Id: ERIERL-402, PR-2427 </p> + </item> + <item> + <p> + Updates for new <c>erlang:term_to_iovec()</c> BIF.</p> + <p> + Own Id: OTP-16128 Aux Id: OTP-15618 </p> + </item> + <item> + <p>Documented a quirk regarding extraction from file + descriptors in <c>erl_tar</c>.</p> + <p> + Own Id: OTP-16171 Aux Id: ERL-1057 </p> + </item> + <item> + <p> + Added <c>ok</c> as return value to + <c>gen_server:reply/2</c></p> + <p> + Own Id: OTP-16210 Aux Id: PR-2411 </p> + </item> + <item> + <p>New functions have been added to <seeerl + marker="c"><c>c(3)</c></seeerl> for printing embedded + documentation for Erlang modules. The functions are:</p> + <taglist> <tag>h/1,2,3</tag> <item>Print the + documentation for a Module:Function/Arity.</item> + <tag>ht/1,2,3</tag> <item>Print the type documentation + for a Module:Type/Arity.</item> </taglist> <p>The + embedded documentation is created when building the + Erlang/OTP documentation.</p> + <p> + Own Id: OTP-16222</p> + </item> + <item> + <p> Add <c>indent</c> and <c>linewidth</c> to the options + of the <c>erl_pp</c> module's functions. </p> + <p> + Own Id: OTP-16276 Aux Id: PR-2443 </p> + </item> + <item> + <p> + Minor updates due to the new spawn improvements made.</p> + <p> + Own Id: OTP-16368 Aux Id: OTP-15251 </p> + </item> + <item> + <p>The compiler will now raise a warning when inlining is + used in modules that load NIFs.</p> + <p> + Own Id: OTP-16429 Aux Id: ERL-303 </p> + </item> + <item> + <p>Refactored the internal handling of deprecated and + removed functions.</p> + <p> + Own Id: OTP-16469</p> + </item> + <item> + <p> Extend <c>erl_parse:abstract/1,2</c> to handle + external fun expressions (<c>fun M:F/A</c>). </p> + <p> + Own Id: OTP-16480</p> + </item> + <item> + <p>Added <c>filelib:safe_relative_path/2</c> to replace + <c>filename:safe_relative_path/1</c>, which did not + safely handle symbolic links.</p> + <p><c>filename:safe_relative_path/1</c> has been + deprecated.</p> + <p> + Own Id: OTP-16483 Aux Id: PR-2542 </p> + </item> + <item> + <p> + The module <c>shell_docs</c> has been added. The module + contains functions for rendering, validating and + normalizing embedded documentation.</p> + <p> + Own Id: OTP-16500</p> + </item> + <item> + <p> + Module and function auto-completion in the shell now + looks at all available modules instead of only those + loaded. A module is considered available if it either is + loaded already or would be loaded if called.</p> + <p> + The auto-completion has also been expanded to work in the + new <c>h/1,2,3</c> function in <c>c(3)</c>.</p> + <p> + Own Id: OTP-16501 Aux Id: OTP-16494, OTP-16222, + OTP-16406, OTP-16499, OTP-16500, PR-2545, ERL-708 </p> + </item> + <item> + <p>Updated the internal <c>pcre</c> library to + <c>8.44</c>.</p> + <p> + Own Id: OTP-16557</p> + </item> + </list> + </section> + +</section> + <section><title>STDLIB 3.12.1</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/stdlib/doc/src/proc_lib.xml b/lib/stdlib/doc/src/proc_lib.xml index 709f157b14..aa649a280a 100644 --- a/lib/stdlib/doc/src/proc_lib.xml +++ b/lib/stdlib/doc/src/proc_lib.xml @@ -360,9 +360,9 @@ init(Parent) -> </func> <func> - <name name="start_monitor" arity="3" since="OTP @OTP-16120@"/> - <name name="start_monitor" arity="4" since="OTP @OTP-16120@"/> - <name name="start_monitor" arity="5" since="OTP @OTP-16120@"/> + <name name="start_monitor" arity="3" since="OTP 23.0"/> + <name name="start_monitor" arity="4" since="OTP 23.0"/> + <name name="start_monitor" arity="5" since="OTP 23.0"/> <fsummary>Start a new process synchronously.</fsummary> <desc> <p> diff --git a/lib/stdlib/doc/src/shell_docs.xml b/lib/stdlib/doc/src/shell_docs.xml index 473aabcd54..c8fba1b43e 100644 --- a/lib/stdlib/doc/src/shell_docs.xml +++ b/lib/stdlib/doc/src/shell_docs.xml @@ -32,7 +32,7 @@ <rev>A</rev> <file>shell_docs.xml</file> </header> - <module since="OTP @OTP-16222@">shell_docs</module> + <module since="OTP 23.0">shell_docs</module> <modulesummary>Functions used to render EEP-48 style documentation for a shell.</modulesummary> <description> <p>This module can be used to render function and type documentation @@ -70,45 +70,45 @@ <funcs> <func> - <name name="render" arity="2" since="OTP @OTP-16222@"/> + <name name="render" arity="2" since="OTP 23.0"/> <fsummary>Render the documentation for a module.</fsummary> <desc> <p>Render the documentation for a module.</p> </desc> </func> <func> - <name name="render" arity="3" since="OTP @OTP-16222@"/> - <name name="render" arity="4" since="OTP @OTP-16222@"/> + <name name="render" arity="3" since="OTP 23.0"/> + <name name="render" arity="4" since="OTP 23.0"/> <fsummary>Render the documentation for a function.</fsummary> <desc> <p>Render the documentation for a function.</p> </desc> </func> <func> - <name name="render_type" arity="2" since="OTP @OTP-16222@"/> + <name name="render_type" arity="2" since="OTP 23.0"/> <fsummary>Render a list of all available types in a module.</fsummary> <desc> <p>Render a list of all available types in a module.</p> </desc> </func> <func> - <name name="render_type" arity="3" since="OTP @OTP-16222@"/> - <name name="render_type" arity="4" since="OTP @OTP-16222@"/> + <name name="render_type" arity="3" since="OTP 23.0"/> + <name name="render_type" arity="4" since="OTP 23.0"/> <fsummary>Render the documentation of a type in a module.</fsummary> <desc> <p>Render the documentation of a type in a module.</p> </desc> </func> <func> - <name name="render_callback" arity="2" since="OTP @OTP-16222@"/> + <name name="render_callback" arity="2" since="OTP 23.0"/> <fsummary>Render a list of all available callbacks in a module.</fsummary> <desc> <p>Render a list of all available callbacks in a module.</p> </desc> </func> <func> - <name name="render_callback" arity="3" since="OTP @OTP-16222@"/> - <name name="render_callback" arity="4" since="OTP @OTP-16222@"/> + <name name="render_callback" arity="3" since="OTP 23.0"/> + <name name="render_callback" arity="4" since="OTP 23.0"/> <fsummary>Render the documentation of a callback in a module.</fsummary> <desc> <p>Render the documentation of a callback in a module.</p> @@ -116,7 +116,7 @@ </func> <func> - <name name="validate" arity="1" since="OTP @OTP-16222@"/> + <name name="validate" arity="1" since="OTP 23.0"/> <fsummary>Validate the documentation</fsummary> <desc> <p>This function can be used to do a basic validation of @@ -125,7 +125,7 @@ </func> <func> - <name name="normalize" arity="1" since="OTP @OTP-16222@"/> + <name name="normalize" arity="1" since="OTP 23.0"/> <fsummary>Normalize the documentation</fsummary> <desc> <p>This function can be used to do whitespace normalization diff --git a/lib/stdlib/src/digraph.erl b/lib/stdlib/src/digraph.erl index 8a4df95027..58d493cf54 100644 --- a/lib/stdlib/src/digraph.erl +++ b/lib/stdlib/src/digraph.erl @@ -230,7 +230,7 @@ in_neighbours(G, V) -> Edges :: [edge()]. in_edges(G, V) -> - ets:select(G#digraph.ntab, [{{{in, V}, '$1'}, [], ['$1']}]). + [E || {{in, _}, E} <- ets:lookup(G#digraph.ntab, {in, V})]. -spec out_degree(G, V) -> non_neg_integer() when G :: graph(), @@ -255,7 +255,7 @@ out_neighbours(G, V) -> Edges :: [edge()]. out_edges(G, V) -> - ets:select(G#digraph.ntab, [{{{out, V}, '$1'}, [], ['$1']}]). + [E || {{out, _}, E} <- ets:lookup(G#digraph.ntab, {out, V})]. -spec add_edge(G, V1, V2) -> edge() | {'error', add_edge_err_rsn()} when G :: graph(), diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl index 8c7e27fc5b..143aa31088 100644 --- a/lib/stdlib/src/erl_parse.yrl +++ b/lib/stdlib/src/erl_parse.yrl @@ -26,12 +26,8 @@ form attribute attr_val function function_clauses function_clause clause_args clause_guard clause_body -expr expr_100 expr_150 expr_160 expr_200 expr_300 expr_400 expr_500 -expr_600 expr_650 expr_700 expr_800 -expr_max -pat_expr pat_expr_200 pat_expr_300 pat_expr_400 pat_expr_500 -pat_expr_600 pat_expr_650 pat_expr_700 pat_expr_800 -pat_expr_max map_pat_expr record_pat_expr +expr expr_max expr_remote +pat_expr pat_expr_max map_pat_expr record_pat_expr pat_argument_list pat_exprs list tail list_comprehension lc_expr lc_exprs @@ -48,11 +44,11 @@ atomic strings prefix_op mult_op add_op list_op comp_op binary bin_elements bin_element bit_expr opt_bit_size_expr bit_size_expr opt_bit_type_list bit_type_list bit_type -top_type top_type_100 top_types type typed_expr typed_attr_val -type_sig type_sigs type_guard type_guards fun_type fun_type_100 binary_type +top_type top_types type typed_expr typed_attr_val +type_sig type_sigs type_guard type_guards fun_type binary_type type_spec spec_fun typed_exprs typed_record_fields field_types field_type map_pair_types map_pair_type -bin_base_type bin_unit_type type_200 type_300 type_400 type_500. +bin_base_type bin_unit_type. Terminals char integer float atom string var @@ -74,6 +70,27 @@ Expect 0. Rootsymbol form. +%% Expressions + +Unary 0 'catch'. +Right 100 '=' '!'. +Right 150 'orelse'. +Right 160 'andalso'. +Nonassoc 200 comp_op. +Right 300 list_op. +Left 400 add_op. +Left 500 mult_op. +Unary 600 prefix_op. +Nonassoc 700 '#'. +Nonassoc 800 ':'. + +%% Types + +Right 150 '::'. +Left 170 '|'. +Nonassoc 200 '..'. +Nonassoc 500 '*'. % for binary expressions + form -> attribute dot : '$1'. form -> function dot : '$1'. @@ -117,25 +134,14 @@ type_guard -> var '::' top_type : build_constraint('$1', '$3'). top_types -> top_type : ['$1']. top_types -> top_type ',' top_types : ['$1'|'$3']. -top_type -> var '::' top_type_100 : {ann_type, ?anno('$1'), ['$1','$3']}. -top_type -> top_type_100 : '$1'. - -top_type_100 -> type_200 : '$1'. -top_type_100 -> type_200 '|' top_type_100 : lift_unions('$1','$3'). - -type_200 -> type_300 '..' type_300 : {type, ?anno('$1'), range, - ['$1', '$3']}. -type_200 -> type_300 : '$1'. - -type_300 -> type_300 add_op type_400 : ?mkop2('$1', '$2', '$3'). -type_300 -> type_400 : '$1'. - -type_400 -> type_400 mult_op type_500 : ?mkop2('$1', '$2', '$3'). -type_400 -> type_500 : '$1'. - -type_500 -> prefix_op type : ?mkop1('$1', '$2'). -type_500 -> type : '$1'. +top_type -> var '::' top_type : {ann_type, ?anno('$1'), ['$1','$3']}. +top_type -> type '|' top_type : lift_unions('$1','$3'). +top_type -> type : '$1'. +type -> type '..' type : {type, ?anno('$1'), range, ['$1', '$3']}. +type -> type add_op type : ?mkop2('$1', '$2', '$3'). +type -> type mult_op type : ?mkop2('$1', '$2', '$3'). +type -> prefix_op type : ?mkop1('$1', '$2'). type -> '(' top_type ')' : '$2'. type -> var : '$1'. type -> atom : '$1'. @@ -160,13 +166,10 @@ type -> binary_type : '$1'. type -> integer : '$1'. type -> char : '$1'. type -> 'fun' '(' ')' : {type, ?anno('$1'), 'fun', []}. -type -> 'fun' '(' fun_type_100 ')' : '$3'. +type -> 'fun' '(' fun_type ')' : '$3'. -fun_type_100 -> '(' '...' ')' '->' top_type - : {type, ?anno('$1'), 'fun', +fun_type -> '(' '...' ')' '->' top_type : {type, ?anno('$1'), 'fun', [{type, ?anno('$1'), any}, '$5']}. -fun_type_100 -> fun_type : '$1'. - fun_type -> '(' ')' '->' top_type : {type, ?anno('$1'), 'fun', [{type, ?anno('$1'), product, []}, '$4']}. fun_type -> '(' top_types ')' '->' top_type @@ -223,48 +226,22 @@ clause_body -> '->' exprs: '$2'. expr -> 'catch' expr : {'catch',?anno('$1'),'$2'}. -expr -> expr_100 : '$1'. - -expr_100 -> expr_150 '=' expr_100 : {match,?anno('$2'),'$1','$3'}. -expr_100 -> expr_150 '!' expr_100 : ?mkop2('$1', '$2', '$3'). -expr_100 -> expr_150 : '$1'. - -expr_150 -> expr_160 'orelse' expr_150 : ?mkop2('$1', '$2', '$3'). -expr_150 -> expr_160 : '$1'. - -expr_160 -> expr_200 'andalso' expr_160 : ?mkop2('$1', '$2', '$3'). -expr_160 -> expr_200 : '$1'. - -expr_200 -> expr_300 comp_op expr_300 : - ?mkop2('$1', '$2', '$3'). -expr_200 -> expr_300 : '$1'. - -expr_300 -> expr_400 list_op expr_300 : - ?mkop2('$1', '$2', '$3'). -expr_300 -> expr_400 : '$1'. - -expr_400 -> expr_400 add_op expr_500 : - ?mkop2('$1', '$2', '$3'). -expr_400 -> expr_500 : '$1'. - -expr_500 -> expr_500 mult_op expr_600 : - ?mkop2('$1', '$2', '$3'). -expr_500 -> expr_600 : '$1'. - -expr_600 -> prefix_op expr_600 : - ?mkop1('$1', '$2'). -expr_600 -> expr_650 : '$1'. - -expr_650 -> map_expr : '$1'. -expr_650 -> expr_700 : '$1'. - -expr_700 -> function_call : '$1'. -expr_700 -> record_expr : '$1'. -expr_700 -> expr_800 : '$1'. - -expr_800 -> expr_max ':' expr_max : - {remote,?anno('$2'),'$1','$3'}. -expr_800 -> expr_max : '$1'. +expr -> expr '=' expr : {match,?anno('$2'),'$1','$3'}. +expr -> expr '!' expr : ?mkop2('$1', '$2', '$3'). +expr -> expr 'orelse' expr : ?mkop2('$1', '$2', '$3'). +expr -> expr 'andalso' expr : ?mkop2('$1', '$2', '$3'). +expr -> expr comp_op expr : ?mkop2('$1', '$2', '$3'). +expr -> expr list_op expr : ?mkop2('$1', '$2', '$3'). +expr -> expr add_op expr : ?mkop2('$1', '$2', '$3'). +expr -> expr mult_op expr : ?mkop2('$1', '$2', '$3'). +expr -> prefix_op expr : ?mkop1('$1', '$2'). +expr -> map_expr : '$1'. +expr -> function_call : '$1'. +expr -> record_expr : '$1'. +expr -> expr_remote : '$1'. + +expr_remote -> expr_max ':' expr_max : {remote,?anno('$2'),'$1','$3'}. +expr_remote -> expr_max : '$1'. expr_max -> var : '$1'. expr_max -> atomic : '$1'. @@ -281,36 +258,15 @@ expr_max -> receive_expr : '$1'. expr_max -> fun_expr : '$1'. expr_max -> try_expr : '$1'. -pat_expr -> pat_expr_200 '=' pat_expr : {match,?anno('$2'),'$1','$3'}. -pat_expr -> pat_expr_200 : '$1'. - -pat_expr_200 -> pat_expr_300 comp_op pat_expr_300 : - ?mkop2('$1', '$2', '$3'). -pat_expr_200 -> pat_expr_300 : '$1'. - -pat_expr_300 -> pat_expr_400 list_op pat_expr_300 : - ?mkop2('$1', '$2', '$3'). -pat_expr_300 -> pat_expr_400 : '$1'. - -pat_expr_400 -> pat_expr_400 add_op pat_expr_500 : - ?mkop2('$1', '$2', '$3'). -pat_expr_400 -> pat_expr_500 : '$1'. - -pat_expr_500 -> pat_expr_500 mult_op pat_expr_600 : - ?mkop2('$1', '$2', '$3'). -pat_expr_500 -> pat_expr_600 : '$1'. - -pat_expr_600 -> prefix_op pat_expr_600 : - ?mkop1('$1', '$2'). -pat_expr_600 -> pat_expr_650 : '$1'. - -pat_expr_650 -> map_pat_expr : '$1'. -pat_expr_650 -> pat_expr_700 : '$1'. - -pat_expr_700 -> record_pat_expr : '$1'. -pat_expr_700 -> pat_expr_800 : '$1'. - -pat_expr_800 -> pat_expr_max : '$1'. +pat_expr -> pat_expr '=' pat_expr : {match,?anno('$2'),'$1','$3'}. +pat_expr -> pat_expr comp_op pat_expr : ?mkop2('$1', '$2', '$3'). +pat_expr -> pat_expr list_op pat_expr : ?mkop2('$1', '$2', '$3'). +pat_expr -> pat_expr add_op pat_expr : ?mkop2('$1', '$2', '$3'). +pat_expr -> pat_expr mult_op pat_expr : ?mkop2('$1', '$2', '$3'). +pat_expr -> prefix_op pat_expr : ?mkop1('$1', '$2'). +pat_expr -> map_pat_expr : '$1'. +pat_expr -> record_pat_expr : '$1'. +pat_expr -> pat_expr_max : '$1'. pat_expr_max -> var : '$1'. pat_expr_max -> atomic : '$1'. @@ -405,7 +361,7 @@ map_field_exact -> map_key ':=' expr : map_key -> expr : '$1'. -%% N.B. This is called from expr_700. +%% N.B. This is called from expr. %% N.B. Field names are returned as the complete object, even if they are %% always atoms for the moment, this might change in the future. @@ -431,9 +387,9 @@ record_fields -> record_field ',' record_fields : ['$1' | '$3']. record_field -> var '=' expr : {record_field,?anno('$1'),'$1','$3'}. record_field -> atom '=' expr : {record_field,?anno('$1'),'$1','$3'}. -%% N.B. This is called from expr_700. +%% N.B. This is called from expr. -function_call -> expr_800 argument_list : +function_call -> expr_remote argument_list : {call,?anno('$1'),'$1',element(1, '$2')}. diff --git a/lib/stdlib/src/otp_internal.erl b/lib/stdlib/src/otp_internal.erl index b6531d9b5c..aebef5a18a 100644 --- a/lib/stdlib/src/otp_internal.erl +++ b/lib/stdlib/src/otp_internal.erl @@ -65,8 +65,6 @@ obsolete(crypto, stream_decrypt, 2) -> {deprecated, "use crypto:crypto_update/2 instead", "OTP 24"}; obsolete(crypto, stream_encrypt, 2) -> {deprecated, "use crypto:crypto_update/2 instead", "OTP 24"}; -obsolete(erlang, get_stacktrace, 0) -> - {deprecated, "use the new try/catch syntax for retrieving the stack backtrace", "OTP 24"}; obsolete(erlang, now, 0) -> {deprecated, "see the \"Time and Time Correction in Erlang\" chapter of the ERTS User's Guide for more information"}; obsolete(filename, safe_relative_path, 1) -> @@ -439,6 +437,8 @@ obsolete(erl_parse, set_line, 2) -> {removed, "use erl_anno:set_line/2"}; obsolete(erl_scan, set_attribute, 3) -> {removed, "use erl_anno:set_line/2 instead"}; +obsolete(erlang, get_stacktrace, 0) -> + {removed, "use the new try/catch syntax for retrieving the stack backtrace"}; obsolete(erlang, hash, 2) -> {removed, "use erlang:phash2/2 instead"}; obsolete(httpd_conf, check_enum, 2) -> diff --git a/lib/stdlib/src/stdlib.app.src b/lib/stdlib/src/stdlib.app.src index 774f7eaa9c..b59e3b28c0 100644 --- a/lib/stdlib/src/stdlib.app.src +++ b/lib/stdlib/src/stdlib.app.src @@ -109,6 +109,6 @@ dets]}, {applications, [kernel]}, {env, []}, - {runtime_dependencies, ["sasl-3.0","kernel-@OTP-15251@","erts-@OTP-15251:OTP-16431@","crypto-3.3", + {runtime_dependencies, ["sasl-3.0","kernel-7.0","erts-11.0","crypto-3.3", "compiler-5.0"]} ]}. diff --git a/lib/stdlib/src/stdlib.appup.src b/lib/stdlib/src/stdlib.appup.src index 6d6ee14d29..85fba9ebbd 100644 --- a/lib/stdlib/src/stdlib.appup.src +++ b/lib/stdlib/src/stdlib.appup.src @@ -21,6 +21,7 @@ %% versions from the following OTP releases: %% - OTP 21 %% - OTP 22 +%% - OTP 23 %% %% We also allow upgrade from, and downgrade to all %% versions that have branched off from the above @@ -35,6 +36,7 @@ {<<"^3\\.11\\.2(?:\\.[0-9]+)*$">>,[restart_new_emulator]}, {<<"^3\\.12$">>,[restart_new_emulator]}, {<<"^3\\.12\\.0(?:\\.[0-9]+)+$">>,[restart_new_emulator]}, + {<<"^3\\.12\\.1(?:\\.[0-9]+)*$">>,[restart_new_emulator]}, {<<"^3\\.5$">>,[restart_new_emulator]}, {<<"^3\\.5\\.0(?:\\.[0-9]+)+$">>,[restart_new_emulator]}, {<<"^3\\.5\\.1(?:\\.[0-9]+)*$">>,[restart_new_emulator]}, @@ -59,6 +61,7 @@ {<<"^3\\.11\\.2(?:\\.[0-9]+)*$">>,[restart_new_emulator]}, {<<"^3\\.12$">>,[restart_new_emulator]}, {<<"^3\\.12\\.0(?:\\.[0-9]+)+$">>,[restart_new_emulator]}, + {<<"^3\\.12\\.1(?:\\.[0-9]+)*$">>,[restart_new_emulator]}, {<<"^3\\.5$">>,[restart_new_emulator]}, {<<"^3\\.5\\.0(?:\\.[0-9]+)+$">>,[restart_new_emulator]}, {<<"^3\\.5\\.1(?:\\.[0-9]+)*$">>,[restart_new_emulator]}, diff --git a/lib/stdlib/test/digraph_SUITE.erl b/lib/stdlib/test/digraph_SUITE.erl index b5d3452616..ce0bc90f1c 100644 --- a/lib/stdlib/test/digraph_SUITE.erl +++ b/lib/stdlib/test/digraph_SUITE.erl @@ -31,7 +31,7 @@ init_per_group/2,end_per_group/2]). -export([opts/1, degree/1, path/1, cycle/1, vertices/1, - edges/1, data/1, otp_3522/1, otp_3630/1, otp_8066/1]). + edges/1, data/1, otp_3522/1, otp_3630/1, otp_8066/1, vertex_names/1]). -export([spawn_graph/2]). @@ -41,10 +41,10 @@ suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> [opts, degree, path, cycle, {group, misc}, - {group, tickets}]. + {group, tickets}, vertex_names]. groups() -> - [{misc, [], [vertices, edges, data]}, + [{misc, [], [vertices, edges, data, vertex_names]}, {tickets, [], [otp_3522, otp_3630, otp_8066]}]. init_per_suite(Config) -> @@ -337,6 +337,51 @@ otp_8066(Config) when is_list(Config) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +vertex_names(Config) when is_list(Config) -> + %% Check that a node named '_' does not lead to wildcard matches + %% in ets. + + G = digraph:new([acyclic]), + A = digraph:add_vertex(G, 'A'), + B = digraph:add_vertex(G, '_'), + AB = digraph:add_edge(G, A, B), + + %% Link A -> B + 1 = digraph:out_degree(G, A), + 1 = digraph:in_degree(G, B), + 0 = digraph:out_degree(G, B), + 0 = digraph:in_degree(G, A), + [B] = digraph:out_neighbours(G, A), + [A] = digraph:in_neighbours(G, B), + [] = digraph:out_neighbours(G, B), + [] = digraph:in_neighbours(G, A), + [AB] = digraph:out_edges(G, A), + [AB] = digraph:in_edges(G, B), + [] = digraph:out_edges(G, B), + [] = digraph:in_edges(G, A), + + %% Reverse the edge + digraph:del_edge(G, AB), + BA = digraph:add_edge(G, B, A), + + 1 = digraph:out_degree(G, B), + 1 = digraph:in_degree(G, A), + 0 = digraph:out_degree(G, A), + 0 = digraph:in_degree(G, B), + [A] = digraph:out_neighbours(G, B), + [B] = digraph:in_neighbours(G, A), + [] = digraph:out_neighbours(G, A), + [] = digraph:in_neighbours(G, B), + [BA] = digraph:out_edges(G, B), + [BA] = digraph:in_edges(G, A), + [] = digraph:out_edges(G, A), + [] = digraph:in_edges(G, B), + + digraph:delete(G), + ok. + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + sane(G) -> sane1(G), erase(sane) =:= undefined. diff --git a/lib/stdlib/test/gen_statem_SUITE.erl b/lib/stdlib/test/gen_statem_SUITE.erl index f40dce5d7a..76dee868e9 100644 --- a/lib/stdlib/test/gen_statem_SUITE.erl +++ b/lib/stdlib/test/gen_statem_SUITE.erl @@ -534,10 +534,10 @@ abnormal1(Config) -> gen_statem:start(LocalSTM, ?MODULE, start_arg(Config, []), []), %% timeout call. - delayed = gen_statem:call(Name, {delayed_answer,1}, 100), + delayed = gen_statem:call(Name, {delayed_answer,100}, 2000), {timeout,_} = ?EXPECT_FAILURE( - gen_statem:call(Name, {delayed_answer,1000}, 10), + gen_statem:call(Name, {delayed_answer,2000}, 100), Reason), ok = gen_statem:stop(Name), ?t:sleep(1100), @@ -1437,7 +1437,7 @@ hibernate(Config) -> {ok,Pid0} = gen_statem:start_link( ?MODULE, start_arg(Config, hiber_now), []), - is_in_erlang_hibernate(Pid0), + wait_erlang_hibernate(Pid0), stop_it(Pid0), receive {'EXIT',Pid0,normal} -> ok @@ -1450,23 +1450,23 @@ hibernate(Config) -> true = ({current_function,{erlang,hibernate,3}} =/= erlang:process_info(Pid,current_function)), hibernating = gen_statem:call(Pid, hibernate_sync), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), good_morning = gen_statem:call(Pid, wakeup_sync), is_not_in_erlang_hibernate(Pid), hibernating = gen_statem:call(Pid, hibernate_sync), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), please_just_five_more = gen_statem:call(Pid, snooze_sync), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), good_morning = gen_statem:call(Pid, wakeup_sync), is_not_in_erlang_hibernate(Pid), ok = gen_statem:cast(Pid, hibernate_async), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), ok = gen_statem:cast(Pid, wakeup_async), is_not_in_erlang_hibernate(Pid), ok = gen_statem:cast(Pid, hibernate_async), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), ok = gen_statem:cast(Pid, snooze_async), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), ok = gen_statem:cast(Pid, wakeup_async), is_not_in_erlang_hibernate(Pid), @@ -1474,14 +1474,14 @@ hibernate(Config) -> true = ({current_function,{erlang,hibernate,3}} =/= erlang:process_info(Pid, current_function)), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), 'alive!' = gen_statem:call(Pid, 'alive?'), true = ({current_function,{erlang,hibernate,3}} =/= erlang:process_info(Pid, current_function)), Pid ! hibernate_now, - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), 'alive!' = gen_statem:call(Pid, 'alive?'), true = @@ -1489,34 +1489,34 @@ hibernate(Config) -> erlang:process_info(Pid, current_function)), hibernating = gen_statem:call(Pid, hibernate_sync), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), good_morning = gen_statem:call(Pid, wakeup_sync), is_not_in_erlang_hibernate(Pid), hibernating = gen_statem:call(Pid, hibernate_sync), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), please_just_five_more = gen_statem:call(Pid, snooze_sync), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), good_morning = gen_statem:call(Pid, wakeup_sync), is_not_in_erlang_hibernate(Pid), ok = gen_statem:cast(Pid, hibernate_async), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), ok = gen_statem:cast(Pid, wakeup_async), is_not_in_erlang_hibernate(Pid), ok = gen_statem:cast(Pid, hibernate_async), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), ok = gen_statem:cast(Pid, snooze_async), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), ok = gen_statem:cast(Pid, wakeup_async), is_not_in_erlang_hibernate(Pid), hibernating = gen_statem:call(Pid, hibernate_sync), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), sys:suspend(Pid), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), sys:resume(Pid), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), receive after 1000 -> ok end, - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), good_morning = gen_statem:call(Pid, wakeup_sync), is_not_in_erlang_hibernate(Pid), @@ -1532,15 +1532,16 @@ hibernate(Config) -> %% Auto-hibernation timeout auto_hibernate(Config) -> OldFl = process_flag(trap_exit, true), - HibernateAfterTimeout = 100, + HibernateAfterTimeout = 1000, {ok,Pid} = gen_statem:start_link( - ?MODULE, start_arg(Config, []), [{hibernate_after, HibernateAfterTimeout}]), + ?MODULE, start_arg(Config, []), + [{hibernate_after, HibernateAfterTimeout}]), %% After init test is_not_in_erlang_hibernate(Pid), timer:sleep(HibernateAfterTimeout), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), %% After info test Pid ! {hping, self()}, receive @@ -1551,7 +1552,7 @@ auto_hibernate(Config) -> end, is_not_in_erlang_hibernate(Pid), timer:sleep(HibernateAfterTimeout), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), %% After cast test ok = gen_statem:cast(Pid, {hping, self()}), receive @@ -1562,42 +1563,42 @@ auto_hibernate(Config) -> end, is_not_in_erlang_hibernate(Pid), timer:sleep(HibernateAfterTimeout), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), %% After call test hpong = gen_statem:call(Pid, hping), is_not_in_erlang_hibernate(Pid), timer:sleep(HibernateAfterTimeout), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), %% Timer test 1 - TimerTimeout1 = 50, - ok = gen_statem:call(Pid, {arm_htimer, self(), TimerTimeout1}), + TimerTimeout1 = HibernateAfterTimeout div 2, + ok = gen_statem:call(Pid, {start_htimer, self(), TimerTimeout1}), is_not_in_erlang_hibernate(Pid), timer:sleep(TimerTimeout1), is_not_in_erlang_hibernate(Pid), receive - {Pid, htimer_armed} -> + {Pid, htimer_timeout} -> ok after 1000 -> ct:fail(timer1) end, is_not_in_erlang_hibernate(Pid), timer:sleep(HibernateAfterTimeout), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), %% Timer test 2 - TimerTimeout2 = 150, - ok = gen_statem:call(Pid, {arm_htimer, self(), TimerTimeout2}), + TimerTimeout2 = HibernateAfterTimeout * 2, + ok = gen_statem:call(Pid, {start_htimer, self(), TimerTimeout2}), is_not_in_erlang_hibernate(Pid), timer:sleep(HibernateAfterTimeout), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), receive - {Pid, htimer_armed} -> + {Pid, htimer_timeout} -> ok - after 1000 -> + after TimerTimeout2 -> ct:fail(timer2) end, is_not_in_erlang_hibernate(Pid), timer:sleep(HibernateAfterTimeout), - is_in_erlang_hibernate(Pid), + wait_erlang_hibernate(Pid), stop_it(Pid), process_flag(trap_exit, OldFl), receive @@ -1607,38 +1608,38 @@ auto_hibernate(Config) -> end, ok = verify_empty_msgq(). -is_in_erlang_hibernate(Pid) -> + +wait_erlang_hibernate(Pid) -> receive after 1 -> ok end, - is_in_erlang_hibernate_1(200, Pid). + wait_erlang_hibernate_1(200, Pid). -is_in_erlang_hibernate_1(0, Pid) -> +wait_erlang_hibernate_1(0, Pid) -> ct:log("~p\n", [erlang:process_info(Pid, current_function)]), - ct:fail(not_in_erlang_hibernate_3); -is_in_erlang_hibernate_1(N, Pid) -> + ct:fail(should_be_in_erlang_hibernate_3); +wait_erlang_hibernate_1(N, Pid) -> {current_function,MFA} = erlang:process_info(Pid, current_function), case MFA of {erlang,hibernate,3} -> ok; _ -> receive after 10 -> ok end, - is_in_erlang_hibernate_1(N-1, Pid) + wait_erlang_hibernate_1(N-1, Pid) end. is_not_in_erlang_hibernate(Pid) -> receive after 1 -> ok end, is_not_in_erlang_hibernate_1(200, Pid). -is_not_in_erlang_hibernate_1(0, Pid) -> - ct:log("~p\n", [erlang:process_info(Pid, current_function)]), - ct:fail(not_in_erlang_hibernate_3); +is_not_in_erlang_hibernate_1(0, _Pid) -> + ct:fail(should_not_be_in_erlang_hibernate_3); is_not_in_erlang_hibernate_1(N, Pid) -> {current_function,MFA} = erlang:process_info(Pid, current_function), case MFA of - {erlang,hibernate,3} -> + {erlang,hibernate,3} -> receive after 10 -> ok end, is_not_in_erlang_hibernate_1(N-1, Pid); - _ -> - ok + _ -> + ok end. @@ -2430,10 +2431,10 @@ idle(cast, {hping,Pid}, Data) -> {keep_state, Data}; idle({call, From}, hping, _Data) -> {keep_state_and_data, [{reply, From, hpong}]}; -idle({call, From}, {arm_htimer, Pid, Timeout}, _Data) -> - {keep_state_and_data, [{reply, From, ok}, {timeout, Timeout, {arm_htimer, Pid}}]}; -idle(timeout, {arm_htimer, Pid}, _Data) -> - Pid ! {self(), htimer_armed}, +idle({call, From}, {start_htimer, Pid, Timeout}, _Data) -> + {keep_state_and_data, [{reply, From, ok}, {timeout, Timeout, {htimer, Pid}}]}; +idle(timeout, {htimer, Pid}, _Data) -> + Pid ! {self(), htimer_timeout}, keep_state_and_data; idle(cast, {connect,Pid}, Data) -> Pid ! accept, diff --git a/lib/stdlib/vsn.mk b/lib/stdlib/vsn.mk index 02eee400bf..3aa3690d12 100644 --- a/lib/stdlib/vsn.mk +++ b/lib/stdlib/vsn.mk @@ -1 +1 @@ -STDLIB_VSN = 3.12.1 +STDLIB_VSN = 3.13 diff --git a/lib/syntax_tools/doc/src/notes.xml b/lib/syntax_tools/doc/src/notes.xml index 9963ac41ae..52f085bf0c 100644 --- a/lib/syntax_tools/doc/src/notes.xml +++ b/lib/syntax_tools/doc/src/notes.xml @@ -32,6 +32,28 @@ <p>This document describes the changes made to the Syntax_Tools application.</p> +<section><title>Syntax_Tools 2.3</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> Remove incomplete support for <c>cond</c> + expressions. </p> + <p> + Own Id: OTP-15925 Aux Id: PR-2304 </p> + </item> + <item> + <p> + Improved indentation for code generated with + <c>erl_prettypr</c> and <c>tidier</c>.</p> + <p> + Own Id: OTP-16386 Aux Id: PR-2451 </p> + </item> + </list> + </section> + +</section> + <section><title>Syntax_Tools 2.2.1</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/syntax_tools/vsn.mk b/lib/syntax_tools/vsn.mk index 9e6967d45d..87167529c3 100644 --- a/lib/syntax_tools/vsn.mk +++ b/lib/syntax_tools/vsn.mk @@ -1 +1 @@ -SYNTAX_TOOLS_VSN = 2.2.1 +SYNTAX_TOOLS_VSN = 2.3 diff --git a/lib/tools/doc/src/notes.xml b/lib/tools/doc/src/notes.xml index 728343a86f..f4d2f0772f 100644 --- a/lib/tools/doc/src/notes.xml +++ b/lib/tools/doc/src/notes.xml @@ -31,6 +31,33 @@ </header> <p>This document describes the changes made to the Tools application.</p> +<section><title>Tools 3.4</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Updates for new <c>erlang:term_to_iovec()</c> BIF.</p> + <p> + Own Id: OTP-16128 Aux Id: OTP-15618 </p> + </item> + <item> + <p>Improved the presentation of allocations and carriers + in the <c>instrument</c> module.</p> + <p> + Own Id: OTP-16327</p> + </item> + <item> + <p> + Minor updates due to the new spawn improvements made.</p> + <p> + Own Id: OTP-16368 Aux Id: OTP-15251 </p> + </item> + </list> + </section> + +</section> + <section><title>Tools 3.3.1</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el index 3c765c010b..1676a62a2b 100644 --- a/lib/tools/emacs/erlang.el +++ b/lib/tools/emacs/erlang.el @@ -952,7 +952,6 @@ resulting regexp is surrounded by \\_< and \\_>." "gather_gc_info_result" "get_cookie" "get_module_info" - "get_stacktrace" "has_prepared_code_on_load" "hibernate" "insert_element" diff --git a/lib/tools/src/tools.app.src b/lib/tools/src/tools.app.src index beb5b98e15..f0c7ec1ead 100644 --- a/lib/tools/src/tools.app.src +++ b/lib/tools/src/tools.app.src @@ -43,6 +43,6 @@ ] }, {runtime_dependencies, ["stdlib-3.4","runtime_tools-1.8.14", - "kernel-5.4","erts-9.1","compiler-5.0", "erts-@OTP-16327@"]} + "kernel-5.4","erts-9.1","compiler-5.0", "erts-11.0"]} ] }. diff --git a/lib/tools/vsn.mk b/lib/tools/vsn.mk index 66f2c03149..b9f4811392 100644 --- a/lib/tools/vsn.mk +++ b/lib/tools/vsn.mk @@ -1 +1 @@ -TOOLS_VSN = 3.3.1 +TOOLS_VSN = 3.4 diff --git a/lib/wx/doc/src/notes.xml b/lib/wx/doc/src/notes.xml index 7dcfbb1588..b9012054a8 100644 --- a/lib/wx/doc/src/notes.xml +++ b/lib/wx/doc/src/notes.xml @@ -32,6 +32,33 @@ <p>This document describes the changes made to the wxErlang application.</p> +<section><title>Wx 1.9.1</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Fix various compiler warnings on 64-bit Windows.</p> + <p> + Own Id: OTP-15800</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p>Refactored the internal handling of deprecated and + removed functions.</p> + <p> + Own Id: OTP-16469</p> + </item> + </list> + </section> + +</section> + <section><title>Wx 1.9</title> <section><title>Improvements and New Features</title> diff --git a/lib/wx/vsn.mk b/lib/wx/vsn.mk index b498d21f3f..552e09ee2a 100644 --- a/lib/wx/vsn.mk +++ b/lib/wx/vsn.mk @@ -1 +1 @@ -WX_VSN = 1.9 +WX_VSN = 1.9.1 diff --git a/lib/xmerl/doc/src/notes.xml b/lib/xmerl/doc/src/notes.xml index 997af9d037..d8b2852097 100644 --- a/lib/xmerl/doc/src/notes.xml +++ b/lib/xmerl/doc/src/notes.xml @@ -32,6 +32,22 @@ <p>This document describes the changes made to the Xmerl application.</p> +<section><title>Xmerl 1.3.25</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> Fix a bug that the function name didn't get + normalized in some case which left white spaces in links. + </p> + <p> + Own Id: OTP-16617</p> + </item> + </list> + </section> + +</section> + <section><title>Xmerl 1.3.24</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/lib/xmerl/vsn.mk b/lib/xmerl/vsn.mk index 79be4c8a95..8711ed946f 100644 --- a/lib/xmerl/vsn.mk +++ b/lib/xmerl/vsn.mk @@ -1 +1 @@ -XMERL_VSN = 1.3.24 +XMERL_VSN = 1.3.25 diff --git a/otp_versions.table b/otp_versions.table index e45d57b299..82506466b6 100644 --- a/otp_versions.table +++ b/otp_versions.table @@ -1,3 +1,6 @@ +OTP-23.0.1 : compiler-7.6.1 erts-11.0.1 # asn1-5.0.13 common_test-1.19 crypto-4.7 debugger-5.0 dialyzer-4.2 diameter-2.2.3 edoc-0.12 eldap-1.2.8 erl_docgen-1.0 erl_interface-4.0 et-1.6.4 eunit-2.5 ftp-1.0.4 hipe-4.0 inets-7.2 jinterface-1.11 kernel-7.0 megaco-3.19 mnesia-4.17 observer-2.9.4 odbc-2.13 os_mon-2.5.2 parsetools-2.2 public_key-1.8 reltool-0.8 runtime_tools-1.15 sasl-4.0 snmp-5.6 ssh-4.10 ssl-10.0 stdlib-3.13 syntax_tools-2.3 tftp-1.0.2 tools-3.4 wx-1.9.1 xmerl-1.3.25 : +OTP-23.0 : asn1-5.0.13 common_test-1.19 compiler-7.6 crypto-4.7 debugger-5.0 dialyzer-4.2 edoc-0.12 erl_docgen-1.0 erl_interface-4.0 erts-11.0 eunit-2.5 hipe-4.0 inets-7.2 jinterface-1.11 kernel-7.0 megaco-3.19 mnesia-4.17 observer-2.9.4 odbc-2.13 os_mon-2.5.2 parsetools-2.2 public_key-1.8 runtime_tools-1.15 sasl-4.0 snmp-5.6 ssh-4.10 ssl-10.0 stdlib-3.13 syntax_tools-2.3 tools-3.4 wx-1.9.1 xmerl-1.3.25 # diameter-2.2.3 eldap-1.2.8 et-1.6.4 ftp-1.0.4 reltool-0.8 tftp-1.0.2 : +OTP-22.3.4.1 : erts-10.7.2.1 kernel-6.5.2.1 megaco-3.18.8.1 # asn1-5.0.12 common_test-1.18.2 compiler-7.5.4 crypto-4.6.5 debugger-4.2.8 dialyzer-4.1.1 diameter-2.2.3 edoc-0.11 eldap-1.2.8 erl_docgen-0.11 erl_interface-3.13.2 et-1.6.4 eunit-2.4.1 ftp-1.0.4 hipe-3.19.3 inets-7.1.3 jinterface-1.10.1 mnesia-4.16.3 observer-2.9.3 odbc-2.12.4 os_mon-2.5.1 parsetools-2.1.8 public_key-1.7.2 reltool-0.8 runtime_tools-1.14 sasl-3.4.2 snmp-5.5 ssh-4.9.1 ssl-9.6.2 stdlib-3.12.1 syntax_tools-2.2.1 tftp-1.0.2 tools-3.3.1 wx-1.9 xmerl-1.3.24 : OTP-22.3.4 : asn1-5.0.12 erts-10.7.2 # common_test-1.18.2 compiler-7.5.4 crypto-4.6.5 debugger-4.2.8 dialyzer-4.1.1 diameter-2.2.3 edoc-0.11 eldap-1.2.8 erl_docgen-0.11 erl_interface-3.13.2 et-1.6.4 eunit-2.4.1 ftp-1.0.4 hipe-3.19.3 inets-7.1.3 jinterface-1.10.1 kernel-6.5.2 megaco-3.18.8 mnesia-4.16.3 observer-2.9.3 odbc-2.12.4 os_mon-2.5.1 parsetools-2.1.8 public_key-1.7.2 reltool-0.8 runtime_tools-1.14 sasl-3.4.2 snmp-5.5 ssh-4.9.1 ssl-9.6.2 stdlib-3.12.1 syntax_tools-2.2.1 tftp-1.0.2 tools-3.3.1 wx-1.9 xmerl-1.3.24 : OTP-22.3.3 : ssh-4.9.1 ssl-9.6.2 # asn1-5.0.11 common_test-1.18.2 compiler-7.5.4 crypto-4.6.5 debugger-4.2.8 dialyzer-4.1.1 diameter-2.2.3 edoc-0.11 eldap-1.2.8 erl_docgen-0.11 erl_interface-3.13.2 erts-10.7.1 et-1.6.4 eunit-2.4.1 ftp-1.0.4 hipe-3.19.3 inets-7.1.3 jinterface-1.10.1 kernel-6.5.2 megaco-3.18.8 mnesia-4.16.3 observer-2.9.3 odbc-2.12.4 os_mon-2.5.1 parsetools-2.1.8 public_key-1.7.2 reltool-0.8 runtime_tools-1.14 sasl-3.4.2 snmp-5.5 stdlib-3.12.1 syntax_tools-2.2.1 tftp-1.0.2 tools-3.3.1 wx-1.9 xmerl-1.3.24 : OTP-22.3.2 : asn1-5.0.11 # common_test-1.18.2 compiler-7.5.4 crypto-4.6.5 debugger-4.2.8 dialyzer-4.1.1 diameter-2.2.3 edoc-0.11 eldap-1.2.8 erl_docgen-0.11 erl_interface-3.13.2 erts-10.7.1 et-1.6.4 eunit-2.4.1 ftp-1.0.4 hipe-3.19.3 inets-7.1.3 jinterface-1.10.1 kernel-6.5.2 megaco-3.18.8 mnesia-4.16.3 observer-2.9.3 odbc-2.12.4 os_mon-2.5.1 parsetools-2.1.8 public_key-1.7.2 reltool-0.8 runtime_tools-1.14 sasl-3.4.2 snmp-5.5 ssh-4.9 ssl-9.6.1 stdlib-3.12.1 syntax_tools-2.2.1 tftp-1.0.2 tools-3.3.1 wx-1.9 xmerl-1.3.24 : @@ -30,6 +33,7 @@ OTP-22.0.3 : compiler-7.4.2 dialyzer-4.0.1 erts-10.4.2 ssl-9.3.2 stdlib-3.9.2 # OTP-22.0.2 : compiler-7.4.1 crypto-4.5.1 erts-10.4.1 stdlib-3.9.1 # asn1-5.0.9 common_test-1.17.3 debugger-4.2.7 dialyzer-4.0 diameter-2.2.1 edoc-0.11 eldap-1.2.8 erl_docgen-0.9.1 erl_interface-3.12 et-1.6.4 eunit-2.3.7 ftp-1.0.2 hipe-3.19 inets-7.0.8 jinterface-1.10 kernel-6.4 megaco-3.18.5 mnesia-4.16 observer-2.9.1 odbc-2.12.4 os_mon-2.5 parsetools-2.1.8 public_key-1.6.7 reltool-0.8 runtime_tools-1.13.3 sasl-3.4 snmp-5.3 ssh-4.7.7 ssl-9.3.1 syntax_tools-2.2 tftp-1.0.1 tools-3.2 wx-1.8.8 xmerl-1.3.21 : OTP-22.0.1 : ssl-9.3.1 # asn1-5.0.9 common_test-1.17.3 compiler-7.4 crypto-4.5 debugger-4.2.7 dialyzer-4.0 diameter-2.2.1 edoc-0.11 eldap-1.2.8 erl_docgen-0.9.1 erl_interface-3.12 erts-10.4 et-1.6.4 eunit-2.3.7 ftp-1.0.2 hipe-3.19 inets-7.0.8 jinterface-1.10 kernel-6.4 megaco-3.18.5 mnesia-4.16 observer-2.9.1 odbc-2.12.4 os_mon-2.5 parsetools-2.1.8 public_key-1.6.7 reltool-0.8 runtime_tools-1.13.3 sasl-3.4 snmp-5.3 ssh-4.7.7 stdlib-3.9 syntax_tools-2.2 tftp-1.0.1 tools-3.2 wx-1.8.8 xmerl-1.3.21 : OTP-22.0 : asn1-5.0.9 common_test-1.17.3 compiler-7.4 crypto-4.5 debugger-4.2.7 dialyzer-4.0 edoc-0.11 eldap-1.2.8 erl_docgen-0.9.1 erl_interface-3.12 erts-10.4 hipe-3.19 inets-7.0.8 jinterface-1.10 kernel-6.4 megaco-3.18.5 mnesia-4.16 observer-2.9.1 odbc-2.12.4 os_mon-2.5 public_key-1.6.7 reltool-0.8 runtime_tools-1.13.3 sasl-3.4 snmp-5.3 ssh-4.7.7 ssl-9.3 stdlib-3.9 syntax_tools-2.2 tools-3.2 wx-1.8.8 xmerl-1.3.21 # diameter-2.2.1 et-1.6.4 eunit-2.3.7 ftp-1.0.2 parsetools-2.1.8 tftp-1.0.1 : +OTP-21.3.8.16 : erts-10.3.5.12 # asn1-5.0.8 common_test-1.17.2.1 compiler-7.3.2 crypto-4.4.2.2 debugger-4.2.6 dialyzer-3.3.2 diameter-2.2.1 edoc-0.10 eldap-1.2.7 erl_docgen-0.9 erl_interface-3.11.3 et-1.6.4 eunit-2.3.7 ftp-1.0.2.2 hipe-3.18.3 inets-7.0.7.2 jinterface-1.9.1 kernel-6.3.1.3 megaco-3.18.4 mnesia-4.15.6 observer-2.9 odbc-2.12.3 os_mon-2.4.7 otp_mibs-1.2.1 parsetools-2.1.8 public_key-1.6.6.1 reltool-0.7.8 runtime_tools-1.13.2 sasl-3.3 snmp-5.2.12 ssh-4.7.6.4 ssl-9.2.3.6 stdlib-3.8.2.4 syntax_tools-2.1.7.1 tftp-1.0.1 tools-3.1.0.1 wx-1.8.7 xmerl-1.3.20.1 : OTP-21.3.8.15 : erts-10.3.5.11 ssh-4.7.6.4 ssl-9.2.3.6 stdlib-3.8.2.4 # asn1-5.0.8 common_test-1.17.2.1 compiler-7.3.2 crypto-4.4.2.2 debugger-4.2.6 dialyzer-3.3.2 diameter-2.2.1 edoc-0.10 eldap-1.2.7 erl_docgen-0.9 erl_interface-3.11.3 et-1.6.4 eunit-2.3.7 ftp-1.0.2.2 hipe-3.18.3 inets-7.0.7.2 jinterface-1.9.1 kernel-6.3.1.3 megaco-3.18.4 mnesia-4.15.6 observer-2.9 odbc-2.12.3 os_mon-2.4.7 otp_mibs-1.2.1 parsetools-2.1.8 public_key-1.6.6.1 reltool-0.7.8 runtime_tools-1.13.2 sasl-3.3 snmp-5.2.12 syntax_tools-2.1.7.1 tftp-1.0.1 tools-3.1.0.1 wx-1.8.7 xmerl-1.3.20.1 : OTP-21.3.8.14 : erts-10.3.5.10 # asn1-5.0.8 common_test-1.17.2.1 compiler-7.3.2 crypto-4.4.2.2 debugger-4.2.6 dialyzer-3.3.2 diameter-2.2.1 edoc-0.10 eldap-1.2.7 erl_docgen-0.9 erl_interface-3.11.3 et-1.6.4 eunit-2.3.7 ftp-1.0.2.2 hipe-3.18.3 inets-7.0.7.2 jinterface-1.9.1 kernel-6.3.1.3 megaco-3.18.4 mnesia-4.15.6 observer-2.9 odbc-2.12.3 os_mon-2.4.7 otp_mibs-1.2.1 parsetools-2.1.8 public_key-1.6.6.1 reltool-0.7.8 runtime_tools-1.13.2 sasl-3.3 snmp-5.2.12 ssh-4.7.6.3 ssl-9.2.3.5 stdlib-3.8.2.3 syntax_tools-2.1.7.1 tftp-1.0.1 tools-3.1.0.1 wx-1.8.7 xmerl-1.3.20.1 : OTP-21.3.8.13 : erts-10.3.5.9 stdlib-3.8.2.3 # asn1-5.0.8 common_test-1.17.2.1 compiler-7.3.2 crypto-4.4.2.2 debugger-4.2.6 dialyzer-3.3.2 diameter-2.2.1 edoc-0.10 eldap-1.2.7 erl_docgen-0.9 erl_interface-3.11.3 et-1.6.4 eunit-2.3.7 ftp-1.0.2.2 hipe-3.18.3 inets-7.0.7.2 jinterface-1.9.1 kernel-6.3.1.3 megaco-3.18.4 mnesia-4.15.6 observer-2.9 odbc-2.12.3 os_mon-2.4.7 otp_mibs-1.2.1 parsetools-2.1.8 public_key-1.6.6.1 reltool-0.7.8 runtime_tools-1.13.2 sasl-3.3 snmp-5.2.12 ssh-4.7.6.3 ssl-9.2.3.5 syntax_tools-2.1.7.1 tftp-1.0.1 tools-3.1.0.1 wx-1.8.7 xmerl-1.3.20.1 : diff --git a/scripts/pre-push b/scripts/pre-push index 7da1f575db..6689daf03a 100755 --- a/scripts/pre-push +++ b/scripts/pre-push @@ -23,14 +23,14 @@ # # Bump this version to give users an update notification. -PRE_PUSH_SCRIPT_VERSION=1 +PRE_PUSH_SCRIPT_VERSION=2 -NEW_RELEASES="22 21 20 19 18 17" +NEW_RELEASES="23 22 21 20 19 18 17" OLD_RELEASES="r16 r15 r14 r13" RELEASES="$NEW_RELEASES $OLD_RELEASES" # First commit on master, not allowed in other branches -MASTER_ONLY=f633fe962ea7078c32f8c81d34950c0ebce0f472 +MASTER_ONLY=740b29ecc21c73a4bf4ebfc494490865d3c31978 # Number of commits and files allowed in one push by this script NCOMMITS_MAX=100 diff --git a/system/doc/general_info/DEPRECATIONS b/system/doc/general_info/DEPRECATIONS index 9983df9421..53c5aaf750 100644 --- a/system/doc/general_info/DEPRECATIONS +++ b/system/doc/general_info/DEPRECATIONS @@ -108,7 +108,6 @@ ssl:ssl_accept/_ since=21 remove=24 # crypto:rand_uniform/2 since=20 -erlang:get_stacktrace/0 since=20 remove=24 filename:find_src/_ since=20 remove=24 gen_fsm:_/_ since=20 |