1  ERTS Release Notes

1 ERTS Release Notes

This document describes the changes made to the ERTS application.

  • Fix lock order violation if a NIF monitor down callback calls enif_whereis_pid. Would cause debug emulator to crash but could potentially lead to deadlocks in optimized emulator.

    Own Id: OTP-19330 Aux Id: GH-8983, PR-9008

  • Fixed beam crash that could happen if resetting call_time or call_memory trace counters of a function while it is called. Bug exists since OTP R16.

    Own Id: OTP-19269 Aux Id: GH-8835, PR-8897

  • 'DOWN' messages originating from a monitored port, contained the atom process instead of the atom port as the third element when the exit reason was not an immediate term.

    Own Id: OTP-19123 Aux Id: GH-8484, PR-8546

  • When no time warp mode was enabled, a smaller Erlang monotonic time could be read than a previously read time, i.e., breaking the monotonic property. The runtime system will abort when detecting an issue like this since OTP 24.3.4.17 and OTP 25.0.

    Up until OTP 25 no time warp mode is the default. As of OTP 26 multi time warp mode is the default.

    Own Id: OTP-19147 Aux Id: ERIERL-1043, ERIERL-1106, PR-8619

  • A scheduler thread could get stuck when deleting a memory allocator carrier when adjacent carriers were deleted and/or inserted simultaneously by other schedulers. This in turn could cause the other schedulers to get stuck as well.

    Own Id: OTP-19154 Aux Id: GH-8613, PR-8627

  • ETS functions did not properly handle keys containing maps, sometimes matching too many or too few objects.

    Own Id: OTP-19070 Aux Id: GH-8385

  • Fix CPU quota determination for cgroups.

    The bug was introduced through OTP-18999.

    Own Id: OTP-19071 Aux Id: OTP-18999 PR-8380

  • Fixed CPU quota determination for cgroup version 2

    Own Id: OTP-18999 Aux Id: GH-7928

  • Fix faulty reduction counting in exiting process which could cause it to do unnecessary yielding.

    Own Id: OTP-19014

  • Calling erlang:trace/3 with first argument one of ports, processes, existing_ports, existing_processes, existing or all, could cause emulator crash if a dirty scheduler was executing a simultaneous trace action.

    Own Id: OTP-19034

  • Fixed an integer overflow when the monotonic time unit reported by the operating system was greater than 10 and lower than 100 microseconds.

    Own Id: OTP-19036 Aux Id: GH-8186

  • When a traced process executing on a dirty scheduler received an exit signal, the dirty scheduler could use the wrong thread specific data which could lead to a crash.

    Own Id: OTP-19043 Aux Id: PR-8342

  • Fixed a more or less harmless bug that caused time correction of Erlang monotonic time to become slightly off on Windows platforms when QueryPerformanceCounter() was used as OS monotonic time source.

    erlang:system_info(os_monotonic_time_source) now also returns information about used resolution which not always corresponds to the resolution of the OS monotonic time source.

    Own Id: OTP-19048 Aux Id: PR-8343

  • Checks for monotonicity of monotonic time have been improved so that Erlang and OS monotonic time are checked separately.

    A new configure argument --enable-ensure-os-monotonic-time has also been added. It enables functionality ensuring the monotonicity of monotonic timestamps delivered by the OS. When a non-monotonic timestamp is detected, it will be replaced by the last delivered monotonic timestamp before being used by Erlang's time functionality. Note that you do not want to enable this unless the OS monotonic time source on the system fails to produce monotonic timestamps. This since ensuring the monotonicity of OS monotonic timestamps will hurt scalability and performance of the system.

    Own Id: OTP-19044 Aux Id: ERIERL-1043, PR-8342

  • For severe errors, when the `socket` module terminates the Erlang VM, now an erl_crash.dump is produced, to facilitate post mortem debugging.

    Own Id: OTP-19058

  • Fix heap corruption bug that could cause runaway memory consumption due to circular offheap list at process exit. Other symptoms may also be possible. Bug exists since OTP 25.0.

    Own Id: OTP-18971 Aux Id: GH-8044

  • The code server could be hanging if a module with on_load function was loaded at the same time as another module was purged using erlang:purge_module directly.

    Own Id: OTP-19006

  • A process optimized for parallel signal delivery could under some circumstances lose wakeup information. That is, the processes was not woken up to take care of the signal, so the signal would not be taken care of until the process was woken by another signal. Only processes configured with message_queue_data set to off_heap utilize this optimization.

    Own Id: OTP-19008 Aux Id: GH-8119, PR-8201

  • Fix bug in re:run/3 where if an invalid UTF-8 subject was given, re:run could get stuck in an infinite loop. Bug was introduced in Erlang/OTP 22.1.

    Own Id: OTP-19015 Aux Id: ERIERL-682

  • 32-bit runtime systems on most Unix like platforms could crash if a BIF timer was set with a huge timeout of more than 68 years into the future. In order for the crash to occur, the huge timer (at a later time than when it was set) had to become the nearest active timer set on the specific scheduler on which it was set. This could not happen on a system with only one scheduler since there would always be shorter timers in the system.

    Setting a timer larger than 49 days on Windows could under rare circumstances cause the timeout to be delayed.

    Own Id: OTP-18911 Aux Id: ERIERL-1023, PR-7983

  • Garbage collection of a process on a dirty scheduler could collide with signal handling for that process causing a crash of the runtime system. This bug was introduced in OTP 25.3.2.8 and OTP 26.2.

    Own Id: OTP-18957 Aux Id: GH-8051, PR-8088, OTP-18841

  • Fix faulty debug assert when page size is larger than 16kb, like on PowerPC. Did crash debug VM directly at start.

    Own Id: OTP-18802

  • A process with message_queue_data configured as off_heap could end up in an inconsistent state when being receive traced, inspected using process_info/2 with the message_queue_len item, or inspected using the break menu (CTRL-C). When it ended up in this inconsistent state, it was not enqueued into a run queue even though it was set in a runnable state.This also effected signals being sent to the process after it had gotten into this inconsistent state, in such a way that it was from this point not possible to communicate with it.

    Own Id: OTP-18838 Aux Id: PR-7822, GH-7801

  • A race occurring when a process was selected for dirty execution simultaneously as it was scheduled for handling a signal could cause the process to end up in an inconsistent state. When it ended up in this inconsistent state, it was not enqueued into a run queue even though it was set in a runnable state. This also effected signals being sent to the process after it had gotten into this inconsistent state, in such a way that it was from this point not possible to communicate with it.

    Own Id: OTP-18839 Aux Id: PR-7822, GH-7801

  • When a process had to to wait in the run queue for a long time before being selected for dirty execution, it could not receive signals. This caused inspection of such a process, for example using process_info/2, to take a long time.

    This issue was introduced in OTP 25.3.2.6 and 26.1 when fixing an issue where a constant flow of signals prevented a process from being able to execute dirty.

    Own Id: OTP-18841 Aux Id: PR-7822, GH-7801, OTP-18737

  • Fixed a bug in the JIT that miscompiled large select_val instructions.

    Own Id: OTP-18842

  • On OTP 24 and OTP 25, incoming distributed messages larger than 64 KiB sent using an alias leaked memory if the alias had been removed prior to entering the node. This issue was not present on OTP 26.

    Incoming distributed messages larger than 64 KiB sent using an alias which had been removed on the receiving node could crash the node. This crash was quite unlikely on OTP 24 and OTP 25, but very likely on OTP 26.

    'DOWN' signals with exit reason larger than 64 KiB directed towards a process on a node with a not matching creation leaked memory on the receiving node. Such signals should however be very rare.

    Own Id: OTP-18885 Aux Id: GH-7834, GH-7890, PR-7915

  • Removed unnecessary PCRE source tar-ball.

    Own Id: OTP-18902

  • Removed unnecessary regexp library used when generating yielding BIFs.

    Own Id: OTP-18830 Aux Id: PR-7823

  • Replaced old md5 implementation with an implementation from OpenSSL.

    Own Id: OTP-18877

  • Removed unused makewhatis script.

    Own Id: OTP-18899

  • If the external term format encoding of an argument list part of a distributed spawn operation was faulty, the newly spawned remote process could misbehave. The misbehavior included hanging or interpret an incoming message as an argument list to use. This was very unlikely to happen unless using an alternate implementation of the distribution protocol which made a faulty encoding of the argument list. The child process will now detect this error and terminate before executing the user specified code.

    Own Id: OTP-18790 Aux Id: PR-7742

  • On Apple Silicon Macs running macOS Sonoma, the runtime system with the JIT enabled would crash. Therefore, the configure script will by default now disable the JIT on Macs with Apple Silicon. When building for earlier versions of macOS, the JIT can be explicitly enabled by passing --enable-jit to the configure script.

    Own Id: OTP-18792 Aux Id: GH-7687

  • Fix bugs where if the body of a matchspec would return a map with a variable ('$1', '$_' etc) as one of the keys or values and the variable was not an immidiate, the term would not be copied to the receiving processes heap. This would later corrupt the term in the table as the GC could place move markers in it, which in turn would cause the VM to crash.

    Bug has been present for since OTP 17.0.

    Own Id: OTP-18797 Aux Id: PR-7712 GH-7683

  • A process optimized for parallel signal delivery could under some circumstances lose wakeup information. That is, the processes was not woken up to take care of the signal, so the signal would not be taken care of until the process was woken by another signal. Only processes configured with message_queue_data set to off_heap utilize this optimization.

    Own Id: OTP-18647 Aux Id: PR-7595

  • Delivery time of message signals to a process not executing any receive expressions could become very long, potentially infinite. For example, a process checking for messages using process_info(self(), message_queue_len) or process_info(self(), messages) and avoiding to execute a receive expression matching on messages could be very slow in detecting new messages. Note that you are still discouraged from using process_info() this way. A process that wants to check if there are messages available to handle should execute a receive expression matching on messages.

    Own Id: OTP-18706 Aux Id: GH-7413, PR-7595, ERIERL-979

  • Fix bug causing "magic" references in a compressed ETS table to not keep the referred object alive. The symptom would be the referred object being garbage collected prematurely and the reference appearing stale, not referring to anything. Examples of such magically referred objects are atomics and NIF resources.

    Own Id: OTP-18732 Aux Id: GH-7444, PR-7458

  • A constant flow of incoming non-message signals could prevent a process needing to execute dirty from doing so.

    Own Id: OTP-18737 Aux Id: PR-7595

  • The cleanup operation of not yet delivered signals to a terminated process yielded excessively.

    Own Id: OTP-18752 Aux Id: PR-7633

  • Multiple socket:accept calls issue. When making multiple accept calls, only the last call is active.

    Own Id: OTP-18635 Aux Id: #7328

  • The following functions are now much faster when given a long list or binary:

    • erlang:list_to_integer/1
    • erlang:binary_to_integer/1
    • erlang:binary_to_integer/2
    • erlang:list_to_integer/2
    • string:to_integer/1

    Own Id: OTP-18659 Aux Id: PR-7426

  • Fixed a crash during tracing on certain platforms that cannot use the machine stack for Erlang code (mainly OpenBSD and Linux with musl).

    Own Id: OTP-18561

  • Constructing a binary segment not aligned with a byte boundary, with a size not fitting in 31 bits, and with a value not fitting in a 64-bit word could crash the runtime system.

    Own Id: OTP-18597

  • Further robustify implementation of large maps (> 32 keys). Keys that happen to have same internal 32-bit hash values are now put in collision nodes which are traversed with linear search. This removes the demand for the internal hash function when salted to eventually produce different hashes for all possible pairs of unequal terms.

    Own Id: OTP-18569

  • If a runtime system which was starting the distribution already had existing pids, ports, or references referring to a node with the same nodename/creation pair that the runtime system was about to use, these already existing pids, ports, or references would not work as expected in various situations after the node had gone alive. This could only occur if the runtime system was communicated such pids, ports, or references prior to the distribution was started. That is, it was extremely unlikely to happen unless the distribution was started dynamically and was even then very unlikely to happen. The runtime system now checks for already existing pids, ports, and references with the same nodename/creation pair that it is about to use. If such are found another creation will be chosen in order to avoid these issues.

    Own Id: OTP-18570 Aux Id: PR-7190

  • Fixed a bug in the loader that prevented certain modules compiled with no_ssa_opt from being loaded.

    Own Id: OTP-18519 Aux Id: GH-7024

  • Implementations of the call() driver callback that returned a faulty encoded result could cause a memory leak and could cause invalid data on the heap of the processes calling erlang:port_call/3.

    Own Id: OTP-18525 Aux Id: PR-7049

  • Fixed a memory corruption issue when upgrading code. The bug was introduced in OTP 25.3

    Own Id: OTP-18553

  • Fixed configure tests for a few ARM-specific instructions, which prevented the emulator from being built on some platforms.

    Own Id: OTP-18554

  • Aliases created in combination with a monitor using the {alias, explicit_unalias} option stopped working from remote nodes when a 'DOWN' signal had been received due to the monitor or if the monitor was removed using the erlang:demonitor() BIF.

    This bug was introduced in OTP 24.3.4.10 and OTP 25.3.

    Own Id: OTP-18557 Aux Id: PR-7131, OTP-18496

  • In rare circumstances, bit syntax matching of an invalid code point for a utf32 would crash the runtime system.

    Own Id: OTP-18560

  • Building the runtime system failed when native atomic support was missing. Note that execution on such systems have only been rudimentary tested.

    Own Id: OTP-18563 Aux Id: GH-7114, PR-7159

  • Fixed a bug on Windows where file:read_file_info/1 would fail for files with corrupt metadata.

    Own Id: OTP-18348 Aux Id: GH-6356

  • Fix process_info(_, binary) to again include "writable binaries" which were lost in OTP-25.0. Writable binaries are an optimization used when binaries are appended upon in a loop.

    Own Id: OTP-18373 Aux Id: PR-6574, GH-6573

  • Fix rare race when receiving fragmented messages on a terminating connection. Could potentially cause memory leaks as well as double free crashes. Bug exists since OTP 22.0.

    Own Id: OTP-18382 Aux Id: PR-6585

  • Fixed bug that could maybe cause problems when a file descriptor number is closed by a linked in driver and then opened (reused) and passed to enif_select by a NIF. No actual symptoms seen, only failed internal assertions in debug build.

    Own Id: OTP-18391

  • The runtime system could crash when tracing a process executing on a dirty scheduler.

    Own Id: OTP-18398 Aux Id: PR-6495, GH-6448, GH-5984

  • In the binary syntax, attempting to match out integers with size exceeding 2 GiB could crash the runtime system.

    Own Id: OTP-18406 Aux Id: GH-6701

  • Fixed edge case in floating-point negation where A = 0.0, B = -A did not produce B = -0.0 on x86_64 JIT.

    Own Id: OTP-18411 Aux Id: GH-6717

  • Fixed an issue in the JIT that could crash the emulator on some platforms.

    Own Id: OTP-18418

  • Added meta data to the windows installer.

    Own Id: OTP-18429 Aux Id: PR-6587 GH-4232 GH-6537

  • Fixed ETS insertion order into bag and duplicate_bag of tuples with identical keys when passed in a list to ets:insert/2. The insert order has been head-to-tail but was accidentally changed in OTP 23.0. For bag it was reverted (tail-to-head), while for duplicate_bag it was sometimes reverted depending on the length of the list and number of "reductions" left for the calling process.

    This fix changes the insert order of ets:insert/2 back to always be head-to-tail of the list argument.

    Own Id: OTP-18434 Aux Id: PR-6752

  • With the JIT for AArch64 (AMD64), calling bxor in with non-integer arguments in a guard would crash the runtime system.

    Own Id: OTP-18454 Aux Id: PR-6839

  • Fix bug regarding process flag max_heap_size. Could cause strange behavior when a process was killed due to exceeding the limit.

    Own Id: OTP-18457 Aux Id: PR-6816

  • Fixed binary comprehensions to be similar to other creation of binary data with respect to its contribution of triggering garbage collection.

    Own Id: OTP-18458

  • In rare circumstances, when a process exceeded its allowed heap size set by option max_heap_size, it would not be killed as it should be, but instead enter a kind of zombie state it would never get out of.

    Own Id: OTP-18463 Aux Id: PR-6858

  • Instead of crashing, the list_to_integer/1 and list_to_integer/2 BIFs now raise the system_limit exception for overlong lists that can't be converted to integers. Similarly, the string:to_integer/1 BIF now returns {error,system_limit} for overlong lists.

    Own Id: OTP-18475 Aux Id: PR-6897

  • Active process aliases of a process at its termination leaked memory.

    Own Id: OTP-18496 Aux Id: GH-6947, PR-6953

  • Support for fully asynchronous distributed signaling where send operations never block. This functionality is by default disabled and can be enabled per process. For more information see the documentation of process_flag(async_dist, Bool).

    Own Id: OTP-18374 Aux Id: PR-6632

  • Added the +JPperf no_fp option to explicitly disable Erlang frame pointers otherwise added when using the +JPperf map option.

    Own Id: OTP-18426

  • Comparisons between small numbers and pids or ports would in some edge cases say that the number was greater than the pid or port, violating the term order.

    Own Id: OTP-18415

  • process_info(Pid, status) when Pid /= self() could return an erroneous result.

    Own Id: OTP-18421 Aux Id: PR-6806

  • Fixed a bug in selective receive optimization that could crash 32-bit emulators.

    Own Id: OTP-18383 Aux Id: ERIERL-905

  • A race condition which was very rarely triggered could cause the signal queue of a process to become inconsistent causing the runtime system to crash.

    Own Id: OTP-18388 Aux Id: OTP-17462, PR-6662

  • Fix perf/gdb JIT symbols to not contain CodeInfoPrologue for the JIT internal module erts_beamasm.

    Own Id: OTP-18256 Aux Id: PR-6316

  • Fixed minor memory leaks.

    Own Id: OTP-18281 Aux Id: PR-4840

  • Fix bugs in ets:insert and ets:insert_new when called with a list of tuples to insert while a concurrent process either deletes or renames the table. The table deletion could be done with ets:delete/1 or be caused by termination of the table owning process.

    Symptoms are either VM crash or strange incorrect behavior from the insert operation. The risk of triggering the bugs increases with the length of the list of tuple to insert. Bugs exist since OTP 23.0.

    Own Id: OTP-18284 Aux Id: PR-6305

  • Boost execution of scheduled thread progress jobs. This to prevent memory exhaustion in extremely rapid allocation/deallocation scenarios, such as repeated ETS table creations/deletions.

    Own Id: OTP-18294 Aux Id: PR-6390

  • Fix segv crash during crash dumping an ETS table doing ets:delete_all_objects.

    Own Id: OTP-18295

  • Spec for function net:if_names/0 incorrect

    Own Id: OTP-18296 Aux Id: OTP-16464

  • Fix bug in binary_to_term decoding a binary term 2Gbyte or larger.

    Own Id: OTP-18306 Aux Id: GH-6393, PR-6401

  • Documentation of erlang:module_loaded/1 has been adjusted:

    • It did not previously say that the BIF only returns true for modules loaded as current code.
    • The warning claiming that the BIF should only be used by the code server has been removed.

    Own Id: OTP-18313 Aux Id: PR-6456

  • Fix list_to_atom/1 for negative code points. Could either return with a positive code point or fail with an incorrect exception.

    Own Id: OTP-18321

  • Fix rare bug causing VM crash when sending to a pid of a spawning process returned from erlang:processes/0.

    Only seen when provoked by system process literal_area_collector, triggered by a module purge operation, on a VM started with +Meamin (no customized allocators).

    Own Id: OTP-18322 Aux Id: PR-6479

  • gen_udp:open/2 with option(s) add_membership or drop_membership would drop earlier options.

    Own Id: OTP-18323 Aux Id: #6476

  • The inet:setopts/2 {reuseaddr, true} option will now be ignored on Windows unless the socket is an UDP socket. For more information see the documentation of the reuseaddr option part of the documentation of inet:setopts/2.

    Prior to OTP 25 the {reuseaddr, true} option was ignored for all sockets on Windows, but as of OTP 25.0 this was changed so that it was not ignored for any sockets.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-18324 Aux Id: GH-6461, PR-6481

  • Fix bug in binary_to_term decoding a list of length 1G or longer.

    Own Id: OTP-18328 Aux Id: GH-6439, PR-6440

  • Fix bug in binary_to_term (and distributed receive) when decoding a large map (>32 keys) with unsorted small maps (<= 32) as keys of the large map.

    This was only a problem if the term was encoded by erl_interface, jinterface or otherwise, as the VM itself always encodes small maps with sorted keys.

    The "binary_to_term" would appear as successful but the created large map was internally inconsistent. The smaller key-maps could not be found with maps:get and friends. Other operations such as map compare and merge could probably also give incorrect results.

    Own Id: OTP-18343 Aux Id: GH-6496

  • Fix Windows bug in open_port({spawn, Command}, ..) when Command is found via the OS search PATH and that directory path contains white spaces. The port program would start but the command line arguments to it could be incorrect.

    Own Id: OTP-18345 Aux Id: GH-6387, PR-6396

  • Fixed a bug in selective receive optimization that could crash 32-bit emulators.

    Own Id: OTP-18383 Aux Id: ERIERL-905

  • A race condition which was very rarely triggered could cause the signal queue of a process to become inconsistent causing the runtime system to crash.

    Own Id: OTP-18388 Aux Id: OTP-17462, PR-6662

  • Add abandon carrier free utilization limit (+Muacful) option to erts_alloc. This option allows the user to mark unused segments in a memory carrier as re-useable by the OS if needed.

    This functionality was a non-configurable default before Erlang/OTP 25, but removed due to performance issues.

    Own Id: OTP-18290 Aux Id: ERIERL-866 PR-6378

  • Listen sockets created with the socket module, leaked (erlang-) monitors.

    Own Id: OTP-18240 Aux Id: #6285

  • Notifications about available distribution data sent to distribution controller processes could be lost. Distribution controller processes can be used when implementing an alternative distribution carrier. The default distribution over tcp was not effected and the bug was also not present on x86/x86_64 platforms.

    Own Id: OTP-18258 Aux Id: GH-6309, PR-6324

  • Fixed inconsistency bugs in global due to nodeup/nodedown messages not being delivered before/after traffic over connections. Also fixed various other inconsistency bugs and deadlocks in both global_group and global.

    As building blocks for these fixes, a new BIF erlang:nodes/2 has been introduced and net_kernel:monitor_nodes/2 has been extended.

    The -hidden and -connect_all command line arguments did not work if multiple instances were present on the command line which has been fixed. The new kernel parameter connect_all has also been introduced in order to replace the -connect_all command line argument.

    Own Id: OTP-17934 Aux Id: PR-6007

  • Fixed IPv6 multicast_if and membership socket options.

    Own Id: OTP-18091 Aux Id: #5789

  • Accept funs (NEW_FUN_EXT) with incorrectly encoded size field. This is a workaround for a bug (OTP-18104) existing in OTP 23 and 24 that could cause incorrect size fields in certain cases. The emulator does not use the decoded size field, but erl_interface still does and is not helped by this workaround.

    Own Id: OTP-18093 Aux Id: OTP-18104, PR-5987

  • Fixed issue with inet:getifaddrs hanging on pure IPv6 Windows

    Own Id: OTP-18102 Aux Id: #5904

  • Fix faulty distribution encoding of terms with either

    • a fun with bit-string or export-fun in its environment when encoded toward a not yet established (pending) connection
    • or a fun with a binary/bitstring, in its environment, referring to an off-heap binary (larger than 64 bytes).

    The symptom could be failed decoding on the receiving side leading to aborted connection. Fix OTP-18093 is a workaround for theses bugs that makes the VM accepts such faulty encoded funs.

    The first encoding bug toward pending connection exists only in OTP 23 and 24, but the second one exists also on OTP 25.

    Own Id: OTP-18104 Aux Id: OTP-18093

  • Fixed emulator crash that could happen during crashdump generation of ETS tables with options ordered_set and {write_concurrency,true}.

    Own Id: OTP-18144 Aux Id: GH-5981

  • Retrieval of monotonic and system clock resolution on MacOS could cause a crash and/or erroneous results.

    Own Id: OTP-18160 Aux Id: PR-6103

  • Fix bug where the max allowed size of erl +hmax was lower than what was allowed by process_flag.

    Own Id: OTP-18161 Aux Id: PR-6081

  • On computers with ARM64 (AArch64) processors, the JIT could generate incorrect code when more than 4095 bits were skipped at the tail end of a binary match.

    Own Id: OTP-18201

  • In rare circumstances, an is_binary/1 guard test could succeed when given a large integer.

    Own Id: OTP-18216 Aux Id: GH-6239, PR-6240

  • Fix bug causing ets:info (and sometimes ets:whereis) to return 'undefined' for an existing table if a concurrent process were doing ets:insert with a long list on the same table.

    Own Id: OTP-18218 Aux Id: ERIERL-855

  • Fix writing and reading of more than 2 GB in a single read/write operation on macOS. Before this fix attempting to read/write more than 2GB would result in {error,einval}.

    Own Id: OTP-18222 Aux Id: PR-6248 GH-6242

  • Fix bug sometimes causing emulator crash at node shutdown when there are pending connections. Only seen when running duel distribution protocols, inet_drv and inet_tls_dist.

    Own Id: OTP-18243 Aux Id: GH-6247, PR-6258

  • Yield when adjusting large process message queues due to

    • copying terms from a literal area prior to removing the literal area.

    • changing the message_queue_data state from on_heap to off_heap.

    The message queue adjustment work will now be interleaved with all other types of work that processes have to do, even other message queue adjustment work.

    Own Id: OTP-17340 Aux Id: PR-6133

  • Add rudimentary debug feature (option) for the inet-driver based sockets, such as gen_tcp and gen_udp.

    Own Id: OTP-18032

  • Introduced the hidden and dist_listen options to net_kernel:start/2.

    Also documented the -dist_listen command line argument which was erroneously documented as a kernel parameter and not as a command line argument.

    Own Id: OTP-18107 Aux Id: PR-6009

  • New documentation chapter "Debugging NIFs and Port Drivers" under Interoperability Tutorial.

    Own Id: OTP-18109

  • Add new API function erl_features:configurable/0

    Own Id: OTP-18199 Aux Id: PR-5790

  • The monitor/3 BIF did not apply options to the created monitor if the target process or port did not exist. That is, the corresponding down message would get a `DOWN` tag even if a custom tag had been set, and the returned reference was not an alias even if the alias option had been passed.

    Own Id: OTP-18190 Aux Id: GH-6185, PR-6209

  • The erlang:monotonic_time/1, erlang:system_time/1, erlang:time_offset/1, and os:system_time/1 BIFs erroneously failed when passed the argument native.

    Own Id: OTP-18197 Aux Id: GH-6165, PR-6213

  • Distributed exit signals could be lost under the following conditions:

    • An exit signal from a parent process to a child process was lost if:

      • the parent process terminated before the spawn request that created the child had completed,

      • the spawn request set up a link between parent and child

      • the spawn request was distributed, and

      • the exit reason was larger than one machine word.

    • Loss of a connection over which a not yet completed spawn request was ongoing could cause loss of exit signals. Such loss of exit signals was very rare. Besides the above described connection loss also the following conditions had to be satisfied:

      • The spawn request that was interrupted by the connection loss also had to set up a link between the parent process and the child process.

      • The parent process that issued the spawn request also had to be terminating while the spawn request was interrupted by the connection loss.

      • The same parent process also had to have made other spawn requests to other nodes than to the node to which the connection was lost.

      • These spawn requests to the other nodes also had to set up links.

      • These spawn requests to the other nodes also had to be not yet completed at the time of the connection loss. That is, the spawn reply from the child process had not yet reached the parent process.

      If all the conditions above were met, exit signals to the children spawned due to the above described spawn requests to other nodes could be lost.

      The above bug also caused a significant memory leak when it was triggered since the destruction of the parent process never completed.

    Own Id: OTP-18164 Aux Id: PR-6114

  • A race could cause process_info(Pid, message_queue_len) on other processes to return invalid results.

    Own Id: OTP-18169 Aux Id: PR-6134

  • Fixed reduction counting for handling process system tasks.

    Own Id: OTP-18170 Aux Id: PR-6135

  • Priority elevation of terminating processes did not work which could cause execution of such processes to be delayed.

    Own Id: OTP-18175 Aux Id: PR-6142

  • An unlink operation made by a process that terminated before the unlink operation completed, i.e., before it had received an unlink-ack signal from the linked process, caused an exit signal to erroneously be sent from the terminating process to the process being unlinked. This exit signal would most often be ignored by the receiver, but if the receiver of the exit signal concurrently set up a new link, it could receive the exit signal with the actual exit reason of the terminating process instead of a noproc exit reason. It is however very hard to detect that this has happened and has no obvious negative consequences, so it should be considered harmless.

    A distributed unlink-ack signal received by a terminating process was also not properly removed which could cause a minor memory leak.

    Own Id: OTP-18177 Aux Id: PR-6150

  • On computers with the ARM64 (AArch64) architecture (such as Apple Silicon Macs) a rem expression followed by a div expression with the same operands could evaluate to the wrong result if the result of the rem expression was unused.

    Own Id: OTP-18143

  • A spawn_reply signal from a remote node could be delayed and be delivered after other signals from the newly spawned process.

    When this bug triggered, the connection to the node where the process was spawned sometimes could be taken down due to the bug. The following error message would then be logged if this happened: Missing 'spawn_reply' signal from the node <RemoteNode> detected by <Pid> on the node <LocalNode>. The node <RemoteNode> probably suffers from the bug with ticket id OTP-17737.

    This bug only affected processes which had enabled off_heap message_queue_data and parallel reception of signals had been automatically enabled.

    This bug was introduced in OTP 25.0, ERTS version 13.0.

    Own Id: OTP-18105 Aux Id: OTP-16982, PR-6003

  • Fixed type spec of erlang:system_info(dist_ctrl).

    Own Id: OTP-18106 Aux Id: PR-5992

  • The zlib built in to the runtime system has been updated to version 1.2.12. (Note that on most platforms, the platform's own zlib is used.)

    Own Id: OTP-18123 Aux Id: GH-5994

  • The erlang:is_alive() BIF could return true before configured distribution service was available. This bug was introduced in OTP 25.0 ERTS version 13.0.

    The erlang:monitor_node() and erlang:monitor() BIFs could erroneously fail even though configured distribution service was available. This occurred if these BIFs were called after the distribution had been started using dynamic node name assignment but before the name had been assigned.

    Own Id: OTP-18124 Aux Id: OTP-17558, PR-6032

  • The socket option 'reuseaddr' is *no longer* ignored on Windows.

    Own Id: OTP-17447 Aux Id: GH-4819

  • The growth rate of writable binaries has been adjusted to only increase by 20% after 16MB in size. Before this change the size would always double.

    This change may degrade write performance of large binaries.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-17569 Aux Id: PR-4793

  • Fix reduction counting bug in re:run that caused the function to yield too frequently when doing global matches.

    Own Id: OTP-17661 Aux Id: PR-5165

  • Fix spelling mistakes in epmd error messages.

    Own Id: OTP-17758 Aux Id: PR-5391

  • Fix bug where the "newshell" would trigger a newline at the column width of the terminal, even if the next character to be printed was a newline. This would cause the terminal to render two newlines instead of one.

    Own Id: OTP-17779 Aux Id: GH-5403 PR-5599

  • Fix the memory value returned from ets:info(Tid,memory) when the read_concurrency option is used.

    Before this fix the memory used by the scheduler specific lock cache lines was not counted towards the total. This caused the returned memory usage to be very incorrect on systems with many schedulers for tables with man locks.

    Own Id: OTP-17832 Aux Id: PR-5494

  • Fix the undocumented --profile_boot option to work again.

    Own Id: OTP-17836 Aux Id: PR-5546

  • [socket] Encode of sockaddr has been improved.

    Own Id: OTP-18020

  • Fix erl_child_setup (the program used by open_port({spawn,...}) and os:cmd/1) to better handle partial reads from the Erlang VM.

    Own Id: OTP-18047 Aux Id: PR-5861

  • The runtime system would crash when attempting to create more than 33554431 atoms.

    Own Id: OTP-18068 Aux Id: GH-5903

  • Users can now configure ETS tables with the {write_concurrency, auto} option. This option forces tables to automatically change the number of locks that are used at run-time depending on how much concurrency is detected. The {decentralized_counters, true} option is enabled by default when {write_concurrency, auto} is active.

    Benchmark results comparing this option with the other ETS optimization options are available here:

    https://erlang.org/bench/ets_bench_result_lock_config.html

    Own Id: OTP-15991 Aux Id: PR-5208

  • The net module now works on Windows.

    Own Id: OTP-16464

  • To enable more optimizations, BEAM files compiled with OTP 21 and earlier cannot be loaded in OTP 25.

    Own Id: OTP-16702

  • Optimize minor garbage collection for processes with large number of binaries, funs and/or external pids/ports/refs. This is a continuation of the optimization (OTP-17602) released in OTP-24.1.

    Own Id: OTP-16852 Aux Id: ERL-1347, PR-5195

  • The signal queue of a process with message_queue_data=off_heap* has been optimized to allow parallel reception of signals from multiple processes.

    This is possible to do as Erlang only guarantees that signals (i.e., message signals and non-message signals) sent from a single process to another process are ordered in send order. However, there are no ordering guarantees for signals sent from different processes to a particular process. Therefore, several processes can send signals in parallel to a specific process without synchronizing with each other. However, such signal sending was previously always serialized as the senders had to acquire the lock for the outer signal queue of the receiving process. This parallel signal sending optimization yields much better scalability for signal sending than what was previously possible, see https://erlang.org/bench/sigq_bench_result.html for benchmark results.

    * Information about how to enable the message_queue_data=off_heap setting can be found in the documentation of the function erlang:process_flag/2.

    Own Id: OTP-16982 Aux Id: PR-5020

  • The JIT now works for 64-bit ARM processors.

    Own Id: OTP-17119 Aux Id: PR-4869

  • Added support for the compile attribute -nifs() to empower compiler and loader with information about which functions may be overridden as NIFs by erlang:load_nif/2. It is recommended to use this attribute in all modules that load NIF libraries.

    Own Id: OTP-17151 Aux Id: ERIERL-590, PR-5479

  • A test case has been added to the otp_SUITE that test that the dependency versions for OTP's applications are correct. The test case uses xref to check if the used functions are available in the specified dependency versions. The test case depends on the Erlang/OTP team's testing infrastructure and will be skipped if its dependencies are not met.

    Own Id: OTP-17224

  • An Erlang installation directory is now relocatable on the file system given that the paths in the installation's RELEASES file are paths that are relative to the installations root directory. The `release_handler:create_RELEASES/4 function can generate a RELEASES file with relative paths if its RootDir parameter is set to the empty string.

    Own Id: OTP-17304

  • The following distribution flags are now mandatory: DFLAG_BIT_BINARIES, DFLAG_EXPORT_PTR_TAG, DFLAG_MAP_TAGS, DFLAG_NEW_FLOATS, and DFLAG_FUN_TAGS. This mainly concerns libraries or application that implement the distribution protocol themselves.

    Own Id: OTP-17318 Aux Id: PR-4972

  • Input for configure scripts adapted to autoconf 2.71.

    Own Id: OTP-17414 Aux Id: PR-4967

  • When binary construction using the binary syntax fails, the error message printed in the shell and by erl_error:format_exception/3,4 will contain more detailed information about what went wrong.

    Own Id: OTP-17504 Aux Id: GH-4971, PR-5281, PR-5752

  • The configuration files .erlang, .erlang.cookie and .erlang.crypt can now be located in the XDG Config Home directory.

    See the documentation for each file and filename:basedir/2 for more details.

    Own Id: OTP-17554 Aux Id: GH-5016 PR-5408 OTP-17821

  • Make byte_size/1 and binary_part/2/3 callable from match specs (in ETS and tracing).

    Own Id: OTP-17555 Aux Id: PR-5027

  • Dynamic node name improvements: erlang:is_alive/0 changed to return true for pending dynamic node name and new function net_kernel:get_state/0.

    Own Id: OTP-17558 Aux Id: OTP-17538, PR-5111, GH-5402

  • A new option called short has been added to the functions erlang:float_to_list and erlang:float_to_binary. This option creates the shortest correctly rounded string representation of the given float that can be converted back to the same float again.

    Own Id: OTP-17562 Aux Id: GH-4492

  • The tagged tuple tests and fun-calls have been optimized and are now a little bit cheaper than previously.

    These optimizations become possible after making sure that all boxed terms have at least one word allocated after the arity word. This has been accomplished by letting all empty tuples refer to the same empty tuple literal which also reduces memory usage for empty tuples.

    Own Id: OTP-17608

  • The signal queue benchmark in parallel_messages_SUITE and the ETS benchmark in ets_SUITE have benchmark result visualization HTML pages with "fill-screen" buttons to make the graphs bigger. This button did not work as intended before. When pressing the button for a graph, the last graph got replaced with a bigger version and not the one over the button. This is now fixed.

    Own Id: OTP-17630

  • The test case num_bif_SUITE:t_float_to_string previously failed sometimes as it assumed a certain rounding of floats printed with sprintf but the rounding type is platform specific.

    Own Id: OTP-17636

  • Optimize interpreter to create heap binaries of small match contexts if possible.

    This optimization was already done in the JIT.

    Own Id: OTP-17660 Aux Id: PR-5164

  • Optimize integer multiplication for x86 JIT

    Own Id: OTP-17667 Aux Id: PR-5237

  • Removed use of node creation value zero as a wildcard. Also prevent zero from being used as creation by erl_interface and jinterface nodes.

    Own Id: OTP-17682 Aux Id: PR-5347

  • Distributed spawn operations now require distributed spawn_request() support. Distributed spawn_request() was introduced in OTP 23. That is, distributed spawn operations against Erlang nodes of releases prior to OTP 23 will fail.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-17683 Aux Id: PR-5306

  • The Erlang compiler now includes type information in BEAM files, and the JIT can now use that type information to do optimizations such as eliminating or simplifying type tests.

    Own Id: OTP-17684 Aux Id: PR-5316, PR-5664

  • Improved the JIT's support for external tools like perf and gdb, allowing them to show line numbers and even the original Erlang source code when that can be found.

    To aid them in finding the source code, the absolute_path compiler option has been added to embed the absolute file path of a module.

    Own Id: OTP-17685

  • Add [32-bit] to the Erlang shell title row for 32-bit VMs.

    Own Id: OTP-17717 Aux Id: PR-5290

  • Instructions for how to build the runtime system for iOS/iPadOS can now be found in HOWTO/INSTALL.md.

    Own Id: OTP-17728 Aux Id: PR-5284

  • Add support for static Elixir NIF modules with non-alphanumeric characters by using new macro STATIC_ERLANG_NIF_LIBNAME.

    Own Id: OTP-17729 Aux Id: PR-5477

  • Add new function caller_line to for trace match specifications used by erlang:trace_pattern/3.

    This new option puts the line number of the caller into the trace message sent to the trace receiver.

    Own Id: OTP-17753 Aux Id: PR-5305 GH-5297

  • A new erl command line argument +ssrct has been introduced which will cause the runtime system to skip reading CPU topology information. This reduce start up time especially when the CPU topology is large. Reading of CPU topology information is now also skipped if a user defined CPU topology is set using the +sct command line argument.

    Own Id: OTP-17762 Aux Id: GH-5204, PR-5219

  • The default time warp mode will change in Erlang/OTP 26. Added a warning about this upcoming potential incompatibility to the documentation.

    Own Id: OTP-17772 Aux Id: GH-4965 PR-5644

  • The emulator will no longer mark unused memory as discardable (e.g. through madvise(2)), as it caused more problems than it solved.

    Own Id: OTP-17824

  • When a record matching or record update fails, a {badrecord,ExpectedRecordTag} exception used to be raised. In this release, the exception has been changed to {badrecord,ActualValue}, where ActualValue is the actual that was found instead of the expected record.

    Own Id: OTP-17841 Aux Id: PR-5694

  • Removed the previously undocumented and unsupported emem tool.

    Own Id: OTP-17892 Aux Id: PR-5591

  • Remove version number from the default install path on Windows.

    Own Id: OTP-17899 Aux Id: PR-5524

  • On Windows apply the limit flag JOB_OBJECT_LIMIT_BREAKAWAY_OK in the Erlang service to be able to start a OS child process with a different session number.

    Own Id: OTP-17927 Aux Id: PR-5283

  • New erl command line option +IOs. It can be used to disable scheduler thread poll optimization, which has been seen to cause degraded event latency in some use cases.

    Own Id: OTP-17945 Aux Id: GH-4759, PR-5809

  • An API for multihomed SCTP connect has been added in the guise of gen_sctp:connectx_init/*

    Own Id: OTP-17951 Aux Id: PR-5656

  • [socket] Add encoding of the field hatype of the type sockaddr_ll (family 'packet').

    Own Id: OTP-17968 Aux Id: OTP-16464

  • A cross compilation issue has been fixed about finding libdlpi during the configure phase.

    Own Id: OTP-17985 Aux Id: GH-5728

  • process_info/2 now also accepts parent as argument. When passed, the process identifier of the parent process will be returned.

    Own Id: OTP-17999 Aux Id: PR-5768

  • Add function attributes to erl_nif and erl_driver APis to improve compiler detection of interface misuse.

    Own Id: OTP-18006 Aux Id: PR-5932

  • The exported type erlang:send_destination/0 has been introduced.

    Own Id: OTP-18033 Aux Id: PR-2926, GH-5376

  • Building of the C/C++ make dependencies on Windows has been optimized to be a lot faster.

    Own Id: OTP-18036 Aux Id: PR-5846

  • file:sync/1 will now use the F_BARRIERFSYNC flag when available on Mac OS.

    Own Id: OTP-18038

  • process_info(Pid, status) when Pid /= self() could return an erroneous result.

    Own Id: OTP-18421 Aux Id: PR-6806

  • In rare circumstances, when a process exceeded its allowed heap size set by option max_heap_size, it would not be killed as it should be, but instead enter a kind of zombie state it would never get out of.

    Own Id: OTP-18463 Aux Id: PR-6858

  • Fixed a bug in selective receive optimization that could crash 32-bit emulators.

    Own Id: OTP-18383 Aux Id: ERIERL-905

  • A race condition which was very rarely triggered could cause the signal queue of a process to become inconsistent causing the runtime system to crash.

    Own Id: OTP-18388 Aux Id: OTP-17462, PR-6662

  • Spec for function net:if_names/0 incorrect

    Own Id: OTP-18296 Aux Id: OTP-16464

  • Fix bug in binary_to_term decoding a binary term 2Gbyte or larger.

    Own Id: OTP-18306 Aux Id: GH-6393, PR-6401

  • Fix list_to_atom/1 for negative code points. Could either return with a positive code point or fail with an incorrect exception.

    Own Id: OTP-18321

  • Fix bug in binary_to_term decoding a list of length 1G or longer.

    Own Id: OTP-18328 Aux Id: GH-6439, PR-6440

  • Notifications about available distribution data sent to distribution controller processes could be lost. Distribution controller processes can be used when implementing an alternative distribution carrier. The default distribution over tcp was not effected and the bug was also not present on x86/x86_64 platforms.

    Own Id: OTP-18258 Aux Id: GH-6309, PR-6324

  • Fix writing and reading of more than 2 GB in a single read/write operation on macOS. Before this fix attempting to read/write more than 2GB would result in {error,einval}.

    Own Id: OTP-18222 Aux Id: PR-6248 GH-6242

  • Fix bug causing ets:info (and sometimes ets:whereis) to return 'undefined' for an existing table if a concurrent process were doing ets:insert with a long list on the same table.

    Own Id: OTP-18218 Aux Id: ERIERL-855

  • Fix faulty distribution encoding of terms with either

    • a fun with bit-string or export-fun in its environment when encoded toward a not yet established (pending) connection
    • or a fun with a binary/bitstring, in its environment, referring to an off-heap binary (larger than 64 bytes).

    The symptom could be failed decoding on the receiving side leading to aborted connection. Fix OTP-18093 is a workaround for theses bugs that makes the VM accepts such faulty encoded funs.

    The first encoding bug toward pending connection exists only in OTP 23 and 24, but the second one exists also on OTP 25.

    Own Id: OTP-18104 Aux Id: OTP-18093

  • Distributed exit signals could be lost under the following conditions:

    • An exit signal from a parent process to a child process was lost if:

      • the parent process terminated before the spawn request that created the child had completed,

      • the spawn request set up a link between parent and child

      • the spawn request was distributed, and

      • the exit reason was larger than one machine word.

    • Loss of a connection over which a not yet completed spawn request was ongoing could cause loss of exit signals. Such loss of exit signals was very rare. Besides the above described connection loss also the following conditions had to be satisfied:

      • The spawn request that was interrupted by the connection loss also had to set up a link between the parent process and the child process.

      • The parent process that issued the spawn request also had to be terminating while the spawn request was interrupted by the connection loss.

      • The same parent process also had to have made other spawn requests to other nodes than to the node to which the connection was lost.

      • These spawn requests to the other nodes also had to set up links.

      • These spawn requests to the other nodes also had to be not yet completed at the time of the connection loss. That is, the spawn reply from the child process had not yet reached the parent process.

      If all the conditions above were met, exit signals to the children spawned due to the above described spawn requests to other nodes could be lost.

      The above bug also caused a significant memory leak when it was triggered since the destruction of the parent process never completed.

    Own Id: OTP-18164 Aux Id: PR-6114

  • A race could cause process_info(Pid, message_queue_len) on other processes to return invalid results.

    Own Id: OTP-18169 Aux Id: PR-6134

  • Fixed reduction counting for handling process system tasks.

    Own Id: OTP-18170 Aux Id: PR-6135

  • Priority elevation of terminating processes did not work which could cause execution of such processes to be delayed.

    Own Id: OTP-18175 Aux Id: PR-6142

  • An unlink operation made by a process that terminated before the unlink operation completed, i.e., before it had received an unlink-ack signal from the linked process, caused an exit signal to erroneously be sent from the terminating process to the process being unlinked. This exit signal would most often be ignored by the receiver, but if the receiver of the exit signal concurrently set up a new link, it could receive the exit signal with the actual exit reason of the terminating process instead of a noproc exit reason. It is however very hard to detect that this has happened and has no obvious negative consequences, so it should be considered harmless.

    A distributed unlink-ack signal received by a terminating process was also not properly removed which could cause a minor memory leak.

    Own Id: OTP-18177 Aux Id: PR-6150

  • The monitor/3 BIF did not apply options to the created monitor if the target process or port did not exist. That is, the corresponding down message would get a `DOWN` tag even if a custom tag had been set, and the returned reference was not an alias even if the alias option had been passed.

    Own Id: OTP-18190 Aux Id: GH-6185, PR-6209

  • The erlang:monotonic_time/1, erlang:system_time/1, erlang:time_offset/1, and os:system_time/1 BIFs erroneously failed when passed the argument native.

    Own Id: OTP-18197 Aux Id: GH-6165, PR-6213

  • Fixed emulator crash that could happen during crashdump generation of ETS tables with options ordered_set and {write_concurrency,true}.

    Own Id: OTP-18144 Aux Id: GH-5981

  • Accept funs (NEW_FUN_EXT) with incorrectly encoded size field. This is a workaround for a bug (OTP-18104) existing in OTP 23 and 24 that could cause incorrect size fields in certain cases. The emulator does not use the decoded size field, but erl_interface still does and is not helped by this workaround.

    Own Id: OTP-18093 Aux Id: OTP-18104, PR-5987

  • The zlib built in to the runtime system has been updated to version 1.2.12. (Note that on most platforms, the platform's own zlib is used.)

    Own Id: OTP-18123 Aux Id: GH-5994

  • Let EPMD tolerate failure when binding to IPv4/IPv6 loopback intefaces in addition to user-supplied addresses via ERL_EPMD_ADDRESS or the -address option. This can happen, for example, if the host system has ipv6 disabled via the disable_ipv6 sysctl.

    Own Id: OTP-17970 Aux Id: PR-5762

  • Fixed a rare bug in binary_to_term/1, enif_make_map_from_arrays, erl_drv_send_term, and Erlang distribution that could crash the emulator.

    Own Id: OTP-18027

  • Fixed a rare race in persistent_term:get/1,2 that could cause it to return the value of another key.

    Own Id: OTP-18065 Aux Id: GH-5908

  • Fix bug where the process message queue was left in an inconsistent state when changing from on_heap to off_heap message queue data causing the GC to segfault.

    Own Id: OTP-18075 Aux Id: PR-5927

  • Fix functions that convert universal to localtime (such as erlang:localtime/0 and erlang:universaltime_to_localtime/1) to fetch the correct localtime if it is changed after the start of the VM.

    Own Id: OTP-18076 Aux Id: ERIERL-802 PR-5905

  • Fix memory leak when a process doing a distributed fragmented send is sent an exit signal. Before this fix the receiving node would be left with an incomplete message that would remain until the nodes were disconnected. The bug has existed since Erlang/OTP 21.

    Own Id: OTP-18077 Aux Id: GH-5876 PR-5892

  • Corrected the behaviour of the shutdown function when using with the inet_backend = socket. It was not sufficiently compatible with the "old" gen_tcp.

    Own Id: OTP-18080 Aux Id: GH-5930

  • erlang:open_port({spawn, _},_) has been fixed on Windows to handle whitespace characters in the path correctly.

    This could, for example, cause execution of the resolver helper program inet_gethost to fail and instead possibly execute a different program.

    Own Id: OTP-17978 Aux Id: OTP-17958

  • Fix race condition when creating crash dump that could cause multiple threads to race when writing the initial information in a crash dump.

    The race condition was introduced in erts-12.2 (Erlang/OTP 24.2).

    Own Id: OTP-17993 Aux Id: PR-5806

  • Fix Erlang monotonic time on MacOS. Previously used OS monotonic time primitive on MacOS is buggy and will not be used anymore. It has been replaced with usage of another OS monotonic time primitive that does not appear to be buggy.

    Own Id: OTP-17998 Aux Id: PR-5825, GH-5554

  • Fixed a bug in the x86 JIT that might cause floating point instructions to wrongly throw an exception.

    Own Id: OTP-17822

  • Preserve correct nodedown_reason if supervised distribution controller processes exit with {shutdown, Reason}.

    Own Id: OTP-17838 Aux Id: PR-5748

  • Handling of send_timeout for gen_tcp has been corrected so that the timeout is honored also when sending 0 bytes.

    Own Id: OTP-17840

  • By default global does not take any actions to restore a fully connected network when connections are lost due to network issues. This is problematic for all applications expecting a fully connected network to be provided, such as for example mnesia, but also for global itself. A network of overlapping partitions might cause the internal state of global to become inconsistent. Such an inconsistency can remain even after such partitions have been brought together to form a fully connected network again. The effect on other applications that expects that a fully connected network is maintained may vary, but they might misbehave in very subtle hard to detect ways during such a partitioning.

    In order to prevent such issues, we have introduced a prevent overlapping partitions fix which can be enabled using the prevent_overlapping_partitions kernel(6) parameter. When this fix has been enabled, global will actively disconnect from nodes that reports that they have lost connections to other nodes. This will cause fully connected partitions to form instead of leaving the network in a state with overlapping partitions. Note that this fix has to be enabled on all nodes in the network in order to work properly. Since this quite substantially changes the behavior, this fix is currently disabled by default. Since you might get hard to detect issues without this fix you are, however, strongly advised to enable this fix in order to avoid issues such as the ones described above. As of OTP 25 this fix will become enabled by default.

    Own Id: OTP-17843 Aux Id: ERIERL-732, PR-5611

  • Corrected the type specification of erlang:seq_trace/2.

    Own Id: OTP-17900 Aux Id: GH-5667

  • Fix memory leak when tracing on running on a process that only handle system tasks or non-message signals (for example process_info requests).

    Own Id: OTP-17904 Aux Id: ERIERL-757

  • Add support for using socket:sockaddr_in() and socket:sockaddr_in6() when using gen_sctp, gen_tcp and gen_udp. This will make it possible to use Link Local IPv6 addresses.

    Own Id: OTP-17455 Aux Id: GH-4852

  • Show on_load failure reasons in embedded mode.

    Own Id: OTP-17718 Aux Id: PR-5199

  • Compile date saved in the Erlang VM executable has been removed.

    Own Id: OTP-17891 Aux Id: PR-5589

  • Improve documentation for the dynamic node name feature.

    Own Id: OTP-17918

  • Fixed a memory leak in file:read_file_info/2 and file:read_file/1 on Windows.

    Own Id: OTP-17827 Aux Id: GH-5527

  • Fix GC emulator crash when spawn_request was used when message tracing was enabled.

    Own Id: OTP-17871 Aux Id: PR-5612

  • When matching and constructing utf16 segments in the binary syntax, the native flag would be ignored. That is, the endian would always be big endian even on a little-endian computer (almost all modern computers).

    Own Id: OTP-17713

  • Fix the help printout of +JPperf.

    Own Id: OTP-17749 Aux Id: PR-5378 GH-5361

  • Fix bug that could cause Erlang to deadlock during creation of an Erlang crash dump.

    Own Id: OTP-17751 Aux Id: PR-5315

  • Fixed C++ build errors on some aarch64 platforms.

    Own Id: OTP-17763 Aux Id: GH-5351

  • For macOS, the Info.plist file embedded in the runtime system now only contains the absolute minimum amount of information needed for the web view in wx to work towards localhost. The other fields have been removed, allowing an application packaged in a bundle to specify the application name and other parameter in its own Info.plist file.

    Own Id: OTP-17785 Aux Id: PR-5393

  • Fix bug in internal stacks (WSTACK and ESTACK) used by term_to_binary/2 to encode terms. The bug could cause a segfault if a very very large map was to be encoded with the deterministic option given.

    Own Id: OTP-17804 Aux Id: PR-5372

  • Improve the error printout when open_port/2 fails because of invalid arguments.

    Own Id: OTP-17805 Aux Id: PR-5406

  • Fix bug in crash dumps where the stackframe of a process would be printed using an incorrect format.

    Crash dump viewer has also been fixed to be able read the broken stack format.

    The bug has existed since Erlang/OTP 23.0.

    Own Id: OTP-17814 Aux Id: PR-5462

  • An option for enabling dirty scheduler specific allocator instances has been introduced. By default such allocator instances are disabled. For more information see the documentation of the +Mdai erl command line argument.

    Own Id: OTP-17363 Aux Id: GH-4728, PR-5187

  • Minor optimization of receive markers in message queues.

    Own Id: OTP-17673 Aux Id: OTP-16226

  • All predefined types have been added to the erlang module together with documentation.

    Any reference to a predefined type now links to that documentation so that the user can view it.

    Own Id: OTP-17689 Aux Id: PR-5292

  • Suppress a code checker warning caused by debug builds of YCF. YCF tries to get a conservative estimate of the bottom of the stack by reading and returning a call stack allocated variable.

    Own Id: OTP-17719

  • Add file and product properties to erl.exe and werl.exe.

    Own Id: OTP-17724 Aux Id: ERL-1224

  • Micro optimization in bitstring append operations.

    Own Id: OTP-17760 Aux Id: ERIERL-725, PR-5414

  • Responsiveness of processes executing on normal or low priority could suffer due to code purging or literal area removal on systems with a huge amount of processes. This since during these operations all processes on the system were scheduled for execution at once.

    This problem has been fixed by introducing a limit on outstanding purge and copy literal requests in the system. By default this limit is set to twice the amount of schedulers on the system. This will ensure that schedulers will have enough work scheduled to perform these operations as quickly as possible at the same time as other work will be interleaved to a much higher degree. Performance of these operations will however be somewhat degraded due to the overhead of enforcing this limit compared to when using a very large limit.

    This limit can be set by passing the +zosrl command line argument to erl, or by calling erlang:system_flag(outstanding_system_requests_limit, NewLimit).

    Own Id: OTP-17796 Aux Id: ERIERL-729, PR-5473

  • The runtime system could call select() with a too large timeout value when executing on MacOS. This could in turn cause the runtime system to crash.

    Own Id: OTP-17735 Aux Id: GH-5339

  • The fix for Linux's behaviour when reconnecting an UDP socket in PR-5120 released in OTP-24.1.2 has been refined to only dissolve the socket's connection before a connect if the socket is already connected, that is: only for a reconnect.

    This allows code to open a socket with an ephemeral port, get the port number and connect; without the port number changing (on Linux). This turned out to have at least one valid use case (besides test cases).

    Should one reconnect the socket then the port number may change, on Linux; it is a known quirk, which can be worked around by binding to a specific port number when opening the socket. If you can do without an ephemeral port, that is...

    Own Id: OTP-17736 Aux Id: GH-5279, PR-5120, OTP-17559

  • Certain distributed signals that for various reasons must to be forced into the distribution buffer even when it is full would instead be lost if the distribution buffer was full when sent. The effected signals:

    • EXIT signals with exit reasons of one word size.
    • DOWN signals with exit reasons of one word size.
    • demonitor signals from a terminating process.
    • unlink_ack signals on OTP 23 and 24.
    • spawn_reply signals on OTP 23 and 24.

    Own Id: OTP-17737 Aux Id: GH-5346, GH-4989

  • Fix bug where a gen_tcp write error that happened during a delayed_send would cause a use after free segfault.

    Own Id: OTP-17731 Aux Id: PR-5285

  • Fix x86 JIT bug where a rem instruction could cause a segfault if given values that would cause an badarith exception.

    Own Id: OTP-17732 Aux Id: PR-5331 ERIERL-664

  • Reduction counter was not updated before and after doing apply operations on the runtime system with the jit enabled. This caused reduction counting to get out of sync if a garbage collection was made as part of the apply operation.

    Own Id: OTP-17675

  • This fixes a bug in erts_factory_undo that caused the heap to not be reset correctly. The erts_factory_undo function is, for example, called when a binary_to_term/1 call fails to reset the heap to its state before the binary_to_term/1 call. This can cause the heap to contain invalid terms which potentially can cause issues (e.g., crashes) when the whole heap is scanned.

    Own Id: OTP-17677

  • When attempting to construct a binary with an segment having an illegal type for the size (e.g. an atom), there could be an unnecessary memory allocation (and subsequent deallocation) before the operation failed. Amended to fail before allocating any memory for the binary.

    Own Id: OTP-17686

  • Fix bug in persistent_term when a key-value pair contains a magic reference that is referred more than once. Magic references are NIF resources or returned from BIFs like ets:new, atomics:new. The bug could cause the memory of the referred resource to be prematurely deallocated.

    The bug also apply to magic references in message passing on a runtime built with configure option --enable-sharing-preserving.

    Bug exist for 64-bit since OTP-24.0 and for 32-bit since OTP-20.0.

    Own Id: OTP-17700 Aux Id: GH-5271, PR-5273

  • Fixed a crash when inspecting the stack trace of an exception raised at a very high line number.

    This bug was introduced in OTP 24.

    Own Id: OTP-17712

  • The following two bugs that caused erlang:demonitor() to behave erroneously have been fixed. The bugs were only triggered if the monitor that was removed by demonitor() had previously been created simultaneously as a monitor and as an alias.

    • A demonitor operation on a monitor created using the {alias, reply_demonitor} option erroneously behaved as if the {alias, explicit_unalias} option had been used.
    • A demonitor operation did not prevent a corresponding 'DOWN' message from being delivered if the monitor reference was kept as an active alias after the operation. This could only occur if the monitored process simultaneously terminated before the demonitor signal reached it, and the exit reason was not an immediate term. That is, a term larger than one machine word.

    Own Id: OTP-17722 Aux Id: GH-5310, PR-5313

  • The python scripts that existed in erts/lib_src/yielding_c_fun/lib/tiny_regex_c/scripts had a license that was incompatible with Erlang/OTP's license. This ticket removes these scripts that were not used by us.

    Own Id: OTP-17658

  • A race between an exiting port and handling of simultaneously received signals to that port could cause a runtime system crash. The effected signals are link, monitor and demonitor. On OTP 22 a similar race could also cause a memory leak when receiving an unlink signal.

    Own Id: OTP-17642 Aux Id: PR-5248

  • A user defined tag on a monitor message could cause the runtime system to crash when the monitor message had been received.

    Own Id: OTP-17646 Aux Id: GH-5221, PR-5232

  • A call to erlang:demonitor(Ref) where the reference Ref referred to an active alias, but not an active monitor, caused the runtime system to crash.

    Own Id: OTP-17647 Aux Id: GH-5225, PR-5230

  • The message queue of a process entered an inconsistent state after a receive expression with an invalid timeout value was executed. If the exception raised due to the invalid timeout value was caught, the following receive expression executed by the process could fail to match messages already present in the message queue.

    On OTP 24 this could also cause the whole runtime system to crash.

    Own Id: OTP-17651 Aux Id: GH-5235, PR-5244

  • Sending a Port ! {PortOwner, close} signal from a process other than the port owner could erroneously trigger a badsig exit signal being sent to the port owner process even though the correct PortOwner had been passed in the signal.

    Own Id: OTP-17665 Aux Id: PR-5248

  • Atoms with Unicode code points greater than 255 (for example Greek or Cyrillic characters) would not be displayed correctly by crashdump_viewer.

    Own Id: OTP-17377

  • Fix rare minor memory leak related to jit code loading.

    Own Id: OTP-17445 Aux Id: PR-4843

  • The extended error information has been corrected and improved for the following BIFs: binary_to_existing_atom/2, list_to_existing_atom/1, erlang:send_after/{3,4}, and erlang:start_timer/{3,4}.

    Own Id: OTP-17449 Aux Id: GH-4900

  • Fix bug provoked when building with gcc 10 and link time optimization (-flto), causing Erlang compiler to crash. Bug exists since OTP-24.0.

    Own Id: OTP-17477 Aux Id: GH-4846, PR-4894

  • Corrected bugs where builds were not reducible even when the deterministic option was given. In particular, modules with map literals with more than 32 elements could cause this problem.

    As part of this fix, the term_to_binary BIF now accepts the option deterministic.

    Own Id: OTP-17495 Aux Id: PR-5153

  • After an exception has been caught in a process, the stack trace would be kept in the process longer than necessary.

    Own Id: OTP-17512

  • Fix rare race bug in memory management of distribution entries. Have been seen to cause VM crash when massive number of repeated concurrent failing connection attempts.

    Own Id: OTP-17513 Aux Id: GH-4964, PR-5015

  • The configure test for --disable-esock-socket-registry has been corrected so disabling now works.

    Own Id: OTP-17539

  • init:stop() no longer unloads loaded code before terminating the runtime system. On systems with slow CPUs (such as Raspberry PI Zero), that can significantly speed up termination of the runtime system.

    Own Id: OTP-17542 Aux Id: GH-5031, PR-5032

  • Fixed match specifications that use maps in either the guard or the body to work properly.

    With this fix both keys and values in maps can be expressions.

    Various other crashes and bugs when using maps in match specifications have also been fixed.

    Own Id: OTP-17567 Aux Id: PR-4915 PR-5115

  • Parsing of the result value in the native DNS resolver has been made more defensive against incorrect results.

    Own Id: OTP-17578 Aux Id: ERIERL-683

  • When binary_to_term/2 failed, the extended error information would always blame the second argument even if the actual error was in the first argument.

    Own Id: OTP-17591 Aux Id: GH-5171

  • On 32-bit computers, binary_to_term/1,2 is now more resilient against corrupted binaries containing maps in the external format.

    Own Id: OTP-17604

  • A call to process_info(Pid, status) could erroneously report the status running when it should have reported waiting. This occurred when the calling process was executing on a higher priority than the process being inspected. This bug has been present since OTP 21.0 (erts version 10.0).

    Own Id: OTP-17628

  • Optimize memory usage of erts internal processes used during code loading/purging by hibernating them after a long time of inactivity.

    Own Id: OTP-17426 Aux Id: PR-4785

  • Add the type erlang:stacktrace/0.

    Own Id: OTP-17453 Aux Id: PR-4764

  • The arity argument of error/2,3 can now be none to indicate that the calling functions arity should be used.

    Own Id: OTP-17456 Aux Id: PR-4764

  • Optimize match spec compiler for immediate (single word) constant terms.

    Own Id: OTP-17469

  • Functions erlang:set_cookie(Cookie) and erlang:get_cookie(Node) have been added for completeness and to facilitate configuring distributed nodes with different cookies.

    The documentation regarding distribution cookies has been improved to be less vague.

    Own Id: OTP-17538 Aux Id: GH-5063, PR-5111

  • A workaround has been implemented for Linux's quirky behaviour to not adjust the source IP address when connecting a connected (reconnecing) UDP socket.

    The workaround is to, on Linux, always dissolve any connection before connecting an UDP socket.

    Own Id: OTP-17559 Aux Id: GH-5092, PR-5120

  • The internal documentation for how to use Yielding C Fun (YCF) has been updated to contain text about best practices for using YCF for ERTS.

    Own Id: OTP-17596

  • Optimize garbage collection for processes with large number of binaries, funs and/or external pids/ports/refs.

    Own Id: OTP-17602 Aux Id: PR-5149

  • A call to the process_info() BIF could end up hanging for ever due to a bug introduced when the new selective receive optimization was introduced in OTP 24.0. Note that this bug only effects process_info().

    Own Id: OTP-17548 Aux Id: PR-5078, OTP-10391

  • Fix buffer overrun problem in the tty driver. The problem happens on some platforms when using the CTRL+R functionality of newshell with very long strings in the history.

    Own Id: OTP-17560 Aux Id: GH-5116

  • Fix race-condition that could cause a crash when tracing scheduling or garbage collections on a process that was running on a dirty scheduler.

    Own Id: OTP-17568 Aux Id: PR-4940

  • Fix rare bug where re:run would crash/return invalid results when given a subbinary as subject.

    This bug has existed since Erlang/OTP 20.0.

    Own Id: OTP-17585 Aux Id: GH-5150

  • binary_to_term/1,2 is now more resilient against corrupted binaries containing maps in the external format.

    Own Id: OTP-17594

  • A call to erlang:cancel_timer(_, [{info, false}]) could cause the calling process to block forever in the call. Note that only the synchronous version of the call (that is, the async option is false) in combination with the info option set to false was effected by this bug.

    Own Id: OTP-17472 Aux Id: PR-4932

  • Microstate accounting (msacc) and os:perf_counter() unintentionally used system time instead of monotonic time for time measurements on a lot of systems. These systems were all non x86/x86_64 systems or x86/x86_64 systems without a reliable and constant rdtsc instruction.

    The lock counting (lcnt) built runtime system also unintentionally used system time instead of monotonic time for time measurements on all systems.

    Own Id: OTP-17493

  • Simultaneous calls to erlang:system_flag(schedulers_online, _) could cause callers to end up in a suspended state forever.

    Own Id: OTP-17500 Aux Id: GH-4809

  • Not yet handled alias-message signals in the signal queue at the time when a garbage collection was performed could cause a memory corruption which in turn could result in a crash of the runtime system. This bug was introduced in OTP 24.0.

    Own Id: OTP-17431 Aux Id: GH-4858, PR-4870, OTP-16718

  • Fixed bug when using external pids/ports in keys of big maps (> 32). Could cause runtime crash. Bug exists since OTP 24.0.

    Own Id: OTP-17436 Aux Id: PR-4875

  • After a node restart with init:restart/0,1, the module socket was not usable because supporting tables had been cleared and not re-initialized. This has now been fixed.

    Handling of the "." domain as a search domain was incorrect and caused a crash in the DNS resolver inet_res, which has now been fixed.

    Own Id: OTP-17439 Aux Id: GH-4827, PR-4888, GH-4838

  • A call to port_command() could cause a scheduler to end up in an eternal loop if the port was busy and the calling process had incoming signals at the time of the call. This bug was introduced in OTP 23.3.2 (ERTS version 11.2.1), OTP 22.3.4.18 (ERTS version 10.7.2.10), and OTP 21.3.8.23 (ERTS version 10.3.5.18).

    Own Id: OTP-17448 Aux Id: GH-4898, PR-4903, OTP-17291

  • Bug fixes and code cleanup for the new socket implementation, such as:

    Assertions on the result of demonitoring has been added in the NIF code, where appropriate.

    Internal state handling for socket close in the NIF code has been reviewed.

    Looping over close() for EINTR in the NIF code has been removed, since it is strongly discouraged on Linux and Posix is not clear about if it is allowed.

    The inet_backend temporary socket option for legacy gen_tcp sockets has been documented.

    The return value from net:getaddrinfo/2 has been corrected: the protocol field is now an atom(), instead of, incorrectly, list(atom()). The documentation has also been corrected about this return type.

    Deferred close of a socket:sendfile/* file was broken and has been corrected.

    Some debug code, not enabled by default, in the socket NIF has been corrected to not accidentally core dump for debug printouts of more or less innocent events.

    Own Id: OTP-17452

  • Dirty execution of a process in combination with an unlink signal from a port to the process could cause the signal queue of the process to enter into an inconsistent state. The result of the inconsistency typically caused a crash of the runtime system. This bug was introduced in OTP 23.3 (ERTS version 11.2).

    Own Id: OTP-17462 Aux Id: GH-4885, PR-4914, OTP-17127

  • Commit of generated configure script.

    Own Id: OTP-17420 Aux Id: OTP-17398, GH-4821

  • file:open/2 now throws an badarg error when opened with both the ram and raw options.

    Own Id: OTP-16822 Aux Id: PR-2723

  • The estone benchmark has been updated to better reflect changes in the compiler and run-time system.

    Own Id: OTP-16879

  • Fix profile guided optimization of run-time system when using GCC 7 or later.

    Own Id: OTP-16880

  • Fix double close of fd when creating crash dump.

    Own Id: OTP-16884

  • Improve erl error message when unable to open included args_file.

    Own Id: OTP-17014

  • Remove warning text about the -- operation from documentation

    The -- operation was optimized in Erlang/OTP 22 so that its worst case complexity is O(N*log(N)), where N is the total size of the input lists. Therefore, the warning in the documentation saying that the time complexity is proportional to length(A)*length(B) is incorrect and is no longer needed. Notice that Erlang/OTP 21 will no longer be supported when Erlang/OTP 24 gets released.

    Own Id: OTP-17020

  • A floating point zero (0.0) can be both positive (+0.0) and negative (-0.0). Multiple bugs in the compiler, runtime system, and STDLIB have been fixed to ensure that the minus sign on 0.0 is not lost.

    Own Id: OTP-17077 Aux Id: ERL-1431, PR-2903, PR-2905, PR-2906

  • Fix compiler warnings produced by the clang compiler.

    Own Id: OTP-17105 Aux Id: PR-2872

  • Windows process erl.exe killed if its service process erlsrv.exe terminates.

    Own Id: OTP-17131 Aux Id: PR-3031, GH-4360

  • The configure scripts in crypto and erts now fail if a requested feature cannot be enabled.

    Large parts of the configure script of crypto have been rewritten with various improvements and bug fixes. It is now better at finding usable OpenSSL libraries, but will in the following cases fail to detect OpenSSL libraries where it previously sometimes detected the libraries by chance:

    • OpenSSL installations with include directory and lib directory parts installed in different base directories. In order to detect such installations after this change, the user must explicitly specify the locations using the --with-ssl=<path> and the --with-ssl-incl=<path> configure command line arguments.
    • When building with old gcc compilers or other compilers on Debian derivatives with multiarch directories under the lib directory. In order to detect such installations after this change, the user must explicitly specify the multiarch directory name using the --with-ssl-lib-subdir=lib/<multiarch-dir> configure command line argument.

    Own Id: OTP-17254 Aux Id: ERIERL-618, GH-4230

  • The erl command line arguments +Bi, +Bd, and +B erroneously caused reception of the USR1 signal to terminate the runtime system without creating a crash dump. Reception of the USR1 signal now always cause termination with creation of a crash dump, regardless of command line arguments passed. This bug has existed at least since OTP R5B.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-17275 Aux Id: PR-4553

  • Add check to make sure that when passing an option to erl that requires an argument, but none is given, we report an error. This fixes a bug introduced in OTP-22.1 via OTP-15926.

    Own Id: OTP-17314 Aux Id: OTP-15926, GH-4624, PR-

  • The "Last calls" section in crash dumps have been updated to print newlines after each non-function save_calls state (send, receive, timeout).

    Own Id: OTP-17329 Aux Id: PR-4730

  • Sockets created with socket:accept not counted (socket:info/0).

    Own Id: OTP-17372

  • The experimental socket module can now use any protocol (by name) the OS supports. Suggested in PR-2641, implemented in PR-2670.

    Own Id: OTP-14601 Aux Id: PR-2641, PR-2670, OTP-16749

  • New functions enif_dynamic_resource_call enables NIFs to call native code in another NIF module. The call is done via a resource callback function dyncall supplied by the user with the new enif_init_resource_type.

    Own Id: OTP-14753

  • Runtime support for new improved selective receive optimization.

    Own Id: OTP-16226 Aux Id: OTP-10391

  • The deprecated function erlang:get_stacktrace/0 has been removed. Use the new syntax in try/catch to retrieve the stack backtrace.

    Own Id: OTP-16653

  • Support for handling abstract code created before OTP R15 has been dropped.

    Own Id: OTP-16678 Aux Id: PR-2627

  • Extended error information for failing BIF calls as proposed in EEP 54 has been implemented.

    When a BIF call from the Erlang shell fails, more information about which argument or arguments that were in error will be printed. The same extended error information will by proc_lib, common_test, and qlc when BIF calls fail.

    For applications that wish to provide the same extended error information, there are new functions erl_error:format_exception/3 and erl_error:format_exception/4.

    There is a new error/3 BIF that allows applications or libraries to provide extended error information in the same way for their own exceptions.

    Own Id: OTP-16686

  • The erlang module documentation has been updated to improve clarity and description of edge cases.

    Own Id: OTP-16687 Aux Id: PR-2996 PR-2762

  • An example implementation of Erlang distribution over UDS using distribution processes has been introduced.

    Thanks to Jérôme de Bretagne

    Own Id: OTP-16703 Aux Id: PR-2620

  • Improve code generation when creating funs by adding a new beam instruction make_fun3 that does not do GC and allows for better register allocation.

    Own Id: OTP-16712

  • The process alias feature as outlined by EEP 53 has been introduced. It is introduced in order to provide a lightweight mechanism that can prevent late replies after timeout or connection loss. For more information, see EEP 53 and the documentation of the new alias/1 BIF and the new options to the monitor/3 BIF.

    The call operation in the framework used by gen_server, gen_statem, and gen_event has been updated to utilize alias in order to prevent late responses. The gen_statem behavior still use a proxy process in the distributed case, since it has always prevented late replies and aliases won't work against pre OTP 24 nodes. The proxy process can be removed in OTP 26.

    The alias feature also made it possible to introduce new functions similar to the erpc:receive_response() function in the gen behaviors, so the new functions gen_server:receive_response(), gen_statem:receive_response(), gen_event:receive_response() have also been introduced.

    Own Id: OTP-16718 Aux Id: PR-2735

  • Accept 64-bit process identifiers from external nodes. This is the first step in an upgrade path toward using 64-bit pids in a future OTP release.

    Own Id: OTP-16720 Aux Id: PR-2680

  • The experimental new socket API has been further developed. Some backwards incompatible changes with respect to OTP 23 have been made.

    The control message format has been changed so a decoded value is now in the 'value' field instead of in the 'data' field. The 'data' field now always contains binary data.

    Some type names have been changed regarding message headers and control message headers.

    socket:bind/2 now returns plain ok instead of {ok, Port} which was only relevant for the inet and inet6 address families and often not interesting. To find out which port was chosen use socket:sockname/1.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-16749 Aux Id: OTP-14601

  • Remove old unused +MYm and ERL_MALLOC_LIB options.

    Own Id: OTP-16788

  • Increase timer resolution on windows.

    Own Id: OTP-16814 Aux Id: PR-2704

  • The code loader has been rewritten in order to be able to load JIT:ed code. As a consequence of this, it is no longer possible to load HiPE code.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-16878

  • Add support in the Erlang/OTP build system to generate a compilation database that can be used by third-party tools (such as irony in Emacs) to compile the erts C and C++ source code. Create the database using make compdb.

    Own Id: OTP-16881

  • The BeamAsm JIT-compiler has been added to Erlang/OTP. The JIT-compiler is enabled by default on most x86 64-bit platforms that have a C++ compiler that can compile C++17. To verify that a JIT enabled emulator is running you can use erlang:system_info(emu_flavor).

    For more information see the internal documentation of BeamAsm in erts.

    Own Id: OTP-16885 Aux Id: PR-2745

  • By default all ERTS internal memory allocators based on alloc_util will now use their own separate carrier pool for migration of carriers instead of using a node global carrier pool. This was the default behavior between OTP 17 and OTP 21, but changed to use a node global carrier pool as of OTP 22.0. Usage of the node global carrier pool proved troublesome since it had a tendency to spread long lived blocks into allocators with normally short lived blocks causing increased memory fragmentation. The node global carrier pool behavior as well as other behaviors can be configured using the +M<S>cp command line argument.

    Own Id: OTP-16898 Aux Id: OTP-16856

  • New functions have been added to the maps module: merge_with/3, intersect/2, intersect_with/3, filtermap/2, from_keys/2, and maps:foreach/2.

    maps:merge_with/3 is the same as merge/2 but takes an extra fun that is used to combine items with the same key.

    maps:intersect/2 computes the intersection of two maps.

    maps:intersect_with/3 is the same as intersect/2 but takes an extra fun that is used to combine intersecting items.

    maps:filtermap/2 allows filtering and mapping of a map in a single pass.

    maps:from_keys/2 constructs a map from a list of keys and a single value and can be used to to optimize sets operations such as from_list/1, filter/2, intersection/2, and subtract/2.

    maps:foreach/2 allows iteration over a map without returning any value.

    Own Id: OTP-16936 Aux Id: ERL-1367

  • Change escripts to output any errors or warnings to standard error instead of standard out.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-16945

  • A new erl parameter for specifying a file descriptor with configuration data has been added. This makes it possible to pass the parameter "-configfd FD" when executing the erl command. When this option is given, the system will try to read and parse configuration parameters from the file descriptor.

    Own Id: OTP-16952

  • The experimental HiPE application has been removed, together with all related functionality in other applications.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-16963

  • The pretty printer for floating point number have been changed to make it easier to see if the integer part of the number has been rounded. After the change the digit that may have been rounded always appears last or just before the exponent character (e or E). This is accomplished by always printing the number using scientific notation if it is so large that the integer part could be rounded.

    Own Id: OTP-16980 Aux Id: ERL-1308

  • The erlang:monitor_node/2 BIF will now fail with a notalive exception if distribution has not been started on the current node; it used to fail with a badarg exception.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-16987

  • Accept references up to a size of 160-bits from remote nodes. This is the first step in an upgrade path toward using references up to 160-bits in a future OTP release.

    Own Id: OTP-17005 Aux Id: OTP-16718

  • Accept 64-bit port identifiers from external nodes. This is the first step in an upgrade path toward using 64-bit port identifiers in a future OTP release.

    Own Id: OTP-17007

  • One can now pass the ERL_ROOTDIR environment variable to the erl and start scrips. This makes it easier to use Erlang for Android apps. On Android, apps don't control where they will be installed.

    Own Id: OTP-17028

  • All long running functions in the maps API are now yielding. In previous releases the functions maps:from_list/1, maps:keys/1 and maps:values/1 did not yield. This could cause unfair scheduling of processes.

    Own Id: OTP-17057

  • socket:sendfile/2,3,4,5 has been implemented, for platforms that support the underlying socket library call.

    Own Id: OTP-17154 Aux Id: OTP-16749

  • The bit matching and construction syntax now supports 16-bit floats (IEEE 754-2008).

    Own Id: OTP-17207

  • Add process_flag(fullsweep_after, N) to change fullsweep_after value in an already spawned process.

    Own Id: OTP-17285 Aux Id: PR-4651

  • The max_heap_size error report has been updated to include the message queue size.

    Own Id: OTP-17293 Aux Id: PR-4672

  • Introduce new types nonempty_binary() and nonempty_bitstring().

    Own Id: OTP-17301 Aux Id: GH-4636

  • Optimize updates of large maps with identical keys and values. E.g. in the example below the original Map will be reused as the return of the second update.

    1> Map = LargeMap#{ a => b }.

    2> Map#{ a := b }.

    The same optimization was done for small maps (< 33 keys) in erts-10.4 (OTP 22.0).

    Own Id: OTP-17310 Aux Id: PR-4656

  • The previously undocumented internal -no_epmd option has been made documented and public.

    Own Id: OTP-17341 Aux Id: PR-2945

  • Reduce memory carrier super alignment on 64-bit architectures. In practice allows more fine grained control over configuration of memory carrier sizes, from increments of 256kb to 16kb.

    Own Id: OTP-17368

  • Notifications about available distribution data sent to distribution controller processes could be lost. Distribution controller processes can be used when implementing an alternative distribution carrier. The default distribution over tcp was not effected and the bug was also not present on x86/x86_64 platforms.

    Own Id: OTP-18258 Aux Id: GH-6309, PR-6324

  • Distributed exit signals could be lost under the following conditions:

    • An exit signal from a parent process to a child process was lost if:

      • the parent process terminated before the spawn request that created the child had completed,

      • the spawn request set up a link between parent and child

      • the spawn request was distributed, and

      • the exit reason was larger than one machine word.

    • Loss of a connection over which a not yet completed spawn request was ongoing could cause loss of exit signals. Such loss of exit signals was very rare. Besides the above described connection loss also the following conditions had to be satisfied:

      • The spawn request that was interrupted by the connection loss also had to set up a link between the parent process and the child process.

      • The parent process that issued the spawn request also had to be terminating while the spawn request was interrupted by the connection loss.

      • The same parent process also had to have made other spawn requests to other nodes than to the node to which the connection was lost.

      • These spawn requests to the other nodes also had to set up links.

      • These spawn requests to the other nodes also had to be not yet completed at the time of the connection loss. That is, the spawn reply from the child process had not yet reached the parent process.

      If all the conditions above were met, exit signals to the children spawned due to the above described spawn requests to other nodes could be lost.

      The above bug also caused a significant memory leak when it was triggered since the destruction of the parent process never completed.

    Own Id: OTP-18164 Aux Id: PR-6114

  • A race could cause process_info(Pid, message_queue_len) on other processes to return invalid results.

    Own Id: OTP-18169 Aux Id: PR-6134

  • Fixed reduction counting for handling process system tasks.

    Own Id: OTP-18170 Aux Id: PR-6135

  • Priority elevation of terminating processes did not work which could cause execution of such processes to be delayed.

    Own Id: OTP-18175 Aux Id: PR-6142

  • An unlink operation made by a process that terminated before the unlink operation completed, i.e., before it had received an unlink-ack signal from the linked process, caused an exit signal to erroneously be sent from the terminating process to the process being unlinked. This exit signal would most often be ignored by the receiver, but if the receiver of the exit signal concurrently set up a new link, it could receive the exit signal with the actual exit reason of the terminating process instead of a noproc exit reason. It is however very hard to detect that this has happened and has no obvious negative consequences, so it should be considered harmless.

    A distributed unlink-ack signal received by a terminating process was also not properly removed which could cause a minor memory leak.

    Own Id: OTP-18177 Aux Id: PR-6150

  • The erlang:monotonic_time/1, erlang:system_time/1, erlang:time_offset/1, and os:system_time/1 BIFs erroneously failed when passed the argument native.

    Own Id: OTP-18197 Aux Id: GH-6165, PR-6213

  • Fix writing and reading of more than 2 GB in a single read/write operation on macOS. Before this fix attempting to read/write more than 2GB would result in {error,einval}.

    Own Id: OTP-18222 Aux Id: PR-6248 GH-6242

  • Fix faulty distribution encoding of terms with either

    • a fun with bit-string or export-fun in its environment when encoded toward a not yet established (pending) connection
    • or a fun with a binary/bitstring, in its environment, referring to an off-heap binary (larger than 64 bytes).

    The symptom could be failed decoding on the receiving side leading to aborted connection. Fix OTP-18093 is a workaround for theses bugs that makes the VM accepts such faulty encoded funs.

    The first encoding bug toward pending connection exists only in OTP 23 and 24, but the second one exists also on OTP 25.

    Own Id: OTP-18104 Aux Id: OTP-18093

  • Accept funs (NEW_FUN_EXT) with incorrectly encoded size field. This is a workaround for a bug (OTP-18104) existing in OTP 23 and 24 that could cause incorrect size fields in certain cases. The emulator does not use the decoded size field, but erl_interface still does and is not helped by this workaround.

    Own Id: OTP-18093 Aux Id: OTP-18104, PR-5987

  • The zlib built in to the runtime system has been updated to version 1.2.12. (Note that on most platforms, the platform's own zlib is used.)

    Own Id: OTP-18123 Aux Id: GH-5994

  • Fixed emulator crash that could happen during crashdump generation of ETS tables with options ordered_set and {write_concurrency,true}.

    Own Id: OTP-18144 Aux Id: GH-5981

  • Let EPMD tolerate failure when binding to IPv4/IPv6 loopback intefaces in addition to user-supplied addresses via ERL_EPMD_ADDRESS or the -address option. This can happen, for example, if the host system has ipv6 disabled via the disable_ipv6 sysctl.

    Own Id: OTP-17970 Aux Id: PR-5762

  • Fixed a rare bug in binary_to_term/1, enif_make_map_from_arrays, erl_drv_send_term, and Erlang distribution that could crash the emulator.

    Own Id: OTP-18027

  • Fixed a rare race in persistent_term:get/1,2 that could cause it to return the value of another key.

    Own Id: OTP-18065 Aux Id: GH-5908

  • Fix bug where the process message queue was left in an inconsistent state when changing from on_heap to off_heap message queue data causing the GC to segfault.

    Own Id: OTP-18075 Aux Id: PR-5927

  • Fix functions that convert universal to localtime (such as erlang:localtime/0 and erlang:universaltime_to_localtime/1) to fetch the correct localtime if it is changed after the start of the VM.

    Own Id: OTP-18076 Aux Id: ERIERL-802 PR-5905

  • Fix memory leak when a process doing a distributed fragmented send is sent an exit signal. Before this fix the receiving node would be left with an incomplete message that would remain until the nodes were disconnected. The bug has existed since Erlang/OTP 21.

    Own Id: OTP-18077 Aux Id: GH-5876 PR-5892

  • Fix Erlang monotonic time on MacOS. Previously used OS monotonic time primitive on MacOS is buggy and will not be used anymore. It has been replaced with usage of another OS monotonic time primitive that does not appear to be buggy.

    Own Id: OTP-17998 Aux Id: PR-5825, GH-5554

  • By default global does not take any actions to restore a fully connected network when connections are lost due to network issues. This is problematic for all applications expecting a fully connected network to be provided, such as for example mnesia, but also for global itself. A network of overlapping partitions might cause the internal state of global to become inconsistent. Such an inconsistency can remain even after such partitions have been brought together to form a fully connected network again. The effect on other applications that expects that a fully connected network is maintained may vary, but they might misbehave in very subtle hard to detect ways during such a partitioning.

    In order to prevent such issues, we have introduced a prevent overlapping partitions fix which can be enabled using the prevent_overlapping_partitions kernel(6) parameter. When this fix has been enabled, global will actively disconnect from nodes that reports that they have lost connections to other nodes. This will cause fully connected partitions to form instead of leaving the network in a state with overlapping partitions. Note that this fix has to be enabled on all nodes in the network in order to work properly. Since this quite substantially changes the behavior, this fix is currently disabled by default. Since you might get hard to detect issues without this fix you are, however, strongly advised to enable this fix in order to avoid issues such as the ones described above. As of OTP 25 this fix will become enabled by default.

    Own Id: OTP-17843 Aux Id: ERIERL-732, PR-5611

  • Fix memory leak when tracing on running on a process that only handle system tasks or non-message signals (for example process_info requests).

    Own Id: OTP-17904 Aux Id: ERIERL-757

  • Fix GC emulator crash when spawn_request was used when message tracing was enabled.

    Own Id: OTP-17871 Aux Id: PR-5612

  • Fixed a memory leak in file:read_file_info/2 and file:read_file/1 on Windows.

    Own Id: OTP-17827 Aux Id: GH-5527

  • Responsiveness of processes executing on normal or low priority could suffer due to code purging or literal area removal on systems with a huge amount of processes. This since during these operations all processes on the system were scheduled for execution at once.

    This problem has been fixed by introducing a limit on outstanding purge and copy literal requests in the system. By default this limit is set to twice the amount of schedulers on the system. This will ensure that schedulers will have enough work scheduled to perform these operations as quickly as possible at the same time as other work will be interleaved to a much higher degree. Performance of these operations will however be somewhat degraded due to the overhead of enforcing this limit compared to when using a very large limit.

    This limit can be set by passing the +zosrl command line argument to erl, or by calling erlang:system_flag(outstanding_system_requests_limit, NewLimit).

    Own Id: OTP-17796 Aux Id: ERIERL-729, PR-5473

  • The runtime system could call select() with a too large timeout value when executing on MacOS. This could in turn cause the runtime system to crash.

    Own Id: OTP-17735 Aux Id: GH-5339

  • Certain distributed signals that for various reasons must to be forced into the distribution buffer even when it is full would instead be lost if the distribution buffer was full when sent. The effected signals:

    • EXIT signals with exit reasons of one word size.
    • DOWN signals with exit reasons of one word size.
    • demonitor signals from a terminating process.
    • unlink_ack signals on OTP 23 and 24.
    • spawn_reply signals on OTP 23 and 24.

    Own Id: OTP-17737 Aux Id: GH-5346, GH-4989

  • A call to process_info(Pid, status) could erroneously report the status running when it should have reported waiting. This occurred when the calling process was executing on a higher priority than the process being inspected. This bug has been present since OTP 21.0 (erts version 10.0).

    Own Id: OTP-17628

  • A race between an exiting port and handling of simultaneously received signals to that port could cause a runtime system crash. The effected signals are link, monitor and demonitor. On OTP 22 a similar race could also cause a memory leak when receiving an unlink signal.

    Own Id: OTP-17642 Aux Id: PR-5248

  • The message queue of a process entered an inconsistent state after a receive expression with an invalid timeout value was executed. If the exception raised due to the invalid timeout value was caught, the following receive expression executed by the process could fail to match messages already present in the message queue.

    On OTP 24 this could also cause the whole runtime system to crash.

    Own Id: OTP-17651 Aux Id: GH-5235, PR-5244

  • Sending a Port ! {PortOwner, close} signal from a process other than the port owner could erroneously trigger a badsig exit signal being sent to the port owner process even though the correct PortOwner had been passed in the signal.

    Own Id: OTP-17665 Aux Id: PR-5248

  • This fixes a bug in erts_factory_undo that caused the heap to not be reset correctly. The erts_factory_undo function is, for example, called when a binary_to_term/1 call fails to reset the heap to its state before the binary_to_term/1 call. This can cause the heap to contain invalid terms which potentially can cause issues (e.g., crashes) when the whole heap is scanned.

    Own Id: OTP-17677

  • Fix bug in persistent_term when a key-value pair contains a magic reference that is referred more than once. Magic references are NIF resources or returned from BIFs like ets:new, atomics:new. The bug could cause the memory of the referred resource to be prematurely deallocated.

    The bug also apply to magic references in message passing on a runtime built with configure option --enable-sharing-preserving.

    Bug exist for 64-bit since OTP-24.0 and for 32-bit since OTP-20.0.

    Own Id: OTP-17700 Aux Id: GH-5271, PR-5273

  • The python scripts that existed in erts/lib_src/yielding_c_fun/lib/tiny_regex_c/scripts had a license that was incompatible with Erlang/OTP's license. This ticket removes these scripts that were not used by us.

    Own Id: OTP-17658

  • Parsing of the result value in the native DNS resolver has been made more defensive against incorrect results.

    Own Id: OTP-17578 Aux Id: ERIERL-683

  • On 32-bit computers, binary_to_term/1,2 is now more resilient against corrupted binaries containing maps in the external format.

    Own Id: OTP-17604

  • Fix buffer overrun problem in the tty driver. The problem happens on some platforms when using the CTRL+R functionality of newshell with very long strings in the history.

    Own Id: OTP-17560 Aux Id: GH-5116

  • Fix race-condition that could cause a crash when tracing scheduling or garbage collections on a process that was running on a dirty scheduler.

    Own Id: OTP-17568 Aux Id: PR-4940

  • Fix rare bug where re:run would crash/return invalid results when given a subbinary as subject.

    This bug has existed since Erlang/OTP 20.0.

    Own Id: OTP-17585 Aux Id: GH-5150

  • binary_to_term/1,2 is now more resilient against corrupted binaries containing maps in the external format.

    Own Id: OTP-17594

  • Microstate accounting (msacc) and os:perf_counter() unintentionally used system time instead of monotonic time for time measurements on a lot of systems. These systems were all non x86/x86_64 systems or x86/x86_64 systems without a reliable and constant rdtsc instruction.

    The lock counting (lcnt) built runtime system also unintentionally used system time instead of monotonic time for time measurements on all systems.

    Own Id: OTP-17493

  • Simultaneous calls to erlang:system_flag(schedulers_online, _) could cause callers to end up in a suspended state forever.

    Own Id: OTP-17500 Aux Id: GH-4809

  • Fix rare race bug in memory management of distribution entries. Have been seen to cause VM crash when massive number of repeated concurrent failing connection attempts.

    Own Id: OTP-17513 Aux Id: GH-4964, PR-5015

  • A call to erlang:cancel_timer(_, [{info, false}]) could cause the calling process to block forever in the call. Note that only the synchronous version of the call (that is, the async option is false) in combination with the info option set to false was effected by this bug.

    Own Id: OTP-17472 Aux Id: PR-4932

  • A call to port_command() could cause a scheduler to end up in an eternal loop if the port was busy and the calling process had incoming signals at the time of the call. This bug was introduced in OTP 23.3.2 (ERTS version 11.2.1), OTP 22.3.4.18 (ERTS version 10.7.2.10), and OTP 21.3.8.23 (ERTS version 10.3.5.18).

    Own Id: OTP-17448 Aux Id: GH-4898, PR-4903, OTP-17291

  • Dirty execution of a process in combination with an unlink signal from a port to the process could cause the signal queue of the process to enter into an inconsistent state. The result of the inconsistency typically caused a crash of the runtime system. This bug was introduced in OTP 23.3 (ERTS version 11.2).

    Own Id: OTP-17462 Aux Id: GH-4885, PR-4914, OTP-17127

  • Commit of generated configure script.

    Own Id: OTP-17420 Aux Id: OTP-17398, GH-4821

  • Fix bug in match spec compilator seen to cause a stack overflow crash on debug VM for certain match specs. Could potentially cause problems for standard VM, but has not been verified. Match specs are used by ets:match/select functions and erlang:trace_pattern.

    Own Id: OTP-17379 Aux Id: PR-4804

  • The following signals could pass before other signals from the same sender to the same receiver. That is, these signals could arrive too early.

    • garbage-collect request. Sent from one process to another using one of the garbage_collect() BIFs.
    • check-process-code request. Sent from one process to another using one of the check_process_code() BIFs.
    • is-process-alive reply. Sent as a response to a process calling the is_process_alive() BIF.
    • process-info reply. Sent as a response to a process calling one of the process_info() BIFs.
    • port-command reply. Sent as a response to a process calling one of the port_command() BIFs.
    • port-connect reply. Sent as a response to a process calling the port_connect() BIF.
    • port-close reply. Sent as a response to a process calling the port_close() BIF.
    • port-control reply. Sent as a response to a process calling the port_control() BIF.
    • port-call reply. Sent as a response to a process calling the port_call() BIF.
    • port-info reply. Sent as a response to a process calling one of the port_info() BIFs.

    Own Id: OTP-17291

  • Fix bug in persistent_term:get/0 and info/0 that could cause VM crash in rare cases. Bug exists since OTP 23.0.

    Own Id: OTP-17298

  • Fixed a bug in zlib where decompression would crash with data_error on some valid inputs.

    Own Id: OTP-17299 Aux Id: GH-4710

  • A garbage collection of a literal area missed messages that entirely consisted of a term in a literal area. This could in turn lead to a crash of the runtime system.

    Own Id: OTP-17307

  • A call to process_flag(message_queue_data, off_heap) could cause a crash of the runtime system when sequential tracing was enabled.

    Own Id: OTP-17349

  • Fix memory leak of about 6 words when erlang:process_flag/3 is called with a pid of an already dead process. Bug exists since OTP-21.0.

    Own Id: OTP-17081 Aux Id: PR-2930

  • Fixed small memory leak in erl_drv_send_term and erl_drv_output_term when failing due to the term being invalid.

    Own Id: OTP-17089 Aux Id: PR-2934

  • The DTrace/SystemTap process_heap_grow probe is now called with valid the heap and stack pointers for the process in question.

    Own Id: OTP-17096 Aux Id: PR-2932

  • Fixed a performance issue in memory allocation for Linux kernels that didn't support MADV_FREE.

    Own Id: OTP-17124

  • A new link protocol has been introduced which prevents links from ending up in an inconsistent state where one participant considers itself linked while the other doesn't. This bug has always existed in the distributed case, but has since OTP 21 also existed in the node local case since the distributed link protocol then was adopted also for node local links. The bug could, however, only trigger if both participants operated on the link simultaneously.

    Own Id: OTP-17127

  • Fix memory leak when receiving sigchld from port program to already dead port.

    Own Id: OTP-17163

  • Fix bug where complex seq_trace tokens (that is lists, tuples, maps etc) could becomes corrupted by the GC. The bug was introduced in OTP-21.

    Own Id: OTP-17209 Aux Id: PR-3039

  • Fixed WSLPATH environment variable addition to PATH on windows, the last character was lost.

    Own Id: OTP-17229

  • Fixed a bug in the timer implementation which could cause timers that were set to more than 37.25 hours in the future to be delayed. This could occur if there were multiple timers scheduled to be triggered very close in time, but still at different times, and the scheduler thread handling the timers was not able to handle them quickly enough. Delayed timers were in this case triggered when another unrelated timer was triggered.

    Own Id: OTP-17253

  • Fixed small memory leak in erlang:trace/3 if option {tracer,_} is included and the option list is invalid or the call races with a concurrent trace or code change operation.

    Own Id: OTP-17265 Aux Id: PR-4596

  • Fix configure check for inet_pton on 32-bit windows. The failure of this check would cause epmd to be built without ipv6 support.

    Own Id: OTP-17283

  • Various address sanitizer support.

    Own Id: OTP-16959 Aux Id: PR-2965

  • The emulator will now honor cgroup2 CPU quotas.

    Own Id: OTP-17002

  • Improved memory barrier usage on ARMv8 hardware, and specifically on Apple silicon.

    Own Id: OTP-17195 Aux Id: PR-4505, PR-4538

  • Improved memory barrier usage on 64-bit POWER hardware.

    Own Id: OTP-17200 Aux Id: PR-4510

  • Fix a file descriptor leak when using sendfile and the remote side closes the connection. This bug has been present since OTP-21.0.

    Own Id: OTP-17244

  • Refinement of the documentation of the message_queue_data process flag.

    Own Id: OTP-17252 Aux Id: PR-4568

  • Fixed a bug that could cause some work scheduled for execution on scheduler threads to be delayed until other similar work appeared. Beside delaying various cleanup of internal data structures also the following could be delayed:

    • Termination of a distribution controller process
    • Disabling of the distribution on a node
    • Gathering of memory allocator information using the instrument module
    • Enabling, disabling, and gathering of msacc information
    • Delivery of 'CHANGE' messages when time offset is monitored
    • A call to erlang:cancel_timer()
    • A call to erlang:read_timer()
    • A call to erlang:statistics(io | garbage_collection | scheduler_wall_time)
    • A call to ets:all()
    • A call to erlang:memory()
    • A call to erlang:system_info({allocator | allocator_sizes, _})
    • A call to erlang:trace_delivered()

    The bug existed on runtime systems running on all types of hardware except for x86/x86_64.

    Own Id: OTP-17185

  • Make windows installer remove write access rights for non admin users when installing to a non default directory. Reduces the risk for DLL sideloading, but the user should always be aware of the access rights for the installation.

    Own Id: OTP-17097

  • The suspend_process() and resume_process() BIFs did not check their arguments properly which could cause an emulator crash.

    Own Id: OTP-17080

  • The runtime system would get into an infinite loop if the runtime system was started with more than 1023 file descriptors already open.

    Own Id: OTP-17088 Aux Id: ERIERL-580

  • Fix emulator crash when sending small bit-strings over Erlang distribution while the connection is being setup.

    The fault was introduced in OTP-23.0

    Own Id: OTP-17083 Aux Id: ERIERL-572

  • Fixed bug which could cause VM crash when a NIF is loaded at the same time as the Erlang implementation of the NIF is called. Bug exists since OTP 23.0.

    Own Id: OTP-16859

  • Fixed enif_make_map_* functions in debug build when given environment from enif_alloc_env.

    Own Id: OTP-16863 Aux Id: ERL-1352

  • Fixed broken configuration option --disable-pie.

    Own Id: OTP-16864

  • Fixed rare distribution bug in race between received signal (link/monitor/spawn_request/spawn_reply) and disconnection. Symptom: VM crash. Since: OTP 21.0.

    Own Id: OTP-16869 Aux Id: ERL-1337

  • Fixed a performance issue when extremely many items were stored in the process dictionary. (Fixing this bug also eliminates a compiler warning emitted by the latest version of Clang.)

    Own Id: OTP-16888

  • Remove -ftree-copyrename from flags passed to compiler when building erts. The flag is not used by modern gcc's and is not supported by clang.

    Own Id: OTP-16894

  • Modules using complicated nested binary comprehensions could fail to load.

    Own Id: OTP-16899

  • Fixed a race in file:read_file/1 were an incomplete file could be returned if another OS process swapped the file out while reading.

    Own Id: OTP-16948 Aux Id: PR-2792

  • The call list_to_integer("10", true) would return 4 instead of raising an exception. Certain other atoms would also be interpreted as a number base.

    Own Id: OTP-17030

  • On macOS 11 (Big Sur), erl would not start if the maximum number of file descriptors were unlimited (ulimit -n unlimited).

    Own Id: OTP-17055 Aux Id: ERL-1417

  • Add manifest to all executables and dynamic libraries.

    Own Id: OTP-17067 Aux Id: PR-2907

  • Fixed a crash when exceptions were thrown during call time tracing.

    Own Id: OTP-16994

  • Fixed bugs causing issues when enabling the ERTS internal allocators on a system built with the undocumented and unsupported SMALL_MEMORY feature.

    Own Id: OTP-16939

  • The inet driver used to use 16 as maximum elements in an I/O vector passed to writev() (and WSASend() on Windows). When the data to send contained lots of elements, this caused a performance degradation since repeated calls to writev() had to be made to a much larger extent. The inet driver now looks up actual maximum amount of elements that can be used on the system, instead of just assuming 16. On most systems this will result in a maximum amount of I/O vector elements of 1024.

    As of OTP 23.0 the term encoding of signals to send over the distribution are encoded into I/O vectors of buffers instead of into a single buffer. Reference counted binaries are referred to directly from the I/O vector instead of being copied into the single buffer. That is, Erlang signals containing huge amounts of reference counted binaries was effected by this performance degradation.

    Own Id: OTP-16955 Aux Id: ERL-1343, OTP-15618

  • In the distributed case, a faulty reply option in a call to the spawn_request() BIF erroneously caused a badarg exception instead of a badopt error message reply.

    Own Id: OTP-16991 Aux Id: OTP-15251

  • inet:setopts([{active,once}]) wakes up IO polling thread unnecessarily, leading to lock contention and visibly higher CPU utilization.

    Own Id: OTP-16847 Aux Id: ERL-1301

  • Two bugs in the ERTS internal thread wakeup functionality have been fixed. These bugs mainly hit when all threads in the system tried to go to sleep. When the bugs were triggered, certain operations were delayed until a thread woke up due to some other reason. Most important operations effected were code loading, persistent term updates, and memory deallocation.

    Own Id: OTP-16870

  • Fixed bug in ets:select_replace/2 on compressed tables that could produce faulty results or VM crash. Bug exists since OTP 20.

    Own Id: OTP-16874 Aux Id: ERL-1356, PR-2763

  • When compiling Erlang/OTP on macOS using Xcode 12, the performance of the BEAM interpreter would be degraded.

    Own Id: OTP-16892

  • As of OTP 22, the allocator specific memory carrier pools were replaced by a node global carrier pool. This unfortunately caused substantial memory fragmentation in some cases due to long lived data being spread into carriers used by allocators mainly handling short lived data.

    A new command line argument +M<S>cp has been introduced with which one can enable the old behavior as well as configuring other behaviors for the carrier pools. In order to configure the old behavior, with allocator specific carrier pools for all allocators, pass +Mucp : (including the colon character) as a command line argument to erl when starting the Erlang system.

    The default configuration for carrier pools will be changed to +Mucp : some time in the future, but not in this patch.

    Own Id: OTP-16856

  • Update the documentation of the abstract format to use ANNO instead of LINE.

    Own Id: OTP-16625 Aux Id: PR-2609

  • The emulator will no longer revert to the default number of schedulers when running under a CPU quota lower than 1 CPU.

    Own Id: OTP-16710 Aux Id: ERL-1280

  • Fixed a problem with crash dumps. When a process that contained reference to literals internally created by the runtime system (such as the tuple returned by os:type/0), the literal would not be included in the crash dump and the crashdump viewer would complain about the heap being incomplete.

    Own Id: OTP-16713

  • Fix configure detection of PGO for clang.

    Own Id: OTP-16738

  • The to_erl program has been fixed to correctly interpret newline as only newline and not newline+return.

    This bug would cause the terminal to behave strangely when using lines longer than the terminal size.

    Own Id: OTP-16741

  • A race condition when changing process priority by calling process_flag(priority, Prio) could cause elevation of priority for a system task to be ignored. This bug hit if the system task was scheduled on the process calling process_flag() at the same time as the priority was changed. The bug is quite harmless and should hit very seldom if ever.

    Own Id: OTP-16770

  • Adjust /bin/sh to /system/bin/sh in scripts when installing on Android.

    Own Id: OTP-16833 Aux Id: PR-2729

  • In rare circumstances, when loading a BEAM file generated by an alternative code generator (not the Erlang compiler in OTP) or from handwritten or patched BEAM code, the loader could do an unsafe optimization.

    Own Id: OTP-16850 Aux Id: ERL-1344

  • A memory and file descriptor leak in socket has been fixed. (When a newly opened socket that had not entered the fd into the VM's poll set (neither received, sent, accepted nor connected) was abandoned without closing (process died), after assigning a different controlling process, then a memory block and the file descriptor could be leaked.)

    Own Id: OTP-16857

  • The documentation of statistics(run_queue) erroneously stated that it returns the total length of all normal run queues when it is the total length of all normal and dirty CPU run queues that is returned. The documentation has been updated to reflect the actual behavior.

    Own Id: OTP-16866 Aux Id: ERL-1355

  • Changes in order to build on the Haiku operating system.

    Thanks to Calvin Buckley

    Own Id: OTP-16707 Aux Id: PR-2638

  • When building the inet driver on Windows, there where many compiler warnings regarding type casting (used when calling the debug macro). This has now been resolved.

    Own Id: OTP-16715

  • Make (use of) the socket registry optional (still enabled by default). Its now possible to build OTP with the socket registry turned off, turn it off by setting an environment variable and controlling in runtime (via function calls and arguments when creating sockets).

    Own Id: OTP-16763

  • Change default filename encoding on android to UTF-8.

    Own Id: OTP-16821 Aux Id: PR-2733

  • Clarification of the format of the atom cache header used by the distribution.

    Own Id: OTP-16848 Aux Id: PR-2737

  • The ERTS internal I/O poll implementation could get into an inconsistent state causing input events to be ignored.

    Own Id: OTP-16780 Aux Id: PR-2701

  • Fixed bug in erlang:load_nif/2 that could cause it to throw badarg exception if a concurrent code change operation was in progress. Bug existed since OTP 23.0.

    Own Id: OTP-16704 Aux Id: ERL-1273, PR-16704

  • Minor fix of debug compiled VM.

    Own Id: OTP-16717

  • An unintentional reuse of an already used emulator internal event object could cause a wakeup signal to a thread to be lost. In worst case this could cause the runtime system to hang. This hang was however quite rare.

    Own Id: OTP-16766 Aux Id: ERL-1304

  • NIF threads and driver threads on non-Linux systems leaked internal resources when terminating. On Windows these resources were one event per thread. On most other systems one mutex and one condition variable per thread. On these other systems that also lacked pthread_cond_timedwait() also a pipe with its file descriptors was leaked.

    Own Id: OTP-16772 Aux Id: ERL-1304

  • Fixed bug when sending an export fun (eg lists:reverse/1) on a not yet established connection. It could cause VM crash. Bug exists since OTP 23.0.

    Own Id: OTP-16693 Aux Id: ERL-1254, PR-2640

  • 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.

    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.

    Own Id: OTP-16639 Aux Id: ERL-1236

  • SCTP and UDP recv/2,3 hangs indefinitely if socket is closed while recv is called (socket in passive mode).

    Own Id: OTP-16654 Aux Id: ERL-1242

  • BIFs now behave like ordinary functions with regard to tracing, allowing call_count tracing and fixing a few bugs where return trace messages were lost when BIFs tail-called themselves or other functions ("trapping").

    Own Id: OTP-14734 Aux Id: ERL-496

  • Fix various compiler warnings on 64-bit Windows.

    Own Id: OTP-15800

  • erlang:fun_info(fun foo/1, name/1) used to return a function name based on the name of the function that fun foo/1 was used in. The name returned is now -fun.foo/1-.

    Own Id: OTP-15837

  • file:allocate/3 will now update the file size on all platforms.

    Own Id: OTP-16155 Aux Id: PR-2408

  • erlang:decode_packet with type set to httph no longer accepts http headers that have whitespaces in between the header name and the colon. That is:

    Content-Type : text/html

    is no longer allowed. This has been changed to conform with RFC 7230 and thus protect against http desync attacks.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-16168 Aux Id: ERL-1053

  • Fix the quoting rules in erl -args_file, ERL_FLAGS, ERL_AFLAGS and ERL_ZFLAGS to work as unix sh quoting.

    This bug fix can make previous configuration options to erl passed through ERL_FLAGS, ERL_AFLAGS, ERL_ZFLAGS or -args_file not be interpreted in the same way as before the fix.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-16244 Aux Id: ERL-1051

  • 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.

    The DFLAG_FRAGMENT distribution flag was added to the set of flags that can be rejected by a distribution implementation.

    Own Id: OTP-16284

  • 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 system_limit error exception in this situation.

    Own Id: OTP-16431 Aux Id: ERL-592

  • Fixed a bug that prevented Erlang from being started on Windows if it were installed on certain paths.

    Own Id: OTP-16478 Aux Id: ERL-1115

  • 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 os:cmd/1. Could be avoided with command line option -noinput.

    The bad performance was caused by an io thread spinning indefinitely.

    Own Id: OTP-16521 Aux Id: ERL-716

  • Fixed a bug on Unix platforms that would cause file:read_file_info/1 to return incorrect results if the emulator's effective user or group id differed from its actual ones.

    Own Id: OTP-16571

  • 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.

    Own Id: OTP-16576 Aux Id: ERL-1208

  • Fixed bug in erl_crash.dump generation that could cause a SEGV core dump if a recently cancelled timer was found.

    Own Id: OTP-16596 Aux Id: ERL-1105, PR-2606

  • Improved concurrency of erlang:load_nif/2 as it does no longer block other schedulers from executing during initial load of a NIF library.

    Own Id: OTP-10278

  • EEP-52 has been implemented.

    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.

    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 EEP 52.

    Own Id: OTP-14708

  • Internally in BEAM, handling of continuation pointers has been simplified. This change is not user-visible, except when examining a process stack in the crashdump viewer. The continuation pointer for a function will now be stored below the y(0) for that function.

    Own Id: OTP-15077

  • seq_trace tokens are now propagated to spawned processes.

    Own Id: OTP-15232 Aux Id: ERL-700

  • Improvements of distributed spawn operations. These include both scalability and performance improvements as well as new functionality.

    New functionality:

    • A distributed spawn_monitor() BIF.

    • Support for monitor option in the distributed spawn_opt() BIF.

    • New spawn_request() BIFs for asynchronous spawn of processes. spawn_request() supports all options that spawn_opt() support plus a few more.

    Own Id: OTP-15251

  • Make ets:insert/2 and ets:insert_new/2 yield scheduler execution on long lists of records to insert.

    Own Id: OTP-15517 Aux Id: ERL-560

  • 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.

    Own Id: OTP-15603

  • 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.

    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 outputv 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 erlang:dist_ctrl_get_data().

    The return type for data returned by erlang:dist_ctrl_get_data() has been changed from iodata() to iovec(). Note that iovec() data is valid iodata() so old implementations using erlang:dist_ctrl_get_data() do not need to be changed, but may benefit from being changed depending on usage scenario.

    The new BIFs term_to_iovec/1 and term_to_iovec/2 have been introduced. These work exactly as term_to_binary() with the corresponding arity except the return type.

    Own Id: OTP-15618

  • Improved ETS scalability of concurrent calls that change the size of a table, like ets:insert/2 and ets:delete/2.

    This performance feature was implemented for ordered_set in OTP 22.0 and does now apply for all ETS table types.

    The improved scalability may come at the cost of longer latency of ets:info(T,size) and ets:info(T,memory). A new table option decentralized_counters has therefore been added. It is default true for ordered_set with write_concurrency enabled and default false for all other table types.

    Own Id: OTP-15744 Aux Id: OTP-15623, PR-2229

  • Directories can now be opened by file:open/2 when passing the directory option.

    Own Id: OTP-15835 Aux Id: PR-2212

  • Add Hygon Dhyana as known processor to enable support for atomic operations.

    Own Id: OTP-15840

  • Make erlang:phash2 functions consume reductions proportional to the size of the input term and yield scheduler when reductions are depleted.

    Own Id: OTP-15842 Aux Id: PR-2182

  • Fix various build issues when compiling Erlang/OTP to the IBM AIX platform.

    Own Id: OTP-15866 Aux Id: PR-2110

  • Add configure options --enable-pie and --disable-pie to control the build of position independent executables.

    Own Id: OTP-15868

  • file:read_file_info/2 can now be used on opened files and directories.

    Own Id: OTP-15956 Aux Id: PR-2231

  • Add arity-1 versions of atom_to_binary, binary_to_atom and binary_to_existing_atom, all with utf8 as default encoding.

    Own Id: OTP-15995 Aux Id: PR-2358

  • 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.

    Own Id: OTP-16014 Aux Id: PR-2345

  • 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 docker with the --cpus flag.

    Own Id: OTP-16105 Aux Id: ERL-927

  • The -config option to erl now can take multiple config files without repeating the -config option. Example:

    erl -config sys local

    Own Id: OTP-16148 Aux Id: PR-2373

  • Removed the scheduler_poll and async I/O dtrace and LTTng trace probes.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-16215

  • Optimized persistent_term:put/2 and erase/1 to consume less CPU in many cases.

    Own Id: OTP-16237 Aux Id: PR-2389

  • 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.

    -dist_listen false
    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.
    -erl_epmd_port Port
    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.

    The erl_epmd callback API has also been extended to allow returning -1 as the creation which means that a random creation will be created by the node.

    In addition a new callback function called listen_port_please has been added that allows the callback to return which listen port the distribution should use. This can be used instead of inet_dist_listen_min/max if the listen port is to be fetched from an external service.

    Own Id: OTP-16250

  • On systems without closefrom(), such as Linux, iterating over all possible file descriptors and calling close() for each is inefficient. This is markedly so when the maximum number of file descriptors has been tuned to a large number.

    Instead, in erl_child_setup, walk the open descriptors under /dev/fd and close only those which are open.

    This optimization affects the CPU usage of starting a new Erlang instance.

    Own Id: OTP-16270

  • Optimized maps:merge/2 for trivial cases of an empty map(s) or same map.

    Own Id: OTP-16283 Aux Id: PR-2441

  • The new experimental socket module has been moved to the Kernel application.

    Own Id: OTP-16312

  • Improved the presentation of allocations and carriers in the instrument module.

    Own Id: OTP-16327

  • As announced in OTP 22.0, the previously existing limited support for VxWorks has now been removed.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-16329 Aux Id: OTP-15621

  • The return value when using the httph and httph_bin option to erlang:decode_packet/3 and inet:setopts/2 has been changed to also include the original header unmodified. See erlang:decode_packet/3. Example:

     >
    	    erlang:decode_packet(httph_bin,<<"HELLO:
    	    hi\r\n\r\n">>,[]).
    	    {ok,{http_header,0,<<"Hello">>,<<"HELLO">>,<<"hi">>},<<"\r\n">>}
    	    

    Own Id: OTP-16347 Aux Id: PR-2466

  • Ensure net_kernel:monitor_nodes/1 sends nodedown messages of a failed connection before nodeup messages of a reestablished connection toward the same node.

    Own Id: OTP-16362

  • Update of sequential tracing to also support other information transfers than message passing.

    Own Id: OTP-16370 Aux Id: OTP-15251, OTP-15232

  • socket: It is now possible to create a socket from an already existing file descriptor.

    Own Id: OTP-16398 Aux Id: ERL-1154

  • socket: The socket:supports/1 function now also report if netns is supported or not.

    Own Id: OTP-16432

  • =:= has been optimized to return false immediately when comparing two maps of different sizes.

    Own Id: OTP-16454

  • Changed the behaviour of passing the erl command line argument +A 0 to silently imply +A 1. 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.

    Own Id: OTP-16482

  • The deprecated erlang:get_stacktrace/0 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. erlang:get_stacktrace/0 is scheduled for removal in OTP 24.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-16484

  • init:restart/1 has been introduced. init:restart/1 can be utilized for changing the code loading mode during a restart.

    Own Id: OTP-16492 Aux Id: PR-2461

  • Improve configure for the net nif, which should increase portability.

    Own Id: OTP-16530 Aux Id: OTP-16464

  • socket: Socket counters and socket global counters are now represented as maps (instead of property lists).

    Own Id: OTP-16535

  • Reduced the resource usage of erlc in parallel builds (e.g. make -j128).

    Own Id: OTP-16543 Aux Id: ERL-1186

  • 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.

    Own Id: OTP-16550 Aux Id: ERIERL-476

  • Updated the internal pcre library to 8.44.

    Own Id: OTP-16557

  • There is now cost in terms of reductions when copying binary data using the binary syntax.

    Own Id: OTP-16601 Aux Id: OTP-16577

  • The executable erl_call is now part of the erts distribution in addition to erl_interface.

    Own Id: OTP-16602

  • Fix a buffer overflow bug that caused EPMD to consume 100% CPU after many nodes had been connected on the same time on NetBSD.

    Own Id: OTP-16615

  • erl -remsh now uses the dynamic node names feature by default. See the erl documentation for details.

    Own Id: OTP-16616

  • 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

    Own Id: OTP-16620

  • The environment variable $HOME does no longer have to be set before Erlang can be started.

    Own Id: OTP-16635 Aux Id: ERL-476 PR-2390

  • Fix bug where the process message queue was left in an inconsistent state when changing from on_heap to off_heap message queue data causing the GC to segfault.

    Own Id: OTP-18075 Aux Id: PR-5927

  • Fix functions that convert universal to localtime (such as erlang:localtime/0 and erlang:universaltime_to_localtime/1) to fetch the correct localtime if it is changed after the start of the VM.

    Own Id: OTP-18076 Aux Id: ERIERL-802 PR-5905

  • Fix memory leak when a process doing a distributed fragmented send is sent an exit signal. Before this fix the receiving node would be left with an incomplete message that would remain until the nodes were disconnected. The bug has existed since Erlang/OTP 21.

    Own Id: OTP-18077 Aux Id: GH-5876 PR-5892

  • By default global does not take any actions to restore a fully connected network when connections are lost due to network issues. This is problematic for all applications expecting a fully connected network to be provided, such as for example mnesia, but also for global itself. A network of overlapping partitions might cause the internal state of global to become inconsistent. Such an inconsistency can remain even after such partitions have been brought together to form a fully connected network again. The effect on other applications that expects that a fully connected network is maintained may vary, but they might misbehave in very subtle hard to detect ways during such a partitioning.

    In order to prevent such issues, we have introduced a prevent overlapping partitions fix which can be enabled using the prevent_overlapping_partitions kernel(6) parameter. When this fix has been enabled, global will actively disconnect from nodes that reports that they have lost connections to other nodes. This will cause fully connected partitions to form instead of leaving the network in a state with overlapping partitions. Note that this fix has to be enabled on all nodes in the network in order to work properly. Since this quite substantially changes the behavior, this fix is currently disabled by default. Since you might get hard to detect issues without this fix you are, however, strongly advised to enable this fix in order to avoid issues such as the ones described above. As of OTP 25 this fix will become enabled by default.

    Own Id: OTP-17843 Aux Id: ERIERL-732, PR-5611

  • Fix memory leak when tracing on running on a process that only handle system tasks or non-message signals (for example process_info requests).

    Own Id: OTP-17904 Aux Id: ERIERL-757

  • Fix Erlang monotonic time on MacOS. Previously used OS monotonic time primitive on MacOS is buggy and will not be used anymore. It has been replaced with usage of another OS monotonic time primitive that does not appear to be buggy.

    Own Id: OTP-17998 Aux Id: PR-5825, GH-5554

  • Responsiveness of processes executing on normal or low priority could suffer due to code purging or literal area removal on systems with a huge amount of processes. This since during these operations all processes on the system were scheduled for execution at once.

    This problem has been fixed by introducing a limit on outstanding purge and copy literal requests in the system. By default this limit is set to twice the amount of schedulers on the system. This will ensure that schedulers will have enough work scheduled to perform these operations as quickly as possible at the same time as other work will be interleaved to a much higher degree. Performance of these operations will however be somewhat degraded due to the overhead of enforcing this limit compared to when using a very large limit.

    This limit can be set by passing the +zosrl command line argument to erl, or by calling erlang:system_flag(outstanding_system_requests_limit, NewLimit).

    Own Id: OTP-17796 Aux Id: ERIERL-729, PR-5473

  • The runtime system could call select() with a too large timeout value when executing on MacOS. This could in turn cause the runtime system to crash.

    Own Id: OTP-17735 Aux Id: GH-5339

  • Certain distributed signals that for various reasons must to be forced into the distribution buffer even when it is full would instead be lost if the distribution buffer was full when sent. The effected signals:

    • EXIT signals with exit reasons of one word size.
    • DOWN signals with exit reasons of one word size.
    • demonitor signals from a terminating process.
    • unlink_ack signals on OTP 23 and 24.
    • spawn_reply signals on OTP 23 and 24.

    Own Id: OTP-17737 Aux Id: GH-5346, GH-4989

  • On 32-bit computers, binary_to_term/1,2 is now more resilient against corrupted binaries containing maps in the external format.

    Own Id: OTP-17604

  • A call to process_info(Pid, status) could erroneously report the status running when it should have reported waiting. This occurred when the calling process was executing on a higher priority than the process being inspected. This bug has been present since OTP 21.0 (erts version 10.0).

    Own Id: OTP-17628

  • A race between an exiting port and handling of simultaneously received signals to that port could cause a runtime system crash. The effected signals are link, monitor and demonitor. On OTP 22 a similar race could also cause a memory leak when receiving an unlink signal.

    Own Id: OTP-17642 Aux Id: PR-5248

  • The message queue of a process entered an inconsistent state after a receive expression with an invalid timeout value was executed. If the exception raised due to the invalid timeout value was caught, the following receive expression executed by the process could fail to match messages already present in the message queue.

    On OTP 24 this could also cause the whole runtime system to crash.

    Own Id: OTP-17651 Aux Id: GH-5235, PR-5244

  • Sending a Port ! {PortOwner, close} signal from a process other than the port owner could erroneously trigger a badsig exit signal being sent to the port owner process even though the correct PortOwner had been passed in the signal.

    Own Id: OTP-17665 Aux Id: PR-5248

  • This fixes a bug in erts_factory_undo that caused the heap to not be reset correctly. The erts_factory_undo function is, for example, called when a binary_to_term/1 call fails to reset the heap to its state before the binary_to_term/1 call. This can cause the heap to contain invalid terms which potentially can cause issues (e.g., crashes) when the whole heap is scanned.

    Own Id: OTP-17677

  • Fix bug in persistent_term when a key-value pair contains a magic reference that is referred more than once. Magic references are NIF resources or returned from BIFs like ets:new, atomics:new. The bug could cause the memory of the referred resource to be prematurely deallocated.

    The bug also apply to magic references in message passing on a runtime built with configure option --enable-sharing-preserving.

    Bug exist for 64-bit since OTP-24.0 and for 32-bit since OTP-20.0.

    Own Id: OTP-17700 Aux Id: GH-5271, PR-5273

  • Fixed a bug in zlib where decompression would crash with data_error on some valid inputs. The bug could also cause extraction from a zip archive using zip:extract() to fail.

    Own Id: OTP-17470 Aux Id: ERIERL-657

  • A call to erlang:cancel_timer(_, [{info, false}]) could cause the calling process to block forever in the call. Note that only the synchronous version of the call (that is, the async option is false) in combination with the info option set to false was effected by this bug.

    Own Id: OTP-17472 Aux Id: PR-4932

  • Microstate accounting (msacc) and os:perf_counter() unintentionally used system time instead of monotonic time for time measurements on a lot of systems. These systems were all non x86/x86_64 systems or x86/x86_64 systems without a reliable and constant rdtsc instruction.

    The lock counting (lcnt) built runtime system also unintentionally used system time instead of monotonic time for time measurements on all systems.

    Own Id: OTP-17493

  • Simultaneous calls to erlang:system_flag(schedulers_online, _) could cause callers to end up in a suspended state forever.

    Own Id: OTP-17500 Aux Id: GH-4809

  • Fix rare race bug in memory management of distribution entries. Have been seen to cause VM crash when massive number of repeated concurrent failing connection attempts.

    Own Id: OTP-17513 Aux Id: GH-4964, PR-5015

  • Fix buffer overrun problem in the tty driver. The problem happens on some platforms when using the CTRL+R functionality of newshell with very long strings in the history.

    Own Id: OTP-17560 Aux Id: GH-5116

  • Fix race-condition that could cause a crash when tracing scheduling or garbage collections on a process that was running on a dirty scheduler.

    Own Id: OTP-17568 Aux Id: PR-4940

  • Fix rare bug where re:run would crash/return invalid results when given a subbinary as subject.

    This bug has existed since Erlang/OTP 20.0.

    Own Id: OTP-17585 Aux Id: GH-5150

  • binary_to_term/1,2 is now more resilient against corrupted binaries containing maps in the external format.

    Own Id: OTP-17594

  • A call to port_command() could cause a scheduler to end up in an eternal loop if the port was busy and the calling process had incoming signals at the time of the call. This bug was introduced in OTP 23.3.2 (ERTS version 11.2.1), OTP 22.3.4.18 (ERTS version 10.7.2.10), and OTP 21.3.8.23 (ERTS version 10.3.5.18).

    Own Id: OTP-17448 Aux Id: GH-4898, PR-4903, OTP-17291

  • Fix bug in match spec compilator seen to cause a stack overflow crash on debug VM for certain match specs. Could potentially cause problems for standard VM, but has not been verified. Match specs are used by ets:match/select functions and erlang:trace_pattern.

    Own Id: OTP-17379 Aux Id: PR-4804

  • Commit of generated configure script.

    Own Id: OTP-17420 Aux Id: OTP-17398, GH-4821

  • The following signals could pass before other signals from the same sender to the same receiver. That is, these signals could arrive too early.

    • garbage-collect request. Sent from one process to another using one of the garbage_collect() BIFs.
    • check-process-code request. Sent from one process to another using one of the check_process_code() BIFs.
    • is-process-alive reply. Sent as a response to a process calling the is_process_alive() BIF.
    • process-info reply. Sent as a response to a process calling one of the process_info() BIFs.
    • port-command reply. Sent as a response to a process calling one of the port_command() BIFs.
    • port-connect reply. Sent as a response to a process calling the port_connect() BIF.
    • port-close reply. Sent as a response to a process calling the port_close() BIF.
    • port-control reply. Sent as a response to a process calling the port_control() BIF.
    • port-call reply. Sent as a response to a process calling the port_call() BIF.
    • port-info reply. Sent as a response to a process calling one of the port_info() BIFs.

    Own Id: OTP-17291

  • A garbage collection of a literal area missed messages that entirely consisted of a term in a literal area. This could in turn lead to a crash of the runtime system.

    Own Id: OTP-17307

  • A call to process_flag(message_queue_data, off_heap) could cause a crash of the runtime system when sequential tracing was enabled.

    Own Id: OTP-17349

  • Fixed a bug in the timer implementation which could cause timers that were set to more than 37.25 hours in the future to be delayed. This could occur if there were multiple timers scheduled to be triggered very close in time, but still at different times, and the scheduler thread handling the timers was not able to handle them quickly enough. Delayed timers were in this case triggered when another unrelated timer was triggered.

    Own Id: OTP-17253

  • Fix bug in call_time tracing (used by eprof) that could cause VM crash. Bug exists since OTP-22.2 (but not in OTP-23).

    Own Id: OTP-17290 Aux Id: GH-4635

  • Fix a file descriptor leak when using sendfile and the remote side closes the connection. This bug has been present since OTP-21.0.

    Own Id: OTP-17244

  • Fixed a bug that could cause some work scheduled for execution on scheduler threads to be delayed until other similar work appeared. Beside delaying various cleanup of internal data structures also the following could be delayed:

    • Termination of a distribution controller process
    • Disabling of the distribution on a node
    • Gathering of memory allocator information using the instrument module
    • Enabling, disabling, and gathering of msacc information
    • Delivery of 'CHANGE' messages when time offset is monitored
    • A call to erlang:cancel_timer()
    • A call to erlang:read_timer()
    • A call to erlang:statistics(io | garbage_collection | scheduler_wall_time)
    • A call to ets:all()
    • A call to erlang:memory()
    • A call to erlang:system_info({allocator | allocator_sizes, _})
    • A call to erlang:trace_delivered()

    The bug existed on runtime systems running on all types of hardware except for x86/x86_64.

    Own Id: OTP-17185

  • The suspend_process() and resume_process() BIFs did not check their arguments properly which could cause an emulator crash.

    Own Id: OTP-17080

  • The runtime system would get into an infinite loop if the runtime system was started with more than 1023 file descriptors already open.

    Own Id: OTP-17088 Aux Id: ERIERL-580

  • Fixed rare distribution bug in race between received signal (link/monitor/spawn_request/spawn_reply) and disconnection. Symptom: VM crash. Since: OTP 21.0.

    Own Id: OTP-16869 Aux Id: ERL-1337

  • Fixed bugs causing issues when enabling the ERTS internal allocators on a system built with the undocumented and unsupported SMALL_MEMORY feature.

    Own Id: OTP-16939

  • inet:setopts([{active,once}]) wakes up IO polling thread unnecessarily, leading to lock contention and visibly higher CPU utilization.

    Own Id: OTP-16847 Aux Id: ERL-1301

  • The documentation of statistics(run_queue) erroneously stated that it returns the total length of all normal run queues when it is the total length of all normal and dirty CPU run queues that is returned. The documentation has been updated to reflect the actual behavior.

    Own Id: OTP-16866 Aux Id: ERL-1355

  • Two bugs in the ERTS internal thread wakeup functionality have been fixed. These bugs mainly hit when all threads in the system tried to go to sleep. When the bugs were triggered, certain operations were delayed until a thread woke up due to some other reason. Most important operations effected were code loading, persistent term updates, and memory deallocation.

    Own Id: OTP-16870

  • Fixed bug in ets:select_replace/2 on compressed tables that could produce faulty results or VM crash. Bug exists since OTP 20.

    Own Id: OTP-16874 Aux Id: ERL-1356, PR-2763

  • As of OTP 22, the allocator specific memory carrier pools were replaced by a node global carrier pool. This unfortunately caused substantial memory fragmentation in some cases due to long lived data being spread into carriers used by allocators mainly handling short lived data.

    A new command line argument +M<S>cp has been introduced with which one can enable the old behavior as well as configuring other behaviors for the carrier pools. In order to configure the old behavior, with allocator specific carrier pools for all allocators, pass +Mucp : (including the colon character) as a command line argument to erl when starting the Erlang system.

    The default configuration for carrier pools will be changed to +Mucp : some time in the future, but not in this patch.

    Own Id: OTP-16856

  • The ERTS internal I/O poll implementation could get into an inconsistent state causing input events to be ignored.

    Own Id: OTP-16780 Aux Id: PR-2701

  • An unintentional reuse of an already used emulator internal event object could cause a wakeup signal to a thread to be lost. In worst case this could cause the runtime system to hang. This hang was however quite rare.

    Own Id: OTP-16766 Aux Id: ERL-1304

  • NIF threads and driver threads on non-Linux systems leaked internal resources when terminating. On Windows these resources were one event per thread. On most other systems one mutex and one condition variable per thread. On these other systems that also lacked pthread_cond_timedwait() also a pipe with its file descriptors was leaked.

    Own Id: OTP-16772 Aux Id: ERL-1304

  • Fixed bug in erl_crash.dump generation that could cause a SEGV core dump if a recently cancelled timer was found.

    Own Id: OTP-16596 Aux Id: ERL-1105, PR-2606

  • 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.

    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.

    Own Id: OTP-16639 Aux Id: ERL-1236

  • SCTP and UDP recv/2,3 hangs indefinitely if socket is closed while recv is called (socket in passive mode).

    Own Id: OTP-16654 Aux Id: ERL-1242

  • 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.

    Own Id: OTP-16640 Aux Id: OTP-16193

  • 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.

    Own Id: OTP-16641

  • System tasks of low priority were not interleaved with normal 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 low priority process.

    Own Id: OTP-16642

  • re:run(Subject, RE, [unicode]) returned nomatch instead of failing with a badarg error exception when Subject contained illegal utf8 and RE was passed as a binary. This has been corrected along with corrections of reduction counting in re:run() error cases.

    Own Id: OTP-16553

  • Fixed a bug that could cause the emulator to crash when purging modules or persistent terms.

    Own Id: OTP-16555 Aux Id: ERL-1188

  • Fixed a bug in a receive optimization. This could cause a receive not to match even though a matching message was present in the message queue. This bug was introduced in ERTS version 10.6 (OTP 22.2).

    Own Id: OTP-16572 Aux Id: ERL-1199, OTP-16269

  • gen_udp:recv(S, N, 0) corrupted the internal state for the socket so after receive with {active, once} it always returned {error, timeout}, and wasted the received UDP packets. This bug has now been fixed.

    Reported and pinpointed by Alexander Petrovsky.

    Own Id: OTP-16059

  • The atom esock_atom_user and esock_atom_kernel was never actually created. This has now been corrected.

    Own Id: OTP-16381

  • Fixed bug in socket module that could potentially lead to scheduler deadlocks.

    Own Id: OTP-16384

  • Fix bug causing VM crash if down or stop callback of a NIF resource is called after the NIF module has been purged. The fix will postpone unloading until all such resource objects have been garbage collected.

    Own Id: OTP-16399

  • Fixed bug in ets:update_counter/4, when called with an invalid UpdateOp and a Key that does not exist, causing ets:info(T,size) to return incorrect values. Bug exists since OTP-19.0.2.

    Own Id: OTP-16404 Aux Id: ERL-1127

  • Fix potential heap corrupting bugs when a process calls a BIF that blocks other normal schedulers and then writes to its own heap without the main process lock. A NIF running on a dirty scheduler trying to interact with such a process could corrupt its heap. The fixed BIFs were related to code loading and tracing.

    Own Id: OTP-16417

  • Fixed bug in erlang:list_to_ref/1 when called with a reference created by a remote note. Function list_to_ref/1 is intended for debugging and not to be used in application programs. Bug exist since OTP 20.0.

    Own Id: OTP-16438

  • The prim_net nif (net/kernel) made use of an undefined atom, notsup. This has now been corrected.

    Own Id: OTP-16440

  • Corrected the valid range of the erl command line argument +SDio <NumberOfDirtyIoSchedulers> from 0..1024 to 1..1024. +SDio 0 was erroneously allowed which just caused the VM to crash on the first dirty I/O job scheduled.

    Own Id: OTP-16481

  • Fix a crash when attempting to log faults when loading files during early boot.

    Own Id: OTP-16491

  • For socket, not all send and receive flags are supported on all platforms. In order to (at least) simplify testing, the socket:supports/0,1,2,3 functions has been extended with send_flags and recv_flags items, which indicates what the current platform can manage.

    Own Id: OTP-16153

  • Add a "full featured" version of getifaddrs in the net module.

    Own Id: OTP-16212 Aux Id: ERL-1070

  • The options busy_limits_port and busy_limits_msgq have been added to the BIF erlang:open_port/2. The busy_limits_port option can be used for controlling the busy state of a port executing the spawn_driver or the fd_driver. The busy_limits_msgq option can be used for controlling the busy state of the port message queue.

    Own Id: OTP-16306 Aux Id: ERIERL-439

  • A socket "registry" has been added making it possible to list current open sockets.

    Own Id: OTP-16309

  • The counters managed by the socket nif has been extended. Their "size" has been increased from 32 bit to 64. Two max package size (for read and write) has been added. And four accept counters has been added.

    Own Id: OTP-16387

  • Add gcc option -fno-common to detect accidental name clashes of global variables.

    Own Id: OTP-16420 Aux Id: PR-2513

  • New dynamic lock checker that verifies locking orders and detects potential deadlock bugs in drivers and NIFs. Enabled together with the old static lock checker (for ERTS internal locks) in emulator started with -emu_type debug or built with configuration option --enable-lock-checking.

    Own Id: OTP-16427

  • A process could get into an inconsistent state where it was runnable, but never scheduled for execution. This could occur when a mix of normal and low priority processes where scheduled on the same type of dirty scheduler simultaneously.

    Own Id: OTP-16446 Aux Id: ERL-1157

  • A process could end up in a state where it got endlessly rescheduled without making any progress. This occurred when a system task, such as check of process code (part of a code purge), was scheduled on a high priority process trying to execute on a dirty scheduler.

    Own Id: OTP-16436 Aux Id: ERL-1152

  • Improved signal handling for processes executing dirty. For example, avoid busy wait in dirty signal handler process when process is doing garbage collection on dirty scheduler.

    Own Id: OTP-16358

  • Taking a scheduler offline could cause timers set while executing on that scheduler to be delayed until the scheduler was put online again. This bug was introduced in ERTS version 10.0 (OTP 21.0).

    Own Id: OTP-16371

  • The ets:update_counter/4 core dumped when given an ordered_set with write_concurrency enabled and an invalid position. This bug has been fixed.

    Own Id: OTP-16378 Aux Id: ERL-1125

  • A process calling erlang:system_flag(multi_scheduling, block) could end up blocked waiting for the operation to complete indefinitely.

    Own Id: OTP-16379

  • Duplicate entries for [socket:]getopt and [socket:]setopt in man page.

    Own Id: OTP-16333 Aux Id: ERL-1104

  • Corrected an issue with the new socket api which could cause a core dump. A race during socket close could cause a core dump (an invalid nif environment free).

    Own Id: OTP-16314 Aux Id: ERL-1098

  • Corrected an issue with the new socket api which could cause a core dump. When multiple accept processes waiting for a connect a connect could cause a core dump.

    Own Id: OTP-16359

  • The functions unicode:characters_to_list() and unicode:characters_to_binary() raised a badarg exception instead of returning an error tuple when passed very large invalid code points as input.

    Own Id: OTP-16052

  • file:allocate/3 will now work properly on Mac OS.

    Own Id: OTP-16074 Aux Id: ERL-1042, PR-2386

  • For socket, invalid encoding of send and receive flags caused badarg and send failure.

    Own Id: OTP-16149

  • Fix a bug in re on platforms where the native stack grows upwards, for instance on HP PA-RISC.

    Own Id: OTP-16150 Aux Id: ERL-1043

  • For socket, unable to properly decode the timestamp control message header on FreeBSD. We incorrectly used the SO_TIMESTAMP flag for the timestamp control message header type. It should have been SCM_TIMESTAMP. This caused the timestamp control message header to not be fully decoded.

    Own Id: OTP-16151 Aux Id: #2400

  • For socket, when setting the ip option 'recvtos' to true, thereby indicating that we want to receive the TOS control message header, we don't actually get TOS but RECVTOS on FreeBSD (and maybe others)! This was previously not handled.

    Own Id: OTP-16152 Aux Id: OTP-16114

  • Fixed a bug where the emulator would print out error messages forever if it crashed during startup.

    Own Id: OTP-16159 Aux Id: ERL-1060

  • For socket, wrong type for protocol caused segmentation fault if protocol was provided as {raw, integer()}.

    Own Id: OTP-16163 Aux Id: ERL-1061

  • For socket, when setting the ip option 'recvttl' to true, thereby indicating that we want to receive the TTL control message header, we don't actually get TTL but RECVTTL on Solaris (and maybe others)! This was previously not handled.

    Own Id: OTP-16172 Aux Id: OTP-16114

  • For socket, IPv6 control message headers was incorrectly decoded with level ip instead of ipv6.

    Own Id: OTP-16173

  • Fix configure bug where clock_getres would not correctly be detected causing erlang:system_info(os_system_time_source) to return an incorrect resolution.

    This bug effects all OSs that use clock_gettime to get time (basically all OSs except windows) and has been present since OTP-19.2.

    Own Id: OTP-16191 Aux Id: ERL-1067

  • Fix bugs when using ERLC_USE_SERVER=true on Windows when building Erlang/OTP.

    Change the cookie used by the compile server to be hard coded instead of using the users cookie.

    Own Id: OTP-16192

  • Fix so that persistent_term is listed in the erts application file.

    Own Id: OTP-16194

  • Fix bug in call_time tracing which could sometimes cause call time measurements being attributed to the wrong function.

    Own Id: OTP-16195 Aux Id: ERL-1027

  • The socket socket option 'peek_off' has been disabled. If peek_off was set and then socket:recv/3 was called with the peek flag, the call could hang.

    Own Id: OTP-16196

  • Handle possibly uninitiated (control message header) data.

    Own Id: OTP-16197

  • For net, a couple of NI macros was deprecated in new versions of glibc, so these are no longer used (IDN_ALLOW_UNASSIGNED and IDN_USE_STD3_ASCII_RULES).

    Own Id: OTP-16203

  • The string value from a get operation needed to be truncated.

    Own Id: OTP-16204

  • Fix misleading seq_trace message for remote send operation toward named process. Changed receiver to be {Name,Node} instead of just Name.

    Own Id: OTP-16206 Aux Id: PR-2423

  • Fixed a bug causing actual nodedown reason reported by net_kernel:monitor_nodes(true, [nodedown_reason]) to be lost and replaced by the reason killed.

    Own Id: OTP-16216

  • For socket, the timestamp creation used when printing warning messages and debug printouts did not work. The used buffer was too small.

    Own Id: OTP-16223

  • Fix compiler warnings generated by GCC 8

    Own Id: OTP-16235

  • Fix erl -emu_type to accept the option opt which means the normal optimized emulator. This can be used to override the -emu_type option from environment variables.

    Own Id: OTP-16297

  • Corrected the function spec to reflect the actual code of the function socket:bind.

    Own Id: OTP-16310 Aux Id: ERL-1082

  • Fixed a performance issue in ETS lookup when using the compressed option and the term contained atoms. Before this fix the decompress algorithm for atoms would unnecessarily take a global lock to validate the atom.

    Own Id: OTP-16316

  • For socket, not all send and receive flags are supported on all platforms. In order to (at least) simplify testing, the socket:supports/0,1,2,3 functions has been extended with send_flags and recv_flags items, which indicates what the current platform can manage.

    Own Id: OTP-16153

  • For socket, add support for IPv6 socket options tclass and recvtclass. Both has been added, but the use of them are platform dependent. Call socket:supports(options, ipv6, Opt) to be sure what option to use in order to request a TCLASS control message header.

    Own Id: OTP-16180

  • For socket, the TCP socket option cork was not supported even though the supports function reported it as such.

    Own Id: OTP-16205

  • The Kernel application's User's Guide now contain a Logger Cookbook with with common usage patterns.

    Own Id: OTP-16208

  • Add a "full featured" version of getifaddrs in the net module.

    Own Id: OTP-16212 Aux Id: ERL-1070

  • Fix an inefficiency introduced by the bug fix in OTP-16241 which fixed a problem with the receive optimization. That bug fix introduced an inefficiency when using the receive optimization and a burst of messages arrive at once when the receiving process' mailbox was empty.

    Own Id: OTP-16269 Aux Id: OTP-16241

  • For socket, added support for the socket option extended_err. Andreas Schultz.

    Own Id: OTP-16302 Aux Id: #2449

  • ETS tables have been optimized to not use any locks when running in a system with only one scheduler enabled. This can provide significant performance gains for applications that use ETS tables heavily.

    Own Id: OTP-16315

  • Large amounts of quickly executed dirty work could cause heavy contention on an internal spin lock. The spin lock was replaced by a mutex which behaves much better under these conditions.

    Own Id: OTP-16301 Aux Id: ERL-1079

  • 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.

    Own Id: OTP-16193

  • Fix bug causing VM crash due to memory corruption of distribution entry. Probability of crash increases if Erlang distribution is frequently disconnected and reestablished towards same node names. Bug exists since OTP-21.0.

    Own Id: OTP-16224 Aux Id: ERL-1044

  • Fixed bug causing crash of VM built with configuration --enable--sharing-preserving. Provoked when a sent message contains both a bit string and the heap binary (< 65 bytes) which the bit string was matched from. Bug exists since OTP-19.0 but has seen to be easier to provoke since OTP-22.1.

    Own Id: OTP-16265 Aux Id: ERL-1064

  • The compiler could do an unsafe optimization of receives, which would cause a receive to only scan part of the message queue.

    This bug fix in the compiler fixes a bug in the socket module.

    Own Id: OTP-16219 Aux Id: ERL-1076

  • Fix bug where the receive marker used by the runtime to do the receive queue optimization could be incorrectly set. The symptom of this would be that a message that should match in a receive never matches.

    The bug requires the OTP-22 compiler and multiple selective receives to trigger. See OTP-16219 for details about the bug fix in the compiler.

    Own Id: OTP-16241 Aux Id: ERL-1076 OTP-16219

  • Erlang/OTP can now be built on macOS Catalina (10.15).

    Own Id: OTP-16177 Aux Id: ERL-1063

  • Added the environment variable ERLC_SERVER_ID, which allows multiple compile servers to run separately under the same user.

    Own Id: OTP-16125 Aux Id: ERIERL-412

  • A terminating process sending distributed 'EXIT' or 'DOWN' signals while terminating could end up in a state where no progress at all was made. This was triggered by a distribution channel that the terminating process was sending on got busy. This bug has existed since ERTS version 10.4 (OTP 22.0).

    Own Id: OTP-16069

  • When communicating with a simultaneously exiting port via the erlang:port_*() BIFs one could sometimes get stray {Ref, What} messages. Where Ref was a reference and What usually were the atom badarg.

    Own Id: OTP-16107 Aux Id: ERL-1049

  • If you set {linger,{true,0}} on a gen_tcp listen socket, accept a connection on that socket, and then close the accepted socket, now the linger zero setting is transferred to the accepted socket. Before this correction that information was lost and the close behaviour on the accepted socket incorrect.

    Own Id: OTP-15370 Aux Id: ERIERL-353

  • Sending ancillary data implemented in OTP-15747 accidentally left behind test code that caused all UDP sends to fail on Windows. This has now been fixed.

    Own Id: OTP-15422 Aux Id: OTP-15747

  • In the socket nif, used invalid flags when if-def'ing for supported TCP flags: TCP_MAXSEG and TCP_NODELAY (the support function).

    Own Id: OTP-15827

  • Fixed memory leaks in experimental socket module.

    Own Id: OTP-15830

  • re:run() now yields when validating utf8 in a large subject.

    Own Id: OTP-15836 Aux Id: ERL-876

  • Fixed bug in seq_trace:set_token(label,Term) which could cause VM crash if Term was heap allocated (not an atom, small integer, local pid or port). Bug exists since OTP 21.0 when terms other than small integers were first allowed as labels.

    Own Id: OTP-15849 Aux Id: ERL-700

  • Extra -mode flags given to erl are ignored with a warning.

    Own Id: OTP-15852

  • Don't loop indefinitely when --enable-pgo is given to configure, but compiler does not support pgo.

    Own Id: OTP-15853 Aux Id: PR-2254

  • Fix seq_trace:print/2 not to raise badarg exception if label is not a small integer. Bug exists since OTP 21.0.

    Own Id: OTP-15859 Aux Id: ERL-700

  • Fixed hipe_flush_icache_range for non-Linux OS on ARM.

    Own Id: OTP-15874 Aux Id: ERL-958, PR-2266

  • The fix in OTP-15871 was too conservative and disabled the offending load-time optimization in some cases where it was safe.

    Own Id: OTP-15881

  • Upgraded the ERTS internal PCRE library from version 8.42 to version 8.43. See http://pcre.org/original/changelog.txt for information about changes made to PCRE. This library implements major parts of the re regular expressions module.

    Own Id: OTP-15889

  • Fix race condition when closing a socket while using {active,N} on Windows.

    Own Id: OTP-15901 Aux Id: ERL-960 PR-2272

  • Allow more than one -config command line option to erl on Windows to conform with other OS.

    Own Id: OTP-15918 Aux Id: ERL-912

  • Fix so that ERL_FLAGS environment variable does not interfere with command line arguments. Before this fix you could write:

    ERL_FLAGS="10" erl +S

    and erlang would start as if +S had been given the argument 10.

    Own Id: OTP-15931

  • The bug with ID ERL-717 has been fixed. The functions io:columns() and io:rows() only worked correctly inside interactive erlang shells before this fix. These functions returned {error,enotsup} before this fix even if stdout and stdin were connected to a terminal when they were invoked from an escript or a program started with e.g., erl -noshell.

    Own Id: OTP-15959 Aux Id: ERL-717

  • Do not use named label in ethread.c inline assemble. This allows erts to be compiled using gcc 9.1.0 with LTO enabled.

    Own Id: OTP-15971 Aux Id: PR-2333

  • erlang:fun_to_list/1 will now escape the module and function name when necessary.

    Own Id: OTP-15975 Aux Id: ERL-1009

  • process_info(P,binary) would neglect to look through heap fragments, potentially missing a few binaries associated with the process.

    Own Id: OTP-15978 Aux Id: ERIERL-366

  • HiPE is now automatically disabled on systems with non-glibc implementation (for instance musl). This is because musl does not provide the API's for guaranteeing that signals are delivered on the correct native stack.

    Own Id: OTP-16037

  • Fixed bug triggered if a process is killed during call to persistent_term:put or persistent_term:erase.

    Own Id: OTP-16041

  • Add units to all memory slogans in the crash dump documentation.

    Own Id: OTP-16042

  • Fix a bug in binary_to_term that would crash the emulator if a term larger than 16GB was to be decoded.

    Own Id: OTP-16058 Aux Id: PR-2382

  • Fixed bug related to an exiting process sending EXIT and DOWN signals to remote linked/monitored processes. Bugs exists since OTP 22.0.

    Own Id: OTP-16060

  • erlc can now automatically use a compile server to avoid starting an Erlang system for each file to be compiled in a multi-file project. See the documentation for how to enable it.

    Own Id: OTP-15738 Aux Id: PR-2361

  • The possibility to send ancillary data, in particular the TOS field, has been added to gen_udp:send/4,5.

    Own Id: OTP-15747 Aux Id: ERIERL-294

  • The net module has been split into 'net' (kernel) and prim_net (preloaded).

    Own Id: OTP-15765

  • Socket counters now works as expected and can also be extracted with the (new) info function.

    Own Id: OTP-15818

  • re:run() now avoids validating utf8 in the subject more than once in the same call. This validation could previously be performed multiple times when the global option was passed.

    Own Id: OTP-15831 Aux Id: ERL-876

  • The un-documented function erlang:dist_get_stat/1 now returns the real value of what the distribution queue contains instead of a boolean.

    Own Id: OTP-15905 Aux Id: PR-2270

  • ETS ordered_set tables with write_concurrency enabled has got a performance issue fixed. There were no limits for the values of internal statistics counters before this fix. This could result in that the data structure sometimes reacted slowly to a change in how many parallel processes were using it.

    Own Id: OTP-15906

  • Optimize the reception of large distribution messages.

    Own Id: OTP-15926 Aux Id: PR-2291

  • Binary matching and functions like split_binary/2 will now create heap binaries when the results are small enough, reducing the chances of small sub-binaries keeping large binaries alive.

    Own Id: OTP-15977 Aux Id: ERIERL-366

  • Fixed rare emulator crash in instrument:allocations/0-1.

    Own Id: OTP-15983

  • Ports could pass very small binaries as reference counted off heap binaries to processes. This could cause an unnecessary large memory usage and an unnecessary load on the binary allocator. Small binaries are now always passed as heap binaries to processes.

    Own Id: OTP-16001 Aux Id: ERIERL-366

  • unicode:characters_to_binary() could return very small binaries as reference counted off heap binaries. This could cause an unnecessary large memory usage and an unnecessary load on the binary allocator. Small binaries are now always returned as heap binaries.

    Own Id: OTP-16002 Aux Id: ERIERL-366

  • Improved erl_nif documentation regarding on_load and Erlang stub/fallback functions.

    Own Id: OTP-16028 Aux Id: PR-2362

  • New feature ets:info(_, binary) to get information about all reference counted binaries kept by a table. This is the same kind of debug information that process_info(_, binary) returns for a process.

    Own Id: OTP-16035 Aux Id: ERIERL-366

  • An invalid value test caused the socket:setopt(Socket, ip, add_membership, ip_mreq()) to fail with badarg. The same for drop_membership.

    Own Id: OTP-15908 Aux Id: ERL-980

  • Fixed bug causing VM crash when doing textual dump of a process containing an unhandled monitor down signal. Textual process dumps can be done with erlang:system_info(procs), trace feature process_dump, Erlang shell break menu and a crashdump. Bug exist since OTP 21.0.

    Own Id: OTP-15909 Aux Id: ERL-979

  • lists:subtract/2 would produce incorrect results for some inputs on 64-bit platforms.

    Own Id: OTP-15938 Aux Id: ERL-986

  • Fixed a bug in the loader that was similar to OTP-15938, yielding incorrect code for some inputs on 64-bit platforms.

    Own Id: OTP-15939

  • Fixed bug causing scheduler threads in rare cases to block spinnning indefinitely. Bug exists since OTP 21.0.

    Own Id: OTP-15941 Aux Id: PR-2313

  • Fixed a buffer overflow when binary_to_existing_atom/2 and list_to_existing_atom/2 was used with the latin1 encoding.

    Own Id: OTP-15819 Aux Id: ERL-944

  • The runtime system disconnected a connection if it received an exit/2 signal where the recipient was a process on an old incarnation of the current node. That is, the receiving node had the same node name, but another "creation" number. The signal will now just be dropped since the receiving process no longer exists.

    Own Id: OTP-15867 Aux Id: ERIERL-373

  • Fixed process_info(Pid,reductions) to not categorically increase reduction count of the measured process Pid. Repeated reduction measure of an idle process will most often (but not guaranteed) return the same value, like it behaved before OTP 21.3.8.

    Own Id: OTP-15865 Aux Id: ERL-964

  • Fixed an incorrect load-time optimization that could cause a crash when extracting deeply nested tuple elements.

    Own Id: OTP-15871 Aux Id: ERIERL-374

  • Fix bug causing VM crash when pressing P for "proc info" in Erlang shell break menu. Bug exists since OTP 22.0.

    Own Id: OTP-15873 Aux Id: ERL-965

  • In nested use of try/catch, rethrowing an exception using erlang:raise/3 with a different class would not always be able to change the class of the exception.

    Own Id: OTP-15834 Aux Id: ERIERL-367

  • Do not allocate new bitstring/binary when an empty binary is appended.

    Own Id: OTP-15535 Aux Id: PR-2055

  • Document that process_info(_, current_function) can return {current_function, undefined} in case of execution of native code.

    Own Id: OTP-15543 Aux Id: PR-2089

  • Fixed bug in ets:select, ets:match and friends which could cause the table to remain fixated (as if ets:safe_fixtable had been called) after the call returned. This could happen for protected tables if another concurrent running process transferred table ownership to the process during its ets:select/match call. Ownership can be transferred using either ets:give_away or the heir table option.

    Own Id: OTP-15672

  • Fixed a Windows-specific bug in file:list_dir/1 that caused it to misbehave on network shares.

    Own Id: OTP-15693

  • Fixed bug when calling enif_whereis_* from NIF resource destructor. Symptoms could be emulator crash or hanging scheduler threads.

    Own Id: OTP-15694 Aux Id: ERL-863

  • Fixed a bug in the error case of apply/3, where the exception would erroneously have an empty argument list in some cases.

    Own Id: OTP-15698

  • A bug has been fixed in the maps implementation that could cause a crash or memory usage to grow until the machine ran out of memory. This could happen when inserting a new key-value pair with a key K1 containing a binary B1 into a map M having a key K2 with a binary B2 if the following conditions were met:

    • B1 =/= B2
    • size(B1) >= 4294967296
    • size(B2) >= 4294967296
    • size(M) >= 32
    • (size(B1) rem 4294967296) == (size(B2) rem 4294967296)
    • the first (size(B1) rem 4294967296) bytes are the same both in B1 and B2
    • substituting B1 in K1 with B2 would create a term with the same value as K2

    The root cause of the problem is that the maps implementation only hashed the first (X rem 4294967296) bytes of binaries so that different binaries could get the same hash value independently of the hash seed.

    Own Id: OTP-15707

  • term_to_binary() and distributed sends will now throw a system_limit exception instead of producing erroneous results when trying to encode a binary larger than 4 GB.

    Own Id: OTP-15708

  • The vxworks configure has been updated to respect the environment CFLAGS.

    Own Id: OTP-15773

  • Fix configure to not enable PGO (profile guided optimizations) when linking of the PGO binary fails. For instance this happens when there is no gcov lib installed.

    Own Id: OTP-15788

  • Fix bug on OpenBSD where sockets using active, true or active, N could cause the system to live lock. The bug was introduced in erts-10.2 (OTP-21.2).

    Own Id: OTP-15791

  • Add support for Erlang Distribution protocol to split the payload of large signals into several fragments. This allows other processes to communicate uninterrupted during the transmission of these signals.

    Own Id: OTP-13397

  • A simple socket API is provided through the socket module. This is a low level API that does *not* replace gen_[tcp|udp|sctp]. It is intended to *eventually* replace the inet driver, but not the high level gen-modules (gen_tcp, gen_udp and gen_sctp). It also provides a basic API that facilitates the implementation of other protocols, that is TCP, UDP and SCTP.

    Known issues are; No support for the Windows OS (currently).

    Own Id: OTP-14831

  • Added NIF functions enif_set_pid_undefined, enif_is_pid_undefined and enif_compare_pids.

    Own Id: OTP-15011 Aux Id: PR-2147

  • Underutilized memory segments (carriers) can now move between all allocator instances, rather than just between instances of the same type, which greatly reduces memory usage in some scenarios.

    Own Id: OTP-15063

  • The emulator will now mark free blocks in pooled carriers with madvise(2) + MADV_FREE (or similar), letting the OS reclaim the associated physical memory if necessary.

    Own Id: OTP-15075

  • New ERL_NIF_SELECT_CANCEL feature added to enif_select in order to cancel (or "deselect") a read or write event on a previously selected file descriptor.

    Own Id: OTP-15095

  • ETS option write_concurrency now also affects and improves the scalability of ordered_set tables. The implementation is based on a data structure called contention adapting search tree, where the lock granularity adapts to the actual amount of concurrency exploited by the applications in runtime.

    Own Id: OTP-15128

  • Build configuration of the crypto application has been moved from the erts application into the crypto application.

    Own Id: OTP-15129

  • Anonymous functions that don't capture environment are now created at load-time instead of in run-time.

    Own Id: OTP-15195 Aux Id: PR-1812

  • Optimize updates of maps with identical keys and values. E.g. in the example below the original Map will be reused as the return of the update.

    1> Map = #{ a => b }. #{ a => b } 2> Map#{ a := b }.

    Own Id: OTP-15211 Aux Id: PR-1889

  • Optimize binary:match/2 and binary:matches/2 to use memchr internally.

    Own Id: OTP-15238 Aux Id: PR-1803

  • The runtime system used to terminate when a message larger than 2 Gb was passed over the distribution. The send operation will now instead throw a system_limit exception.

    Own Id: OTP-15261

  • Change the first module called by erts to be named erl_init instead of otp_ring0. systools in sasl have been updated to reflect this change.

    Own Id: OTP-15336 Aux Id: PR-1825

  • Minor adjustments made to build system for parallel configure.

    Own Id: OTP-15340 Aux Id: OTP-14625

  • Two new NIF interface functions enif_select_read and enif_select_write. They are similar to existing enif_select but allow a custom event message as an argument.

    Own Id: OTP-15349 Aux Id: PR-2084

  • The embedded copy of zlib has been updated from 1.2.8 to 1.2.11.

    Note that this copy is only used as a fallback when the target platform doesn't provide any zlib development libraries. If your system provides zlib then it will be used even if it is older than 1.2.11.

    Own Id: OTP-15351 Aux Id: ERL-749

  • New NIF function enif_make_monitor_term.

    Own Id: OTP-15362 Aux Id: PR-2127

  • Appending lists (The ++ operator) will now yield properly on large inputs.

    Own Id: OTP-15427

  • The length/1 BIF used to calculate the length of the list in one go without yielding, even if the list was very long. In OTP 22, length/1 will yield when called with long lists.

    Own Id: OTP-15439

  • Processes sending messages are now punished with a reduction cost based on message size. That is, a process sending a large message will yield earlier than before.

    Own Id: OTP-15513 Aux Id: ERL-773

  • The transitory emulator option +ztma true (introduced in OTP 21.3) has been removed.

    Own Id: OTP-15581 Aux Id: OTP-15580

  • In OTP 22, HiPE (the native code compiler) is not fully functional. The reasons for this are:

    There are new BEAM instructions for binary matching that the HiPE native code compiler does not support.

    The new optimizations in the Erlang compiler create new combination of instructions that HiPE currently does not handle correctly.

    If erlc is invoked with the +native option, and if any of the new binary matching instructions are used, the compiler will issue a warning and produce a BEAM file without native code.

    Own Id: OTP-15596

  • The termination behaviour of processes has changed to allow processes to yield while sending link exit/monitor down signals.

    The erl crash dump has been expanded to now also include processes that are termeinating but have not yet terminated.

    Own Id: OTP-15610

  • The dist messages EXIT, EXIT2 and MONITOR_DOWN have been updated with new versions that send the reason term as part of the payload of the message instead of as part of the control message.

    The old versions are still present and can be used when communicating with nodes that don't support the new versions.

    Own Id: OTP-15611

  • When sending messages, exit, exit2 and monitor down distributed signals, the process sending will now yield appropriately.

    This means that a terminating process will yield and possibly be suspended on busy distribution entries while they are terminating. This means that any memory held by such processes will not be released until after all exit/monitor down signals have been sent.

    Own Id: OTP-15612

  • All external pids/ports/refs created by erlang:list_to_pid/port/ref debug functions now compare equal to any other pid/port/ref with the same number from that node.

    Before this change they compared differently because the node creation of the pid/port/ref did not compare equal to any real pid/port/ref creation.

    This will mostly effect pids/ports/refs typed in the shell.

    Own Id: OTP-15613

  • The persistent_term functions put/2 and erase/1 are now yielding.

    Own Id: OTP-15615

  • A new erlang:dist_ctrl_set_opt(DHandle, get_size, Value) option has been added. This option makes it possible to configure the distribution channel identified by DHandle so that erlang:dist_ctrl_get_data(DHandle) also returns the size of the data to pass over the channel.

    Own Id: OTP-15617

  • Previously, all ETS tables used centralized counter variables to keep track of the number of items stored and the amount of memory consumed. These counters can cause scalability problems (especially on big NUMA systems). This change adds an implementation of a decentralized counter and modifies the implementation of ETS so that ETS tables of type ordered_set with write_concurrency enabled use the decentralized counter. Experiments indicate that this change substantially improves the scalability of ETS ordered_set tables with write_concurrency enabled in scenarios with frequent ets:insert/2 and ets:delete/2 calls.

    Own Id: OTP-15623 Aux Id: PR-2190

  • The iolist_size/1 function is now yielding which means that an Erlang/OTP system will be responsive even if the applications running on the system frequently call iolist_size/1 with large iolists.

    Own Id: OTP-15631

  • A simple test suite for the net module has been added.

    Own Id: OTP-15635

  • Added the NIF function enif_term_type, which helps avoid long sequences of enif_is_xyz by returning the type of the given term. This is especially helpful for NIFs that serialize terms, such as JSON encoders, where it can improve both performance and readability.

    Own Id: OTP-15640

  • The last call optimization is now applied to BIFs. When calling a BIF in the tail position of a function, the return address and stack frame will now be discarded before calling the BIF. As a consequence of this change, the immediate caller of a tail-called BIF will no longer be available in stack backtraces.

    Own Id: OTP-15674 Aux Id: PR-2177

  • Fix GC bug where distributed messages in a processes mailbox would cause extra GCs. This can be very expensive if there many messages in the mailbox.

    Own Id: OTP-15703

  • Internal documentation has now been added to the Erts and Compiler applications.

    The internal documents for Erts describe miscellaneous interesting implementation details. Those details can change at any time.

    The internal documentation for Compiler documents the API for the Core Erlang modules. While we will not change those APIs without good reason, we don't give the same guarantees about backward compatibility as for the rest of the APIs in OTP.

    Own Id: OTP-15715

  • The performance of non-bignum integer arithmetic has been improved.

    Own Id: OTP-15740

  • The -remsh option to erl now automatically adds the local systems hostname to the target node if no nodename is given. e.g.

    erl -name foo -remsh bar
    erl -sname foo -remsh bar

    Own Id: OTP-15794 Aux Id: PR-2219

  • Fix bug in match spec compilator seen to cause a stack overflow crash on debug VM for certain match specs. Could potentially cause problems for standard VM, but has not been verified. Match specs are used by ets:match/select functions and erlang:trace_pattern.

    Own Id: OTP-17379 Aux Id: PR-4804

  • A call to port_command() could cause a scheduler to end up in an eternal loop if the port was busy and the calling process had incoming signals at the time of the call. This bug was introduced in OTP 23.3.2 (ERTS version 11.2.1), OTP 22.3.4.18 (ERTS version 10.7.2.10), and OTP 21.3.8.23 (ERTS version 10.3.5.18).

    Own Id: OTP-17448 Aux Id: GH-4898, PR-4903, OTP-17291

  • The following signals could pass before other signals from the same sender to the same receiver. That is, these signals could arrive too early.

    • garbage-collect request. Sent from one process to another using one of the garbage_collect() BIFs.
    • check-process-code request. Sent from one process to another using one of the check_process_code() BIFs.
    • is-process-alive reply. Sent as a response to a process calling the is_process_alive() BIF.
    • process-info reply. Sent as a response to a process calling one of the process_info() BIFs.
    • port-command reply. Sent as a response to a process calling one of the port_command() BIFs.
    • port-connect reply. Sent as a response to a process calling the port_connect() BIF.
    • port-close reply. Sent as a response to a process calling the port_close() BIF.
    • port-control reply. Sent as a response to a process calling the port_control() BIF.
    • port-call reply. Sent as a response to a process calling the port_call() BIF.
    • port-info reply. Sent as a response to a process calling one of the port_info() BIFs.

    Own Id: OTP-17291

  • A garbage collection of a literal area missed messages that entirely consisted of a term in a literal area. This could in turn lead to a crash of the runtime system.

    Own Id: OTP-17307

  • A call to process_flag(message_queue_data, off_heap) could cause a crash of the runtime system when sequential tracing was enabled.

    Own Id: OTP-17349

  • Fixed a bug in the timer implementation which could cause timers that were set to more than 37.25 hours in the future to be delayed. This could occur if there were multiple timers scheduled to be triggered very close in time, but still at different times, and the scheduler thread handling the timers was not able to handle them quickly enough. Delayed timers were in this case triggered when another unrelated timer was triggered.

    Own Id: OTP-17253

  • Fix a file descriptor leak when using sendfile and the remote side closes the connection. This bug has been present since OTP-21.0.

    Own Id: OTP-17244

  • Fixed a bug that could cause some work scheduled for execution on scheduler threads to be delayed until other similar work appeared. Beside delaying various cleanup of internal data structures also the following could be delayed:

    • Termination of a distribution controller process
    • Disabling of the distribution on a node
    • Gathering of memory allocator information using the instrument module
    • Enabling, disabling, and gathering of msacc information
    • Delivery of 'CHANGE' messages when time offset is monitored
    • A call to erlang:cancel_timer()
    • A call to erlang:read_timer()
    • A call to erlang:statistics(io | garbage_collection | scheduler_wall_time)
    • A call to ets:all()
    • A call to erlang:memory()
    • A call to erlang:system_info({allocator | allocator_sizes, _})
    • A call to erlang:trace_delivered()

    The bug existed on runtime systems running on all types of hardware except for x86/x86_64.

    Own Id: OTP-17185

  • Fixed rare distribution bug in race between received signal (link/monitor/spawn_request/spawn_reply) and disconnection. Symptom: VM crash. Since: OTP 21.0.

    Own Id: OTP-16869 Aux Id: ERL-1337

  • The suspend_process() and resume_process() BIFs did not check their arguments properly which could cause an emulator crash.

    Own Id: OTP-17080

  • The runtime system would get into an infinite loop if the runtime system was started with more than 1023 file descriptors already open.

    Own Id: OTP-17088 Aux Id: ERIERL-580

  • The ERTS internal I/O poll implementation could get into an inconsistent state causing input events to be ignored.

    Own Id: OTP-16780 Aux Id: PR-2701

  • The documentation of statistics(run_queue) erroneously stated that it returns the total length of all normal run queues when it is the total length of all normal and dirty CPU run queues that is returned. The documentation has been updated to reflect the actual behavior.

    Own Id: OTP-16866 Aux Id: ERL-1355

  • Two bugs in the ERTS internal thread wakeup functionality have been fixed. These bugs mainly hit when all threads in the system tried to go to sleep. When the bugs were triggered, certain operations were delayed until a thread woke up due to some other reason. Most important operations effected were code loading, persistent term updates, and memory deallocation.

    Own Id: OTP-16870

  • Fixed bug in ets:select_replace/2 on compressed tables that could produce faulty results or VM crash. Bug exists since OTP 20.

    Own Id: OTP-16874 Aux Id: ERL-1356, PR-2763

  • An unintentional reuse of an already used emulator internal event object could cause a wakeup signal to a thread to be lost. In worst case this could cause the runtime system to hang. This hang was however quite rare.

    Own Id: OTP-16766 Aux Id: ERL-1304

  • NIF threads and driver threads on non-Linux systems leaked internal resources when terminating. On Windows these resources were one event per thread. On most other systems one mutex and one condition variable per thread. On these other systems that also lacked pthread_cond_timedwait() also a pipe with its file descriptors was leaked.

    Own Id: OTP-16772 Aux Id: ERL-1304

  • 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.

    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.

    Own Id: OTP-16639 Aux Id: ERL-1236

  • 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.

    Own Id: OTP-16640 Aux Id: OTP-16193

  • 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.

    Own Id: OTP-16641

  • System tasks of low priority were not interleaved with normal 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 low priority process.

    Own Id: OTP-16642

  • re:run(Subject, RE, [unicode]) returned nomatch instead of failing with a badarg error exception when Subject contained illegal utf8 and RE was passed as a binary. This has been corrected along with corrections of reduction counting in re:run() error cases.

    Own Id: OTP-16553

  • Fixed a bug that could cause the emulator to crash when purging modules or persistent terms.

    Own Id: OTP-16555 Aux Id: ERL-1188

  • Fixed bug in ets:update_counter/4, when called with an invalid UpdateOp and a Key that does not exist, causing ets:info(T,size) to return incorrect values. Bug exists since OTP-19.0.2.

    Own Id: OTP-16404 Aux Id: ERL-1127

  • A process could get into an inconsistent state where it was runnable, but never scheduled for execution. This could occur when a mix of normal and low priority processes where scheduled on the same type of dirty scheduler simultaneously.

    Own Id: OTP-16446 Aux Id: ERL-1157

  • Corrected the valid range of the erl command line argument +SDio <NumberOfDirtyIoSchedulers> from 0..1024 to 1..1024. +SDio 0 was erroneously allowed which just caused the VM to crash on the first dirty I/O job scheduled.

    Own Id: OTP-16481

  • A process could end up in a state where it got endlessly rescheduled without making any progress. This occurred when a system task, such as check of process code (part of a code purge), was scheduled on a high priority process trying to execute on a dirty scheduler.

    Own Id: OTP-16436 Aux Id: ERL-1152

  • Fixed bug in erlang:list_to_ref/1 when called with a reference created by a remote note. Function list_to_ref/1 is intended for debugging and not to be used in application programs. Bug exist since OTP 20.0.

    Own Id: OTP-16438

  • Taking a scheduler offline could cause timers set while executing on that scheduler to be delayed until the scheduler was put online again. This bug was introduced in ERTS version 10.0 (OTP 21.0).

    Own Id: OTP-16371

  • A process calling erlang:system_flag(multi_scheduling, block) could end up blocked waiting for the operation to complete indefinitely.

    Own Id: OTP-16379

  • 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.

    Own Id: OTP-16193

  • Fix bug causing VM crash due to memory corruption of distribution entry. Probability of crash increases if Erlang distribution is frequently disconnected and reestablished towards same node names. Bug exists since OTP-21.0.

    Own Id: OTP-16224 Aux Id: ERL-1044

  • Fix bug where the receive marker used by the runtime to do the receive queue optimization could be incorrectly set. The symptom of this would be that a message that should match in a receive never matches.

    The bug requires the OTP-22 compiler and multiple selective receives to trigger. See OTP-16219 for details about the bug fix in the compiler.

    Own Id: OTP-16241 Aux Id: ERL-1076 OTP-16219

  • Fixed bug causing crash of VM built with configuration --enable--sharing-preserving. Provoked when a sent message contains both a bit string and the heap binary (< 65 bytes) which the bit string was matched from. Bug exists since OTP-19.0 but has seen to be easier to provoke since OTP-22.1.

    Own Id: OTP-16265 Aux Id: ERL-1064

  • Fix a bug in binary_to_term that would crash the emulator if a term larger than 16GB was to be decoded.

    Own Id: OTP-16058 Aux Id: PR-2382

  • When communicating with a simultaneously exiting port via the erlang:port_*() BIFs one could sometimes get stray {Ref, What} messages. Where Ref was a reference and What usually were the atom badarg.

    Own Id: OTP-16107 Aux Id: ERL-1049

  • process_info(P,binary) would neglect to look through heap fragments, potentially missing a few binaries associated with the process.

    Own Id: OTP-15978 Aux Id: ERIERL-366

  • Fixed bug triggered if a process is killed during call to persistent_term:put or persistent_term:erase.

    Own Id: OTP-16041

  • Fixed rare emulator crash in instrument:allocations/0-1.

    Own Id: OTP-15983

  • Fixed bug causing VM crash when doing textual dump of a process containing an unhandled monitor down signal. Textual process dumps can be done with erlang:system_info(procs), trace feature process_dump, Erlang shell break menu and a crashdump. Bug exist since OTP 21.0.

    Own Id: OTP-15909 Aux Id: ERL-979

  • lists:subtract/2 would produce incorrect results for some inputs on 64-bit platforms.

    Own Id: OTP-15938 Aux Id: ERL-986

  • Fixed a bug in the loader that was similar to OTP-15938, yielding incorrect code for some inputs on 64-bit platforms.

    Own Id: OTP-15939

  • Fixed bug causing scheduler threads in rare cases to block spinnning indefinitely. Bug exists since OTP 21.0.

    Own Id: OTP-15941 Aux Id: PR-2313

  • If you set {linger,{true,0}} on a gen_tcp listen socket, accept a connection on that socket, and then close the accepted socket, now the linger zero setting is transferred to the accepted socket. Before this correction that information was lost and the close behaviour on the accepted socket incorrect.

    Own Id: OTP-15370 Aux Id: ERIERL-353

  • Fixed process_info(Pid,reductions) to not categorically increase reduction count of the measured process Pid. Repeated reduction measure of an idle process will most often (but not guaranteed) return the same value, like it behaved before OTP 21.3.8.

    Own Id: OTP-15865 Aux Id: ERL-964

  • The runtime system disconnected a connection if it received an exit/2 signal where the recipient was a process on an old incarnation of the current node. That is, the receiving node had the same node name, but another "creation" number. The signal will now just be dropped since the receiving process no longer exists.

    Own Id: OTP-15867 Aux Id: ERIERL-373

  • The possibility to send ancillary data, in particular the TOS field, has been added to gen_udp:send/4,5.

    Own Id: OTP-15747 Aux Id: ERIERL-294

  • In nested use of try/catch, rethrowing an exception using erlang:raise/3 with a different class would not always be able to change the class of the exception.

    Own Id: OTP-15834 Aux Id: ERIERL-367

  • Fixed bug in seq_trace:set_token(label,Term) which could cause VM crash if Term was heap allocated (not an atom, small integer, local pid or port). Bug exists since OTP 21.0 when terms other than small integers were first allowed as labels.

    Own Id: OTP-15849 Aux Id: ERL-700

  • Fix seq_trace:print/2 not to raise badarg exception if label is not a small integer. Bug exists since OTP 21.0.

    Own Id: OTP-15859 Aux Id: ERL-700

  • Fixed a buffer overflow when binary_to_existing_atom/2 and list_to_existing_atom/2 was used with the latin1 encoding.

    Own Id: OTP-15819 Aux Id: ERL-944

  • Fixed more bugs in process_info(reductions) causing it to sometimes behave non-monotonic. That is, a subsequent call toward the same process could return a lower reduction value.

    Own Id: OTP-15793 Aux Id: ERIERL-337, OTP-15709

  • Add missing documentation of new external tags NEW_PID, NEW_PORT and NEWER_REFERENCE introduced in OTP 19.

    These new tags are planned to be "activated" in OTP 23 when distribution capability flag DFLAG_BIG_CREATION becomes mandatory. Older nodes (>= 19) are able to decode these new tags and send them back to the new node. Nodes older than OTP 23 will however never encode their own local pids, ports and references using the new tags.

    Own Id: OTP-15766

  • Fix erlang:open_port/2 with the fd option to correctly cleanup the pollset when the port is closed. Before this fix there would be error printouts sent to logger when the same fd was reused in a new port.

    Own Id: OTP-15753 Aux Id: ERL-900

  • Fixed a bug in seq_trace:reset_trace/0 that could crash the emulator.

    Own Id: OTP-15704

  • Fixed bug in process_info(reductions) causing it to sometimes return invalid results.

    Own Id: OTP-15709 Aux Id: ERIERL-337

  • If a suspend/resume signal pair was sent to a process while it was executing dirty, the receiving process could later end up in a suspended state indefinitely. This bug was introduced in ERTS version 10.0 (OTP 21.0).

    Suspend/resume signals are sent from erlang:suspend_process()/erlang:resume_process(). The dbg trace tool utilize this functionality and could thus trigger this bug.

    Own Id: OTP-15688

  • Fix a possible deadlock when terminating the ERTS caused by a dirty scheduler not releasing it's run-queue lock when terminating.

    Own Id: OTP-15690 Aux Id: PR-2172

  • When multiplying a number by itself, a word beyond the number on the heap could be read (and ignored). This bug was extremely unlikely to actually cause a real problem.

    Own Id: OTP-15484

  • Fix bug where doing seq_trace:reset_trace() while another process was doing a garbage collection could cause the run-time system to segfault.

    Own Id: OTP-15490

  • Fix reading of ancillary data from packet oriented sockets on old Linux kernel versions. Without this fix, getting the data would cause the port to enter an infinite loop.

    Own Id: OTP-15494

  • Fix bug where crash dumping or doing erlang:system_info(procs) while another process was doing a garbage collection could cause the run-time system to segfault.

    Own Id: OTP-15527

  • Fix erlang:system_info(kernel_poll) to return correct value. Before this fix, the call always returned false.

    Own Id: OTP-15556

  • Fix bug in enif_make_map_from_arrays that would produce broken maps when number of keys were 32. Bug exists since OTP 21.0.

    Own Id: OTP-15567

  • Fix a bug in binary:encode_unsigned that may cause a read of uninitialized memory.

    The bug existed since the function was added (OTP R16B02).

    Own Id: OTP-15583 Aux Id: PR-2118

  • Fixed a bug that could cause heart to kill an exiting node before it had time to flush all buffered writes. If environment variable HEART_KILL_SIGNAL=SIGABRT was set a superfluous core dump could also be generated.

    Own Id: OTP-15599 Aux Id: ERIERL-298

  • Fix enif_consume_timeslice to be a no-op on dirty scheduler and not crash debug compiled emulator.

    Own Id: OTP-15604

  • Fixed macro redefinition warnings.

    Own Id: OTP-15629

  • to_erl fixed to not garble terminal input beyond 7-bit ASCII.

    Own Id: OTP-15650 Aux Id: ERL-854, PR-2161

  • Minor fixes for make clean.

    Own Id: OTP-15657

  • Fixed a bug in all ets:select* and ets:match* functions that could in some rare cases lead to very poor performance.

    Own Id: OTP-15660 Aux Id: ERL-869

  • Add erlang:system_flag(system_logger, Pid) and erlang:system_info(system_logger). This system_flag can be used to set the process that will receive the logging messages generated by ERTS.

    Own Id: OTP-15375

  • integer_to_list/2 and integer_to_binary/2 are now implemented in C, improving their performance.

    Own Id: OTP-15503 Aux Id: PR-2052

  • Improved term_to_binary to do more fair reduction count and yielding when encoding large byte lists (strings).

    Own Id: OTP-15514 Aux Id: ERL-774

  • Made internal port drivers more robust against erlang:port_control with invalid arguments and added documentation warnings about such abuse.

    Own Id: OTP-15555 Aux Id: ERIERL-231

  • Fix bug on NetBSD where the exit_status from a port program would never be sent.

    Own Id: OTP-15558 Aux Id: ERL-725

  • There is a new function persistent:term(Key, Default) to allow specifying a default when looking up a persistent term.

    Own Id: OTP-15576 Aux Id: ERL-843

  • A transitory emulator option '+ztma true' has been added to allow running existing BEAM code that relies on "tuple calls" (dispatch on parameterized modules) which has been compiled under OTP 20 or earlier. This option will be removed in OTP 22, so such modules should eventually be recompiled with the +tuple_calls option.

    Own Id: OTP-15580 Aux Id: PR-2113

  • Fixes of install/release phase in build system.

    • The source tree was modified when installing/releasing and/or applying a patch.
    • Some files were installed with wrong access rights.
    • If applying a patch (using otp_patch_apply) as another user (except root) than the user that built the source, the documentation was not properly updated.

    Own Id: OTP-15551

  • Setting the recbuf size of an inet socket the buffer is also automatically increased. Fix a bug where the auto adjustment of inet buffer size would be triggered even if an explicit inet buffer size had already been set.

    Own Id: OTP-15651 Aux Id: ERIERL-304

  • Reading from UDP using active true or active N mode has been optimized when more packets than specified by read_packets are available on the socket.

    Own Id: OTP-15652 Aux Id: ERIERL-304

  • When using the {linger,{true,T}} option; gen_tcp:listen/2 used the full linger time before returning for example eaddrinuse. This bug has now been corrected.

    Own Id: OTP-14728 Aux Id: ERIERL-303

  • Fix bug where doing a gen_tcp:send on a socket with delay_send set to true could cause a segfault if the other side closes the connection.

    Bug was introduced in erts-10.2 (OTP-21.2).

    Own Id: OTP-15536 Aux Id: ERL-827

  • Fix a race condition when a port program closes that could result in the next started port to hang during startup.

    When this fault happens the following error is normally (but not always) logged:

    =ERROR REPORT==== 14-Jan-2019::10:45:52.868246 ===
    Bad input fd in erts_poll()! fd=11, port=#Port<0.505>, driver=spawn, name=/bin/sh -s unix:cmd

    Bug was introduced in erts-10.0 (OTP-21.0).

    Own Id: OTP-15537

  • Fix a bug where polling for external events could be delayed for a very long time if all active schedulers were 100% loaded.

    Bug was introduced in erts-10.2 (OTP-21.2).

    Own Id: OTP-15538 Aux Id: ERIERL-229

  • Fixed a crash when dangling files were closed after init:restart/0.

    Own Id: OTP-15495 Aux Id: ERL-821

  • A bug that could cause dirty schedulers to become unresponsive has been fixed.

    Own Id: OTP-15509 Aux Id: PR-2027, PR-2093

  • Fixed bug on big endian architectures when changing file permissions or ownership with file:change_mode, change_owner, change_group or write_file_info. Bug exists since OTP-21.0.

    Own Id: OTP-15485

  • Fixed bug in atomics with option {signed,false} when returned values are (1 bsl 63) or larger. Could cause heap corruption leading to VM crash or other unpleasant symptoms. Bug exists since OTP-21.2 when module atomics was introduced.

    Own Id: OTP-15486 Aux Id: PR-2061

  • Fixed bug in operator band of two negative operands causing erroneous result if the absolute value of one of the operands have the lowest N*W bits as zero and the other absolute value is not larger than N*W bits. N is an integer of 1 or larger and W is 32 or 64 depending on word size.

    Own Id: OTP-15487 Aux Id: ERL-804

  • When a process was waiting for a TCP socket send operation to complete, and another process closed the socket during that send, the sending process could hang. This bug has now been corrected.

    Own Id: OTP-12242 Aux Id: ERL-561

  • Document bit_size in match specifications and allow it in ets:fun2ms.

    Own Id: OTP-15343 Aux Id: PR-1962

  • Fixed bug in ets:select_replace when called with a fully bound key could cause a following call to ets:next or ets:prev to crash the emulator or return invalid result.

    Own Id: OTP-15346

  • When a module has been purged from memory, any literals belonging to that module will be copied to all processes that hold references to them. The max heap size limit would be ignored in the garbage collection initiated when copying literals to a process. If the max heap size was exceeded, the process would typically be terminated in the following garbage collection. Corrected to terminate the process directly if copying a literal would exceed the max heap size.

    Own Id: OTP-15360

  • Fix compilation of run_erl on Solaris 11.4 and later.

    Own Id: OTP-15389

  • Fixed a bug where lists:reverse/1-2 could use far too many reductions. This bug was introduced in OTP 21.1.

    Own Id: OTP-15436

  • Fixed a bug where a dirty scheduler could stay awake forever if a distribution entry was removed as part of a dirty GC.

    Own Id: OTP-15446 Aux Id: PR-2024

  • Fix microstate accounting handing in various places. Most importantly the GC states when the GC is run on a dirty scheduler are now managed correctly.

    Own Id: OTP-15450 Aux Id: ERIERL-229

  • Fixed bug in file:sendfile when the send operation failed. For sockets in active modes it could cause emulator crash or a hanging call. For sockets with {active,false} an unexpected {inet_reply, _, _} message could be sent to the calling process. The bug exists since OTP-21.0.

    Own Id: OTP-15461 Aux Id: ERL-784

  • The erts configure script has been updated to reject any CFLAGS that does not have -O. This in order to prevent the common mistake of forgetting to add -O2 to custom CFLAGS.

    Own Id: OTP-15465

  • Fix reduction count in lists:member/2

    Own Id: OTP-15474 Aux Id: ERIERL-229

  • New counters and atomics modules supplies access to highly efficient operations on mutable fixed word sized variables.

    Own Id: OTP-13468

  • There is a new module persistent_term that implements a term storage suitable for terms that are frequently used but never or infrequently updated. Lookups are done in constant time without copying the terms.

    Own Id: OTP-14669 Aux Id: PR-1989

  • A function inet:getifaddrs/1 that takes a list with a namespace option has been added, for platforms that support that feature, for example Linux (only?).

    Own Id: OTP-15121 Aux Id: ERIERL-189, PR-1974

  • Added the nopush option for TCP sockets, which corresponds to TCP_NOPUSH on *BSD and TCP_CORK on Linux.

    This is also used internally in file:sendfile to reduce latency on subsequent send operations.

    Own Id: OTP-15357 Aux Id: ERL-698

  • List subtraction (The -- operator) will now yield properly on large inputs.

    Own Id: OTP-15371

  • Optimize handling of send_delay for tcp sockes to better work with the new pollthread implementation introduced in OTP-21.

    Own Id: OTP-15471 Aux Id: ERIERL-229

  • Optimize driver_set_timer with a zero timeout to short-circuit and not create any timer structure, but instead schedule the timer immediately.

    Own Id: OTP-15472 Aux Id: ERIERL-229

  • Add erl_xcomp_code_model_small as a cross configure variable in order to let the emulator be build with the assumption that a small code model will be used on the target machine.

    Own Id: OTP-15473 Aux Id: ERIERL-229

  • Add a new pollset that is made to handle sockets that use {active, true} or {active, N}. The new pollset will not be polled by a pollthread, but instead polled by a normal scheduler.

    This change was made because of the overhead associated with constantly having to re-apply the ONESHOT mechanism on fds that all input events were interesting.

    The new pollset is only active on platforms that support concurrent kernel poll updates, i.e. Linux and BSD.

    Own Id: OTP-15475 Aux Id: ERIERL-229

  • Fix bug where emulator would segfault if a literal message was sent when sequence tracing was enabled.

    Own Id: OTP-15478 Aux Id: ERL-741

  • Added an optional ./configure flag to compile the emulator with spectre mitigation: --with-spectre-mitigation

    Note that this requires a recent version of GCC with support for spectre mitigation and the --mindirect-branch=thunk flag, such as 8.1.

    Own Id: OTP-15430 Aux Id: ERIERL-237

  • Fixed a rare bug where files could be closed on a normal instead of an IO scheduler, resulting in system instability if the operation blocked.

    Own Id: OTP-15421

  • A bug where the socket option 'pktoptions' caused a read of uninitialized memory has been fixed. Would cause malfunction on FreeBSD.

    Own Id: OTP-14297 Aux Id: OTP-15141

  • Fixed a memory leak on errors when reading files.

    Own Id: OTP-15318

  • File access through UNC paths works again on Windows. This regression was introduced in OTP 21.

    Own Id: OTP-15333 Aux Id: ERL-737

  • Fix the seq_trace token to not be cleared when a process receives messages sent by erts. Some examples of when this could happen is all port BIFs, i.e. open_port, port_command etc etc.

    Fix so that messages sent by nifs can be traced using normal and seq_trace tracing.

    Own Id: OTP-15038 Aux Id: ERL-602

  • Fixed specs and documentation for process_info item monitored_by to include port identifiers and nif resources as possible types.

    Own Id: OTP-15180 Aux Id: ERL-648

  • Fix bug in generation of erl_crash.dump, which could cause VM to crash.

    Bug exist since erts-9.2 (OTP-20.2).

    Own Id: OTP-15181

  • Fix bug where ctrl-break or ctrl-c would not trigger the break mode properly on Windows. This bug was introduced in erts-10.0 (OTP-21).

    Own Id: OTP-15205

  • Fix a performance bug for reception of UDP packages, where a memory buffer would be reallocated when it should not have been.

    Introduce a limit on the maximum automatic increase of the UDP user-space buffer to the theoretical max of the network PATH, i.e. 65535.

    Own Id: OTP-15206

  • Fix alignment of erts allocator state internally in erts. With the improper alignment the emulator would refuse to start when compiled with clang on 32-bit systems.

    Own Id: OTP-15208 Aux Id: PR-1897 ERL-677

  • Fix bug where too many concurrent calls to erlang:open_port({spawn,"cmd"},...) would result in the emulator terminating with the reason "Failed to write to erl_child_setup: ". After this fix the open_port call will throw an emfile exception instead.

    Own Id: OTP-15210

  • Upgraded the ERTS internal PCRE library from version 8.41 to version 8.42. See http://pcre.org/original/changelog.txt for information about changes made to PCRE. This library implements major parts of the re regular expressions module.

    Own Id: OTP-15217

  • Fix open_port({fd,X,Y}, ...) to release the file descriptors from the pollset when closing the port. Without this fix the same file descriptor number could not be reused when doing multiple open_port and port_close sequences.

    Own Id: OTP-15236 Aux Id: ERL-692

  • Fixed bug in float_to_list/2 and float_to_binary/2 with options [{decimals,0},compact] causing totally wrong results. Bug exists since OTP-21.0.

    Own Id: OTP-15276 Aux Id: PR-1920

  • Fixed bug in erlang:memory causing ets to report too much. This small false memory leak (16 bytes each time) can only happen when a specific race condition occurs between scheduler threads on a table with option write_concurrency.

    Own Id: OTP-15278

  • Minor configure test fixes

    Own Id: OTP-15282

  • Improved robustness of distribution connection setup. In OTP-21.0 a truly asynchronous connection setup was introduced. This is further improvement on that work to make the emulator more robust and also be able to recover in cases when involved Erlang processes misbehave.

    Own Id: OTP-15297 Aux Id: OTP-15279, OTP-15280

  • The socket options recvtos, recvttl, recvtclass and pktoptions have been implemented in the socket modules. See the documentation for the gen_tcp, gen_udp and inet modules. Note that support for these in the runtime system is platform dependent. Especially for pktoptions which is very Linux specific and obsoleted by the RFCs that defined it.

    Own Id: OTP-15145 Aux Id: ERIERL-187

  • As of ERTS version 10.0 (OTP 21.0) the erl_child_setup program, which creates port programs, ignores TERM signals. This setting was unintentionally inherited by port programs. Handling of TERM signals in port programs has now been restored to the default behavior. That is, terminate the process.

    Own Id: OTP-15289 Aux Id: ERIERL-235, OTP-14943, ERL-576

  • The fix made for OTP-15279 in erts-10.07 (OTP-21.0.8) was not complete. It could cause a new connection attempt to be incorrectly aborted in certain cases. This fix will amend that flaw.

    Own Id: OTP-15296 Aux Id: OTP-15279, ERIERL-226

  • A process could get stuck in an infinite rescheduling loop between normal and dirty schedulers. This bug was introduced in ERTS version 10.0.

    Thanks to Maxim Fedorov for finding and fixing this issue.

    Own Id: OTP-15275 Aux Id: PR-1943

  • Garbage collection of a distribution entry could cause an emulator crash if net_kernel had not brought previous connection attempts on it down properly.

    Own Id: OTP-15279 Aux Id: ERIERL-226

  • A race between termination of a process and resume of the same process via erlang:resume_process/1 could cause the VM to crash. This bug was introduced in erts version 10.0 (OTP 21.0).

    Own Id: OTP-15237

  • When tracing on running, in trace events could be lost when a process was rescheduled between a dirty and a normal scheduler.

    Own Id: OTP-15269 Aux Id: ERL-713

  • Fixed a bug which caused an emulator crash when enif_send() was called by a NIF that executed on a dirty scheduler. The bug was either triggered when the NIF called enif_send() without a message environment, or when the process executing the NIF was send traced.

    Own Id: OTP-15223

  • Fixed a bug causing some Erlang references to be inconsistently ordered. This could for example cause failure to look up certain elements with references as keys in search data structures. This bug was introduced in R13B02.

    Thanks to Simon Cornish for finding the bug and supplying a fix.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-15225

  • Fixed a bug that prevented the noshell option from working correctly on Mac OS X and BSD.

    Own Id: OTP-15169

  • Fixed a crash when matching directly against a literal map using a single key that had been saved on the stack.

    Own Id: OTP-15184

  • Fix node crash when passing a bad time option to file:read_file_info/2.

    Own Id: OTP-15196

  • Fixed a scheduler bug that caused normal schedulers to run dirty code.

    Own Id: OTP-15154

  • Fixed a bug in erlang:trace_info/2 which caused the emulator to crash when a bad argument was passed. The bug was introduced in ERTS version 10.0.

    Own Id: OTP-15183 Aux Id: ERL-670

  • Fixed a rare bug that could cause processes to be scheduled after they had been freed.

    Own Id: OTP-15067 Aux Id: ERL-573

  • Fixed a race condition in the inet driver that could cause receive to hang when the emulator was compiled with gcc 8.

    Own Id: OTP-15158 Aux Id: ERL-654

  • The keys used in os:getenv and os:putenv are case-insensitive again on Windows.

    Own Id: OTP-15147 Aux Id: ERL-644

  • The type specifications for file:posix/0 and inet:posix/0 have been updated according to which errors file and socket operations should be able to return.

    Own Id: OTP-14019 Aux Id: ERL-550

  • Fix error printout from run_erl and a bug that could cause unintended fds to be leaked into the started program.

    Own Id: OTP-14537 Aux Id: PR1529

  • File operations used to accept filenames containing null characters (integer value zero). This caused the name to be truncated and in some cases arguments to primitive operations to be mixed up. Filenames containing null characters inside the filename are now rejected and will cause primitive file operations to fail.

    Also environment variable operations used to accept names and values of environment variables containing null characters (integer value zero). This caused operations to silently produce erroneous results. Environment variable names and values containing null characters inside the name or value are now rejected and will cause environment variable operations to fail.

    Primitive environment variable operations also used to accept the $= character in environment variable names causing various problems. $= characters in environment variable names are now also rejected.

    Also os:cmd/1 now reject null characters inside its command.

    erlang:open_port/2 will also reject null characters inside the port name from now on.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-14543 Aux Id: ERL-370

  • Fix bugs related to the bookkeeping of microstate accounting states.

    Own Id: OTP-14652

  • os:putenv and os:getenv no longer access the process environment directly and instead work on a thread-safe emulation. The only observable difference is that it's not kept in sync with libc getenv(3) / putenv(3), so those who relied on that behavior in drivers or NIFs will need to add manual synchronization.

    On Windows this means that you can no longer resolve DLL dependencies by modifying the PATH just before loading the driver/NIF. To make this less of a problem, the emulator now adds the target DLL's folder to the DLL search path.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-14666

  • Corrected erlang:is_builtin(erlang, M, F) to return true for apply/2 and yield/0.

    Own Id: OTP-14713 Aux Id: ERL-500

  • Fixed a bug where the PATH environment variable wasn't updated correctly on a release downgrade, effectively keeping the PATH of the new release.

    Own Id: OTP-14719

  • A receive optimization that avoids scanning the entire message queue when receiving a message containing a freshly created reference could in rare circumstances (involving recursive calls to the functions that does the receive) cause the receive to hang. This has been corrected.

    Own Id: OTP-14782 Aux Id: ERL-511

  • Fix building of Erlang/OTP on platforms which have small data area with short addressing. For example the PowerPC/RTEMS platform.

    Own Id: OTP-14909 Aux Id: PR-1692

  • Fixed a crash when enif_make_binary is called with a binary produced by enif_inspect_binary in a different environment.

    Own Id: OTP-14931

  • Fixed a crash when enif_make_binary is called more than once with a binary that had previously been added to an enif_ioq.

    Own Id: OTP-14932

  • The erl_child_setup program now ignores SIGTERM signals.

    Own Id: OTP-14943 Aux Id: ERL-576

  • Force 64-bit alignment on pre-allocators on architectures which needs it.

    Own Id: OTP-14977

  • Fixed a bug where dirty scheduler picked up non-dirty work.

    Own Id: OTP-14978

  • Calls to gen_tcp:send/2 on closed sockets now returns {error, closed} instead of {error,enotconn}.

    Own Id: OTP-15001

  • erlang:monotonic_time/1 failed with badarg when passing the perf_counter time unit as argument.

    Own Id: OTP-15008

  • Fix bug where rapid init:restart() calls would sometimes crash because a code load request leaked in between the restarts.

    Own Id: OTP-15013

  • Improve float_to_list(F, [{decimals,D}]) to closer conform with io_lib:format("~.*f", [D,F]).

    There are however, still cases when float_to_list does not produce the exact same result as io_lib:format, especially for large values F and/or many decimals D.

    Own Id: OTP-15015 Aux Id: OTP-14890

  • Fixed a deadlock that would occur on certain allocators when a reallocation failed with +ramv enabled.

    Own Id: OTP-15024

  • Fix bug that made it impossible to use an erl_tracer as the seq_trace trace receiver.

    Own Id: OTP-15029

  • Fix bug where a large (> 1 GB) emulator generated error logger message would cause the emulator to crash.

    Own Id: OTP-15032

  • The emulator will no longer crash when reading the file information of an ordinary file that has an NTFS reparse point, such as files stored in a OneDrive-mapped folder.

    Own Id: OTP-15062 Aux Id: ERL-615

  • Fixed bug in enif_binary_to_term which could cause memory corruption for immediate terms (atoms, small integers, pids, ports, empty lists).

    Own Id: OTP-15080

  • Fixed bug in erlang:system_profile/2 that could cause superfluous {profile,_,active,_,_} messages for terminating processes.

    Own Id: OTP-15085

  • On OSs with per thread CPU time support, change cpu_timestamp in erlang:trace/3 to use it instead of per process CPU time. This makes this option usable on such OSs when running multiple schedulers.

    Own Id: OTP-15090

  • Fix segfault in abort_signal_task which could happen if a port terminated while there were outstanding port tasks that were not signals, for example a ready_input/ready_output event.

    Own Id: OTP-15108 Aux Id: ERL-621

  • Fixed bug in ets that could cause VM crash if process A terminates after fixating a table and process B deletes the table at "the same time". The table fixation could be done with ets:safe_fixtable or if process A terminates in the middle of a long running select or match call.

    Own Id: OTP-15109

  • Owner and group changes through file:write_file_info, file:change_owner, and file:change_group will no longer report success on permission errors.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-15118

  • Fix a bug error reporting from escripts on windows where the error message would get garbled.

    Own Id: OTP-15119 Aux Id: PR-1826

  • Fix segfault when a process is internally re-scheduled while being traced for in out events. This bug was introduced in erts-8.0 (OTP-19.0).

    Own Id: OTP-15125

  • It is now possible to open device files and FIFOs with file:open/2.

    Own Id: OTP-11462

  • The erlang:system_flag(scheduler_wall_time,Bool) call is now reference counted and will be turned off if the (last) process that started the performance statistics dies. Thus it is no longer possible to start the statistics with rpc:call(Node, erlang, system_flag, [scheduler_wall_time, true]) since it will be turned off directly afterwards when the rpc process dies.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-11694

  • A new logging API is added to Erlang/OTP, see the logger(3) manual page, and section Logging in the Kernel User's Guide.

    Calls to error_logger are automatically redirected to the new API, and legacy error logger event handlers can still be used. It is, however, recommended to use the Logger API directly when writing new code.

    Notice the following potential incompatibilities:

    • Kernel configuration parameters error_logger still works, but is overruled if the default handler's output destination is configured with Kernel configuration parameter logger.

      In general, parameters for configuring error logger are overwritten by new parameters for configuring Logger.

    • The concept of SASL error logging is deprecated, meaning that by default the SASL application does not affect which log events are logged.

      By default, supervisor reports and crash reports are logged by the default Logger handler started by Kernel, and end up at the same destination (terminal or file) as other standard log event from Erlang/OTP.

      Progress reports are not logged by default, but can be enabled by setting the primary log level to info, for example with the Kernel configuration parameter logger_level.

      To obtain backwards compatibility with the SASL error logging functionality from earlier releases, set Kernel configuration parameter logger_sasl_compatible to true. This prevents the default Logger handler from logging any supervisor-, crash-, or progress reports. Instead, SASL adds a separate Logger handler during application start, which takes care of these log events. The SASL configuration parameters sasl_error_logger and sasl_errlog_type specify the destination (terminal or file) and severity level to log for these events.

    Since Logger is new in Erlang/OTP 21.0, we do reserve the right to introduce changes to the Logger API and functionality in patches following this release. These changes might or might not be backwards compatible with the initial version.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-13295

  • gen_sctp:connect_init/4 or rather connect in inet_drv.c for SCTP has been fixed to not check the write file descriptor for writeability after a connect, since for SCTP (SOCK_SEQPACKET) that property does not seem to be any kind of indicator for when a connect has finished. This fixes connects that the OS returned as "in progress" that was misinterpreted by gen_sctp:connect_init as failed.

    Own Id: OTP-13760 Aux Id: PR-1592

  • The file driver has been rewritten as a NIF, decreasing the latency of file operations. Notable incompatibilities are:

    • The use_threads option for file:sendfile/5 no longer has any effect; we either use non-blocking sendfile(2) or fall back to file:read + gen_tcp:send.

    • The file-specific DTrace probes have been removed. The same effect can be achieved with normal tracing together with the nif__entry/nif__return probes to track scheduling.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-14256

  • The I/O polling functionality of erts has been re-written to better make use of the OSs polling mechanisms. This change means that erts will now always prefer to use a kernel-polling mechanism if possible. Also all of the I/O polling has been moved to dedicated threads instead of being placed in the scheduler loops.

    As a result of this, the erl options +K and +secio have been removed. It is still possible to disable kernel-poll, but it has to be done at compile time through the configure option --disable-kernel-poll.

    The new erl options +IOt and +IOp can be used to change how many IO poll threads and poll sets that erts should use. See their respective documentation for more details.

    Own Id: OTP-14346

  • Truly asynchronous auto-connect. Earlier, when erlang:send was aimed toward an unconnected node, the function would not return until the connection setup had completed (or failed). Now the function returns directly after the message has been enqueued and the connection setup started.

    The same applies to all distributed operations that may trigger auto-connect, i.e. '!', send, link, monitor, monitor_node, exit/2 and group_leader.

    The interface for all these functions are unchanged as they do not return connection failures. The only exception is erlang:monitor where a possible incompatibility is introduced: An attempt to monitor a process on a primitive node (such as erl_interface or jinterface), where remote process monitoring is not implemented, will no longer fail with badarg exception. Instead a monitor will be created, but it will only supervise the connection to the node.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-14370

  • Changed the default behaviour of .erlang loading: .erlang is no longer loaded from the current directory. c:erlangrc(PathList) can be used to search and load an .erlang file from user specified directories.

    escript, erlc, dialyzer and typer no longer load an .erlang at all.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-14439

  • New functionality for implementation of alternative carriers for the Erlang distribution has been introduced. This mainly consists of support for usage of distribution controller processes (previously only ports could be used as distribution controllers). For more information see ERTS User's Guide ➜ How to implement an Alternative Carrier for the Erlang Distribution ➜ Distribution Module.

    Own Id: OTP-14459

  • Add support for the lcc compiler and in extension the Elbrus 2000 platform.

    Own Id: OTP-14492

  • Support for "tuple calls" have been removed from the run-time system. Tuple calls was an undocumented and unsupported feature which allowed the module argument for an apply operation to be a tuple: Var = dict:new(), Var:size(). This "feature" frequently caused confusion, especially when such call failed. The stacktrace would point out functions that don't exist in the source code.

    For legacy code that need to use parameterized modules or tuple calls for some other reason, there is a new compiler option called tuple_calls. When this option is given, the compiler will generate extra code that emulates the old behavior for calls where the module is a variable.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-14497

  • Creation of small maps with literal keys has been optimized to be faster and potentially use less memory. The keys are combined into a literal key tuple which is put into the literal pool. The key tuple can be shared between many instances of maps having the same keys.

    Own Id: OTP-14502

  • When an exception is thrown, include the arguments of the call in the stacktrace for BIFs band, bor, bsl, bsr, bxor, div, rem and the operators +, -, * and /.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-14508

  • The non-smp emulators have been removed. This means that the configure options --disable-threads and --enable-plain-emulator have been removed and configure will now refuse to build Erlang/OTP on platforms without thread support.

    In order to achieve a similar setup as the non-smp emulator, it is possible to start Erlang/OTP with the +S 1 option.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-14518

  • Modules that use floating point constants compiled with R15 or earlier will need to be re-compiled before they can be loaded.

    Own Id: OTP-14575

  • Implementation of true asynchronous signaling between processes in order to improve scalability. Signals affected include exit, monitor, demonitor, monitor triggered, link, unlink, and group leader.

    Own Id: OTP-14589

  • Added a PGO (profile guided optimization) pass to the build step of erts. This can be disabled by passing --disable-pgo to configure.

    Own Id: OTP-14604

  • Improved the performance of binary:split and binary:match.

    Own Id: OTP-14610 Aux Id: PR-1480

  • It is not longer possible to disable dirty schedulers when building erlang.

    Own Id: OTP-14613

  • Loaded BEAM code in a 64-bit system requires less memory because of better packing of operands for instructions.

    These memory savings were achieved by major improvements to the beam_makeops scripts used when building the run time system and BEAM compiler. There is also new for documentation for beam_makeops that describes how new BEAM instructions and loader transformations can be implemented. The documentation is found in here in a source directory or git repository: erts/emulator/internal_doc/beam_makeops.md. An online version can be found here: https://github.com/erlang/otp/blob/master/erts/emulator/internal_doc/beam_makeops.md

    Own Id: OTP-14626

  • file:read_file has been changed to read the content of files that report a size of 0 even when data can be read from them. An example of such a file is /proc/cpuinfo on Linux.

    Own Id: OTP-14637 Aux Id: ERL-327 PR-1524

  • It is no longer possible to disable the temp_alloc allocator. Disabling it caused serious performance degradations and was never what was wanted.

    Own Id: OTP-14651

  • The reduction cost of sending messages is now constant. It will no longer scale according to the length of the receiving process' message queue.

    Own Id: OTP-14667

  • Improved loading of modules with -on_load directive, to no longer block all schedulers when the load operation is completed.

    Own Id: OTP-14680

  • On platforms with real-time signals available, SIGRTMIN+1 is now used as the internal scheduler suspend signal instead of SIGUSR2.

    Own Id: OTP-14682

  • When the value returned from a 'catch' expression is ignored, no stacktrace will be built if an exception is caught. That will save time and produce less garbage. There are also some minor optimizations of 'try/catch' both in the compiler and run-time system.

    Own Id: OTP-14683

  • The guarantees and non-guarantees of erlang:get_stacktrace/0 are now documented.

    Own Id: OTP-14687

  • There is a new syntax in 'try/catch' for retrieving the stacktrace without calling 'erlang:get_stacktrace/0'. See the reference manual for a description of the new syntax. The 'erlang:get_stacktrace/0' BIF is now deprecated.

    Own Id: OTP-14692

  • New 'used' option for binary_to_term/2 that will also return number of bytes actually read from the binary. This enables easy access to any extra data in the binary located directly after the returned term.

    Own Id: OTP-14780

  • Added more statistics for erlang:system_info({allocator,A}) in the mbcs_pool section.

    Own Id: OTP-14795 Aux Id: ERL-88

  • Added enif_ioq_peek_head to retrieve Erlang terms from NIF IO queues without having to resort to copying.

    Own Id: OTP-14797

  • There is a new option 'makedep_side_effect' for the compiler and -MMD for 'erlc' that generates dependencies and continues to compile as normal.

    Own Id: OTP-14830

  • Added ets:whereis/1 for retrieving the table identifier of a named table.

    Own Id: OTP-14884

  • seq_trace labels may now be any erlang term.

    Own Id: OTP-14899

  • Optimized the common case of monitor followed by send to the same local process. The monitor signal is now delayed in order to be piggybacked with the sent message and thereby only get one lock operation on the message queue of the receiver. A delayed monitor signal is flushed if no send has been done at the latest when the process is scheduled out.

    Own Id: OTP-14901

  • Make hipe compiled code work on x86_64 (amd64) with OS security feature PIE, where executable code can be loaded into a random location. Old behavior, if hipe was enabled, was to disable PIE build options for the VM.

    Own Id: OTP-14903

  • The number of driver async threads will now default to 1 as the standard drivers do not use them anymore. Users that changed this value to tweak the file driver should replace +A with +SDio since it now uses dirty IO schedulers instead of async threads.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-14928

  • Optimize == and /= for binaries with different sizes to be constant in time instead of proportional to the size of their common prefix.

    Own Id: OTP-14934 Aux Id: PR-1708

  • Refactorings making some internal process flags available for other usage.

    Own Id: OTP-14948

  • Removed need for HiPE to allocate native executable memory in low 2GB address space on x86_64. Command line option +MXscs is thereby obsolete and ignored.

    Own Id: OTP-14951

  • Added enif_make_map_from_arrays for creating a populated map, analogous to enif_make_list_from_array.

    Own Id: OTP-14954

  • Added configuration switches for busy-wait and wake up thresholds for dirty schedulers, and changing these settings for normal schedulers will no longer affect dirty schedulers.

    Refer to the documentation for details. The new switches are +sbwtdcpu, +sbwtdio, +swtdcpu, and +swtdio.

    The default busy wait threshold for dirty scheduler threads has also been lowered to short.

    Own Id: OTP-14959

  • The list of "taints" now also includes dynamic loaded drivers in addition to NIF libraries. Statically linked drivers and NIF libraries that are part of erts are not included. The "taints" are returned by system_info(taints) and printed in the header of erl_crash.dump files.

    Own Id: OTP-14960

  • Added instrument:allocations and instrument:carriers for retrieving information about memory utilization and fragmentation.

    The old instrument interface has been removed, as have the related options +Mim and +Mis.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-14961

  • The process suspend functionality used by the erlang:suspend_process/2 BIF has been reimplemented using the newly introduced true asynchronous signaling between processes. This mainly to reduce memory usage in the process control block of all processes, but also in order to simplify the implementation.

    Warning

    You can easily create deadlocks if processes suspends each other (directly or in circles). In ERTS versions prior to ERTS version 10.0, the runtime system prevented such deadlocks, but this prevention has now been removed due to performance reasons.

    Other ERTS internal functionality that used the previous process suspend functionality have also been reimplemented to use asynchronous signaling instead.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-14964 Aux Id: OTP-14589

  • Added the nifs option to ?MODULE:module_info/1 for listing a module's installed NIF functions.

    Own Id: OTP-14965

  • New implementation of erlang:process_info/[1,2].

    In the general case when inspecting another process, the new implementation sends an asynchronous process-info request signal to the other process and waits for the result instead of locking the other process and reading the result directly. In some special cases where no conflicts occur, signal order won't be violated, and the amount of data requested is guaranteed to be small, the inspected process may be inspected directly.

    Appropriate amount of reductions are now also bumped when inspecting a process.

    Own Id: OTP-14966

  • Removed process start time from crash dump in order to save memory in process control block.

    Own Id: OTP-14975 Aux Id: PR-1597

  • Optimize erlang:put/2 when updating existing key with a new immediate value (atom, small integer, pid, port).

    Own Id: OTP-14976

  • erlang:process_info/1 has been changed to no longer include messages by default. Instead erlang:process_info/2 should be used.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-14986 Aux Id: PR-1745

  • New erlang:system_info(ets_count) to get total number of ets tables existing at the local node.

    Own Id: OTP-14987

  • New NIF functions: enif_mutex_name, enif_cond_name, enif_rwlock_name, enif_thread_name, enif_vfprintf, enif_vsnprintf.

    Own Id: OTP-14994

  • When erlang:system_flag(backtrace_depth, 0) has been called, all exceptions will now contain the entry for one function (despite the zero). It used to be that a hand-made stack backtrace passed to erlang:raise/3 would be be truncated to an empty list.

    Own Id: OTP-15026

  • Fixed bug for named ets tables which could cause unexpected results from matchspec iteration functions (ets:select* and ets:match*) if the table was deleted and recreated with the same name during the iteration. The iteration could incorrectly continue through the recreated table. The expected correct behavior is now for the iteration call to fail with a badarg exception if the table is deleted before the iteration has completed.

    Own Id: OTP-15031

  • Two new guards BIFs operating on maps have been added: map_get/2 and is_map_key/2. They do the same as maps:get/2 and maps:is_key/2, respectively, except that they are allowed to be used in guards.

    Own Id: OTP-15037 Aux Id: PR-1784, PR-1802

  • Release run-queue lock while cleaning up terminated dirty process.

    Own Id: OTP-15081

  • The callback module passed as -epmd_module to erl has been expanded to be able to do name and port resolving.

    Documentation has also been added in the erl_epmd reference manual and ERTS User's Guide How to Implement an Alternative Node Discovery for Erlang Distribution.

    Own Id: OTP-15086 Aux Id: PR-1694

  • A process could end up in a state where it got endlessly rescheduled without making any progress. This occurred when a system task, such as check of process code (part of a code purge), was scheduled on a high priority process trying to execute on a dirty scheduler.

    Own Id: OTP-16436 Aux Id: ERL-1152

  • Fixed bug in erlang:list_to_ref/1 when called with a reference created by a remote note. Function list_to_ref/1 is intended for debugging and not to be used in application programs. Bug exist since OTP 20.0.

    Own Id: OTP-16438

  • A process could get into an inconsistent state where it was runnable, but never scheduled for execution. This could occur when a mix of normal and low priority processes where scheduled on the same type of dirty scheduler simultaneously.

    Own Id: OTP-16446 Aux Id: ERL-1157

  • Fixed erroneous mapping of exit reason from kill to killed on reception of some exit signals due to a broken link. This bug has existed since ERTS version 5.5.2 (OTP R11).

    This bug was also unknowingly fixed in ERTS version 10.0 (OTP 21.0) due to a new ERTS internal implementation of signaling between processes.

    Own Id: OTP-16465 Aux Id: ERL-1165, OTP-6160, OTP-14589

  • Corrected the valid range of the erl command line argument +SDio <NumberOfDirtyIoSchedulers> from 0..1024 to 1..1024. +SDio 0 was erroneously allowed which just caused the VM to crash on the first dirty I/O job scheduled.

    Own Id: OTP-16481

  • 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.

    Own Id: OTP-16193

  • The runtime system disconnected a connection if it received an exit/2 signal where the recipient was a process on an old incarnation of the current node. That is, the receiving node had the same node name, but another "creation" number. The signal will now just be dropped since the receiving process no longer exists.

    Own Id: OTP-15867 Aux Id: ERIERL-373

  • Fix a bug in binary_to_term that would crash the emulator if a term larger than 16GB was to be decoded.

    Own Id: OTP-16058 Aux Id: PR-2382

  • When communicating with a simultaneously exiting port via the erlang:port_*() BIFs one could sometimes get stray {Ref, What} messages. Where Ref was a reference and What usually were the atom badarg.

    Own Id: OTP-16107 Aux Id: ERL-1049

  • Fixed a buffer overflow when binary_to_existing_atom/2 and list_to_existing_atom/2 was used with the latin1 encoding.

    Own Id: OTP-15819 Aux Id: ERL-944

  • Fixes of install/release phase in build system.

    • The source tree was modified when installing/releasing and/or applying a patch.
    • Some files were installed with wrong access rights.
    • If applying a patch (using otp_patch_apply) as another user (except root) than the user that built the source, the documentation was not properly updated.

    Own Id: OTP-15551

  • Minor fixes for make clean.

    Own Id: OTP-15657

  • Fixed a bug in all ets:select* and ets:match* functions that could in some rare cases lead to very poor performance.

    Own Id: OTP-15660 Aux Id: ERL-869

  • Fix a possible deadlock when terminating the ERTS caused by a dirty scheduler not releasing it's run-queue lock when terminating.

    Own Id: OTP-15690 Aux Id: PR-2172

  • Add missing documentation of new external tags NEW_PID, NEW_PORT and NEWER_REFERENCE introduced in OTP 19.

    These new tags are planned to be "activated" in OTP 23 when distribution capability flag DFLAG_BIG_CREATION becomes mandatory. Older nodes (>= 19) are able to decode these new tags and send them back to the new node. Nodes older than OTP 23 will however never encode their own local pids, ports and references using the new tags.

    Own Id: OTP-15766

  • Added an optional ./configure flag to compile the emulator with spectre mitigation: --with-spectre-mitigation

    Note that this requires a recent version of GCC with support for spectre mitigation and the --mindirect-branch=thunk flag, such as 8.1.

    Own Id: OTP-15430 Aux Id: ERIERL-237

  • A bug that could cause dirty schedulers to become unresponsive has been fixed.

    Own Id: OTP-15509 Aux Id: PR-2027, PR-2093

  • Fixed bug in operator band of two negative operands causing erroneous result if the absolute value of one of the operands have the lowest N*W bits as zero and the other absolute value is not larger than N*W bits. N is an integer of 1 or larger and W is 32 or 64 depending on word size.

    Own Id: OTP-15487 Aux Id: ERL-804

  • List subtraction (The -- operator) will now yield properly on large inputs.

    Own Id: OTP-15371

  • ERTS internal trees of monitor structures could get into an inconsistent state. This could cause 'DOWN' messages not to be delivered when they should, as well as delivery of 'DOWN' messages that should not be delivered.

    This bug was introduced in ERTS version 9.0 (OTP 20.0) and was fixed in ERTS version 10.0 (OTP 21.0) due to a rewrite of the monitor code. That is, this bug only exist in the OTP 20 release.

    Own Id: OTP-15399 Aux Id: ERL-751, ERIERL-262, OTP-14205

  • Fixed bug in ets:select_replace when called with a fully bound key could cause a following call to ets:next or ets:prev to crash the emulator or return invalid result.

    Own Id: OTP-15346

  • Fixed a bug which caused an emulator crash when enif_send() was called by a NIF that executed on a dirty scheduler. The bug was either triggered when the NIF called enif_send() without a message environment, or when the process executing the NIF was send traced.

    Own Id: OTP-15223

  • Fixed a bug causing some Erlang references to be inconsistently ordered. This could for example cause failure to look up certain elements with references as keys in search data structures. This bug was introduced in R13B02.

    Thanks to Simon Cornish for finding the bug and supplying a fix.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-15225

  • Fixed a race condition in the inet driver that could cause receive to hang when the emulator was compiled with gcc 8.

    Own Id: OTP-15158 Aux Id: ERL-654

  • Fix bug in generation of erl_crash.dump, which could cause VM to crash.

    Bug exist since erts-9.2 (OTP-20.2).

    Own Id: OTP-15181

  • Fixed a rare bug that could cause processes to be scheduled after they had been freed.

    Own Id: OTP-15067 Aux Id: ERL-573

  • Fixed bug in ets that could cause VM crash if process A terminates after fixating a table and process B deletes the table at "the same time". The table fixation could be done with ets:safe_fixtable or if process A terminates in the middle of a long running select or match call.

    Own Id: OTP-15109

  • Fixed bug in enif_binary_to_term which could cause memory corruption for immediate terms (atoms, small integers, pids, ports, empty lists).

    Own Id: OTP-15080

  • Fixed bug in erlang:system_profile/2 that could cause superfluous {profile,_,active,_,_} messages for terminating processes.

    Own Id: OTP-15085

  • Fixed a crash in heart:get_cmd/0 when the stored command was too long.

    Own Id: OTP-15034

  • Fixed a configure test for libz internals that unintentionally caused various native code in OTP to link against libz. Under certain circumstances this caused the build of OTP to fail.

    Own Id: OTP-14840 Aux Id: ERL-529

  • File names containing unicode codepoints larger than 255 were not correctly encoded in stack traces.

    Own Id: OTP-14847 Aux Id: ERL-544

  • Fix HiPE bug for binary constructs like <<X/utf8>> which could in rare cases cause faulty results or VM crash.

    This fix affects both the hipe compiler and erts runtime in an incompatible way. Old hipe compiled files need to be recompiled to load and run properly as native.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-14850 Aux Id: PR-1664

  • Fix term_to_binary/2 spec for minor_version.

    Own Id: OTP-14876 Aux Id: ERL-548

  • Fix bug in erlang:binary_to_integer/2 where invalid characters were not detected for bases larger then 10. e.g. binary_to_integer(<<":">>, 16) would return 3 and not badarg as it should.

    Own Id: OTP-14879

  • Fixed bug in float_to_list/2 and float_to_binary/2 with option decimals that caused a faulty rounding up of the last decimal digit for about 6% of floats with a fraction part.

    For example, float_to_list(0.145, [{decimals,1}]) returned "0.2" instead of "0.1".

    Own Id: OTP-14890

  • Fix bug causing slow hipe execution in modules loaded early during boot or loaded by code:atomic_load or code:finish_loading.

    Own Id: OTP-14891

  • Fixed a buffer overflow in an internal string formatting function that could be hit if specifying a long floating-point format specifier to erts_sprintf or similar.

    Own Id: OTP-14920

  • erlang:iolist_to_iovec/1 and enif_inspect_iovec will no longer fail when provided with binaries that have been matched-out on a non-byte boundary.

    Own Id: OTP-14921

  • iolist_to_binary/1 and erlang:iolist_to_iovec/1 will now badarg if supplied with a bitstring (without a list).

    Own Id: OTP-14926

  • Reject loading modules with names containing directory separators ('/' or '\' on Windows).

    Own Id: OTP-14933 Aux Id: ERL-564, PR-1716

  • Fix potential dead-lock when the tracer process dies while a the traced process is running on a dirty scheduler.

    Own Id: OTP-14938

  • More crash dump info such as: process binary virtual heap stats, full info for process causing out-of-mem during GC, more port related info, and dirty scheduler info.

    Own Id: OTP-14820

  • Improve search algorithm of abandoned memory carriers. Instead of limited linear search, each allocator instance maintain a balanced search tree of all its abandoned carriers for faster and more exhaustive search.

    Own Id: OTP-14915 Aux Id: ERIERL-88

  • New erts_alloc command line options +M_acnl and +M_acfml to limit carrier abandonment.

    Own Id: OTP-14916 Aux Id: ERIERL-88

  • New family of erts_alloc strategies: Age Order First Fit. Similar to "address order", but instead the oldest possible carrier is always chosen for allocation.

    Own Id: OTP-14917 Aux Id: ERIERL-88

  • Add possibility to change allocator options at runtime with system_info(erts_alloc, ...). Only option sbct (single block carrier threshold) is currently supported via this interface.

    Own Id: OTP-14918 Aux Id: ERIERL-88

  • Extra internal consistency checks wrt communication with erl_child_setup process.

    Own Id: OTP-15488 Aux Id: ERIERL-231

  • Fix a bug in tracing where the {caller} match spec function would be set to undefined incorrectly when used in conjunction with return_to or return_trace on some functions.

    The functions effected are: erlang:put/2, erlang:erase/1, erlang:process_info/1,2, erlang:nif_load/2, erts_internal:garbage_collection/1 and erts_internal:check_process_code/1.

    Because of this bug, the analysis done by fprof could become incorrect when the functions above are the tail-call in a function.

    Own Id: OTP-14677

  • Fix emulator deadlock that would happen if trap_exit was set to true and a process sends an exit signal to itself using exit(self(), Reason) while receive tracing was enabled for that process.

    Own Id: OTP-14678 Aux Id: ERL-495

  • Writing of crash dumps is significantly faster.

    Maps are now included in crash dumps.

    Constants terms would only be shown in one process, while other processes referencing the same constant term would show a marker for incomplete heap.

    Own Id: OTP-14685 Aux Id: OTP-14611, OTP-14603, OTP-14595

  • The fallback home directory for windows has been changed to be the PROFILE directory instead of the WINDOWS directory. The fallback is used when the environment variables HOMEDRIVE and HOMEPATH have not been set.

    Own Id: OTP-14691

  • Fix bug for hipe compiled code using <<X/utf32>> binary construction that could cause faulty result or even VM crash.

    On architectures other than x86_64, code need to be recompiled to benefit from this fix.

    Own Id: OTP-14740

  • Fixed bug in erlang:garbage_collect/2 and erlang:check_process_code/3, when called with option {async,ReqestId}. Could cause VM crash or heap corruption if RequestId was an immediate term (like a pid, atom or small integer). Bug exists since OTP-17.0.

    Own Id: OTP-14752

  • ERL_NIF_MINOR_VERSION wasn't bumped with the addition of enif_ioq_*.

    Own Id: OTP-14779

  • Purging of loaded code that contained "fake literals" (for example the magic reference obtained from 'ets:new/2') would crash the runtime system. Corrected.

    Own Id: OTP-14791

  • Setting the size of the atom table to a number near 2147483647 (using the '+t' option) would cause the emulator to exit with a failure to allocate a huge amount of memory. This has been corrected. Also the usage message for the '+t' option has been corrected to show the correct upper limit 2147483647 instead of 0.

    Own Id: OTP-14796

  • Fixed a bug that prevented registered process names from being resolved in lcnt results.

    Own Id: OTP-14803

  • Formatting bugs were fixed in several HiPE debug BIFs.

    Own Id: OTP-14804

  • Binaries and some other data in crash dumps are now encoded in base64 (instead of in hex), which will reduce the size of crash dumps.

    A few bugs in the handling of sub binaries in crashdump_viewer have been fixed.

    Own Id: OTP-14686

  • Micro optimization for send operations of messages to other nodes. The local ack-message, which is otherwise sent back from TPC/IP port driver to sending client process, is now ignored earlier for distributed send operations.

    Own Id: OTP-14689

  • Fixed a bug in file closure on Unix; close(2) was retried on EINTR which could cause a different (recently opened) file to be closed as well.

    Own Id: OTP-14775

  • A race-condition when tearing down a connection with active node monitors could cause the runtime system to crash.

    This bug was introduced in ERTS version 8.0 (OTP 19.0).

    Own Id: OTP-14781 Aux Id: OTP-13047

  • Microstate accounting sometimes produced incorrect results for dirty schedulers.

    Own Id: OTP-14707

  • Fixed a regression in zlib:gunzip/1 that prevented it from working when the decompressed size was a perfect multiple of 16384. This regression was introduced in 20.1.1

    Own Id: OTP-14730 Aux Id: ERL-507

  • Fixed a memory corruption bug in enif_inspect_iovec; writable binaries stayed writable after entering the iovec.

    Own Id: OTP-14745

  • Fixed a crash in enif_inspect_iovec on encountering empty binaries.

    Own Id: OTP-14750

  • zlib:deflateParams/3 will no longer return buf_error when called after zlib:deflate/2 with zlib 1.2.11.

    Own Id: OTP-14751

  • Added zlib:set_controlling_process/2 to move a zstream() between processes.

    Own Id: OTP-14672 Aux Id: ERL-494

  • Fix so that schedulers are bound correctly when the first available cpu is not the first detected cpu. e.g. when using "taskset -c X..Y" when X is not equal to 0.

    Own Id: OTP-14694

  • Fixed bug that could cause a VM crash when a corrupt message is received on distribution channel from other node.

    Own Id: OTP-14661 Aux Id: ERIERL-80

  • The new zlib module returned a data_error when inflating concatenated streams, which was incompatible with the old module's behavior of returning the uncompressed data up to the end of the first stream.

    Own Id: OTP-14648

  • zlib:gunzip/1 will no longer stop at the end of the first stream when decompressing concatenated gzip files.

    Own Id: OTP-14649

  • Changed erlang:apply/2 to raise a badarg exception if the second argument is not a proper list. Previous behavior was a misleading undef exception.

    Own Id: OTP-14490 Aux Id: ERL-432

  • On macOS, crypto would crash if observer had been started before crypto. On the beta for macOS 10.13 (High Sierra), crypto would crash. Both of those bugs have been fixed.

    Own Id: OTP-14499 Aux Id: ERL-251 ERL-439

  • Fixed bug in enif_whereis_pid/port that could cause heap corruption in rare cases.

    Own Id: OTP-14523

  • Fix so that trace messages generated when in a dirty nif are flushed correctly when the dirty nif is done executing.

    Own Id: OTP-14538

  • Fix escape code handling when using ANSI color codes in the shell.

    Own Id: OTP-14549 Aux Id: PR1536

  • Upgraded the ERTS internal PCRE library from version 8.40 to version 8.41. See http://pcre.org/original/changelog.txt for information about changes made to PCRE. This library implements major parts of the re regular expressions module.

    Own Id: OTP-14574

  • Fixed a bug causing statistics(runtime) to produce negative values and a bug in statistics(wall_clock) causing it to produce values one second too long.

    statistics(runtime) now also use getrusage() as source when available preventing the returned value from wrapping as frequent as before.

    Own Id: OTP-14597 Aux Id: ERL-465

  • Fixed small memory leak that could occur when sending to a terminating port.

    Own Id: OTP-14609

  • Fix bug causing VM crash when a module with -on_load directive is loaded while erlang:trace(on_load, ...) is enabled.

    Own Id: OTP-14612

  • A warning that the compiler may optimize away atoms have been added to the documentation of list_to_existing_atom/1 and binary_to_existing_atom/2.

    Own Id: OTP-14614 Aux Id: ERL-453

  • Lock counting can now be fully toggled at runtime in the lock counting emulator (-emu_type lcnt). Everything is enabled by default to match the old behavior, but specific categories can be toggled at will with minimal runtime overhead when disabled. Refer to the documentation on lcnt:rt_mask/1 for details.

    Own Id: OTP-13170

  • The zlib module has been refactored and all its operations will now yield appropriately, allowing them to be used freely in concurrent applications.

    The following functions have been deprecated, but will not produce compiler warnings until OTP 21: zlib:adler32, zlib:crc32, zlib:inflateChunk, zlib:getBufSize, zlib:setBufSize.

    The behavior of throwing an error when a dictionary is required for decompression has also been deprecated. Refer to the documentation on inflateSetDictionary/2 for details.

    Own Id: OTP-14185

  • lcnt:collect and lcnt:clear will no longer block all other threads in the runtime system.

    Own Id: OTP-14412

  • Add erlang:iolist_to_iovec/1, which converts an iolist() to an erlang:iovec(), which suitable for use with enif_inspect_iovec.

    Own Id: OTP-14520

  • When provided with bad arguments, the zlib module will now raise named exceptions instead of just badarg. For example, not_initialized when using zlib:inflate/2 with an uninitialized stream.

    Own Id: OTP-14527

  • erlang:halt/2 allows any Unicode string as slogan for the crash dump.

    Own Id: OTP-14553

  • Add new nif API functions for managing an I/O Queue. The added functions are:

    Own Id: OTP-14598

  • Fixed bug in binary_to_term and binary_to_atom that could cause VM crash. Typically happens when the last character of an UTF8 string is in the range 128 to 255, but truncated to only one byte. Bug exists in binary_to_term since ERTS version 5.10.2 (OTP_R16B01) and binary_to_atom since ERTS version 9.0 (OTP-20.0).

    Own Id: OTP-14590 Aux Id: ERL-474

  • A timer internal bit-field used for storing scheduler id was too small. As a result, VM internal timer data structures could become inconsistent when using 1024 schedulers on the system. Note that systems with less than 1024 schedulers are not effected by this bug.

    This bug was introduced in ERTS version 7.0 (OTP 18.0).

    Own Id: OTP-14548 Aux Id: OTP-11997, ERL-468

  • Automatic cleanup of a BIF timer, when the owner process terminated, could race with the timeout of the timer. This could cause the VM internal data structures to become inconsistent which very likely caused a VM crash.

    This bug was introduced in ERTS version 9.0 (OTP 20.0).

    Own Id: OTP-14554 Aux Id: OTP-14356, ERL-468

  • Binary append operations did not check for overflow, resulting in nonsensical results when huge binaries were appended.

    Own Id: OTP-14524

  • Added missing release notes for OTP-14491 ("performance bug in pre-allocators") which was included in erts-9.0.1 (OTP-20.0.1).

    Own Id: OTP-14494

  • Fixed a bug that prevented TCP sockets from being closed properly on send timeouts.

    Own Id: OTP-14509

  • Fixed bug in operator bxor causing erroneuos result when one operand is a big negative integer with the lowest N*W bits as zero and the other operand not larger than N*W bits. N is an integer of 1 or larger and W is 32 or 64 depending on word size.

    Own Id: OTP-14514

  • Fixed a bug in gen_tcp:send where it never returned when repeatedly called on a remotely closed TCP socket.

    Own Id: OTP-13939 Aux Id: ERL-193

  • Fixed segfault that could happen during cleanup of aborted erlang:port_command/3 calls. A port_command is aborted if the port is closed at the same time as the port_command was issued. This bug was introduced in erts-8.0.

    Own Id: OTP-14481

  • Fixed implementation of statistics(wall_clock) and statistics(runtime) so that values do not unnecessarily wrap due to the emulator. Note that the values returned by statistics(runtime) may still wrap due to limitations in the underlying functionality provided by the operating system.

    Own Id: OTP-14484

  • Fix performance bug in pre-allocators that could cause them to permanently fall back on normal more expensive memory allocation. Pre-allocators are used for quick allocation of short lived meta data used by messages and other scheduled tasks. Bug exists since OTP_R15B02. [this release note was missing in erts-9.0.1]

    Own Id: OTP-14491

  • Fix various bugs regarding loading, upgrade and purge of HiPE compiled code:

    • The native code memory for a purged module was never deallocated.
    • Wrong functions could in some cases be called after a module upgrade.
    • erlang:check_process_code did not check for recursive calls made from native code.

    Own Id: OTP-13968

  • Hipe optional LLVM backend does require LLVM version 3.9 or later as older versions forced strong dependencies on erts internals structures.

    Own Id: OTP-14238

  • When an exception such as 'throw(HugeTerm)' was caught, HugeTerm term would be kept in the process until the next exception occurred, potentially increasing the heap size for the process. That has been corrected.

    Own Id: OTP-14255 Aux Id: OTP-14400, OTP-14401

  • Slogans in crash dumps have been extended to print more complex terms.

    Own Id: OTP-14303

  • Fixed bug when using enif_inspect_binary in combination with enif_copy. In some circumstances the inspected binary could be reallocated by the enif_copy call when it shouldn't have been.

    Own Id: OTP-14304

  • The address family local (AF_UNIX / AF_LOCAL) now does not ensure zero termination of Linux Abstract Addresses so they can use all bytes.

    Own Id: OTP-14305

  • Use -fno-PIE for Gentoo Hardened and others that don't accept linker flag -no-pie.

    Own Id: OTP-14307 Aux Id: PR-1379

  • Disable hipe for ppc64le architecture (little endian) as it is not, and has never been, supported. It was earlier equated with ppc64 (big endian) which lead to broken build without --disable-hipe.

    Own Id: OTP-14314 Aux Id: ERL-369, PR-1394

  • Fix 'epmd -kill' to return a failure exit status code if epmd was not killed because of some error.

    Own Id: OTP-14324

  • Fixed the following dirty scheduler related bugs:

    • the +SDPcpu command line argument could cause the amount of dirty CPU schedulers to be set to zero

    • erlang:system_flag(multi_scheduling, _) failed when only one normal scheduler was used together with dirty scheduler support

    Own Id: OTP-14335

  • Fix erlexec to handle mismatch in sysconf and proc fs when figuring out the cpu topology. This behaviour has been seen when using docker together with --cpuset-cpus.

    Own Id: OTP-14352

  • Fixed memory segment cache used for multiblock carriers. Huge (> 2GB) memory segments could cause a VM crash. Creation of such huge memory segments used for multiblock carriers is however very uncommon.

    Own Id: OTP-14360 Aux Id: ERL-401, PR-1417

  • Fix bug causing code:is_module_native to falsely return true when local call trace is enabled for the module.

    Own Id: OTP-14390

  • Fix emulator crash when receive tracing on a trace_delivered message.

    Own Id: OTP-14411

  • Fix file:sendfile error handling on SunOS when a connection is closed during transmission.

    Own Id: OTP-14424

  • escript did not handle paths with spaces correct.

    Own Id: OTP-14433

  • Fix erroneous lock check assertion when wx is run on MacOS X.

    Own Id: OTP-14437 Aux Id: ERL-360

  • Active-mode TCP sockets are now cleaned up properly on send/shutdown errors.

    Own Id: OTP-14441 Aux Id: ERL-430

  • Fix compilation of hipe_mkliterals when the LIBS configure variable had to be set.

    Own Id: OTP-14447

  • Added erlang:garbage_collect/2 that takes an option list as the last argument that can be used to control whether a minor or a major garbage collection is to be done. Doing a minor collection only collects terms that have recently died, but is cheaper than a major collection.

    Own Id: OTP-11695

  • Optimized test for tuples with an atom as first element.

    Own Id: OTP-12148

  • Erlang literals are no longer copied during process to process messaging.

    Own Id: OTP-13529

  • Add support in the erl_nif API for asynchronous message notifications when sockets or other file descriptors are ready to accept read or write operations. The following functions have been added:

    • enif_select

    • enif_monitor_process

    • enif_demonitor_process

    • enif_compare_monitors

    • enif_open_resource_type_x

    Own Id: OTP-13684

  • There are two new guard BIFs 'floor/1' and 'ceil/1'. They both return integers. In the 'math' module, there are two new BIFs with the same names that return floating point values.

    Own Id: OTP-13692

  • Remove deprecated erlang:hash/2.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-13827

  • Replaced usage of deprecated symbolic time unit representations.

    Own Id: OTP-13831 Aux Id: OTP-13735

  • Added support in zlib for extraction of the inflation dictionary.

    Own Id: OTP-13842

  • The previously used purge strategy has been removed. The optional purge strategy introduced in ERTS version 8.1 is now the only strategy available.

    The new purge strategy is slightly incompatible with the old strategy. Previously processes holding funs that referred to the module being purged either failed a soft purge, or was killed during a hard purge. The new strategy completely ignores funs. If funs referring to the code being purged exist, and are used after a purge, an exception will be raised upon usage. That is, the behavior will be exactly the same as the case when a fun is received by a process after the purge.

    For more information see the documentation of erlang:check_process_code/3.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-13844 Aux Id: OTP-13833

  • Dirty schedulers are now enabled by default when the runtime system is built with SMP support.

    Own Id: OTP-13860

  • Improved ETS lookup/insert/delete speed for large set, bag and duplicate_bag by a significant reduction of the hash load factor. This speed improvement comes at the expense of less than one word per table entry. Tables with less than 256 entries are not affected at all.

    Own Id: OTP-13903

  • The NIF library reload feature is not supported anymore. It has been marked as deprecated since OTP R15B. This means that you are only allowed to do one successful call to erlang:load_nif/2 for each module instance. A second call to erlang:load_nif/2 will return {error, {reload, _}} even if the NIF library implements the reload callback.

    Runtime upgrade of a NIF library is still supported by using the Erlang module upgrade mechanics with a current and an old module instance existing at the same time with their corresponding NIF libraries.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-13908

  • Add erlang:system_info(atom_count) and erlang:system_info(atom_limit) to provide a way to retrieve the current and maximum number of atoms.

    Own Id: OTP-13976

  • The function fmod/2 has been added to the math module.

    Own Id: OTP-14000

  • erlang:load_nif/2 returns new error type notsup when called for a HiPE compiled module, which is not supported.

    Own Id: OTP-14002

  • Add driver and nif lock instrumentation to lcnt

    Own Id: OTP-14069

  • Reduce memory pressure by converting sub-binaries to heap-binaries when possible. This is done during garbage collection.

    Own Id: OTP-14149

  • Dirty schedulers are now enabled and supported on Erlang runtime systems with SMP support.

    Besides support for dirty NIFs also support for dirty BIFs and dirty garbage collection have been introduced. All garbage collections that potentially will take a long time to complete are now performed on dirty schedulers if enabled.

    erlang:statistics/1 with arguments inspecting scheduler and run queue states have been changed due to the dirty scheduler support. Code using this functionality may have to be rewritten taking these incompatibilities into consideration. Examples of such uses are calls to erlang:statistics(scheduler_wall_time), statistics(total_run_queue_lengths), statistics(total_active_tasks), etc.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-14152

  • Atoms may now contain arbitrary Unicode characters.

    Own Id: OTP-14178

  • Introduce an event manager in Erlang to handle OS signals. A subset of OS signals may be subscribed to and those are described in the Kernel application.

    Own Id: OTP-14186

  • The escript program now handles symbolic links to escripts.

    This is useful for standalone systems with escripts residing on a bin directory not included in the execution path (as it may cause their erl program(s) to override the desired one). Instead the escripts can be referred to via symbolic links from a bin directory in the path.

    Own Id: OTP-14201 Aux Id: PR-1293

  • All uses of the magic binary kludge has been replaced by uses of erlang references.

    A magic binary was presented as an empty binary, but actually referred other data internally in the Erlang VM. Since they were presented as empty binaries, different magic binaries compared as equal, and also lost their internal data when passed out of an erlang node.

    The new usage of references has not got any of these strange semantic issues, and the usage of these references has been optimized to give the same performance benefits as well as memory usage benefits as magic binaries had.

    A couple of examples of previous uses of magic binaries are match specifications and NIF resources.

    Own Id: OTP-14205

  • The non-smp emulators have been deprecated and are scheduled for removal in OTP-21.

    In preparation for this, the threaded non-smp emulator is no longer built by default and has to be enabled using the --enable-plain-emulator to configure.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-14272

  • Allow HiPE to run on VM built with --enable-m32-build.

    Own Id: OTP-14330 Aux Id: PR-1397

  • Upgraded the OTP internal PCRE library from version 8.33 to version 8.40. This library is used for implementation of the re regular expressions module.

    Besides various bug fixes, the new version allows for better stack protection. In order to utilize this feature, the stack size of normal scheduler threads is now by default set to 128 kilo words on all platforms. The stack size of normal scheduler threads can be set upon system start by passing the +sss command line argument to the erl command.

    See http://pcre.org/original/changelog.txt for information about changes made to PCRE between the versions 8.33 and 8.40.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-14331 Aux Id: ERL-208

  • Remove generation of atoms in old latin1 external format in the distribution between erlang nodes, erl_interface, and jinterface. The new utf8 format for atoms was introduced in OTP R16. An OTP 20 node can therefore not connect to nodes older than R16.

    Atoms that can be encoded using latin1 are still encoded by term_to_binary() using latin1 encoding. Note that all atoms will by default be encoded using utf8 in a future Erlang/OTP release. For more information see the documentation of erlang:term_to_binary/2.

    Own Id: OTP-14337

  • Added function re:version/0 which returns information about the OTP internal PCRE version used for implementation of the re module.

    Own Id: OTP-14347 Aux Id: PR-1412

  • Added new debug bif erlang:list_to_port/1.

    Own Id: OTP-14348

  • Various improvements of timer management internally in the VM. These improvements both reduced memory consumption of timer wheels as well as reduce the amount of work that has to be performed in order to handle timers.

    Own Id: OTP-14356

  • Sockets can now be bound to device (SO_BINDTODEVICE) on platforms where it is supported.

    This has been implemented e.g to support VRF-Lite under Linux; see VRF , and GitHub pull request #1326.

    Own Id: OTP-14357 Aux Id: PR-1326

  • Added the following erl command line arguments with which you can set suggested stack for dirty schedulers:

    +sssdcpu

    for dirty CPU schedulers

    +sssdio

    for dirty IO schedulers

    The default suggested stack size for dirty schedulers is 40 kilo words.

    Own Id: OTP-14380

  • Changed erts startup program name, argv 0, to use the environment variable ESCRIPT_NAME so that erlc, dialyzer, typer, ct_run, or the escript name can be seen with external programs, such as ps and htop (depending on options), on unix.

    Own Id: OTP-14381

  • Improvements of escript documentation.

    Own Id: OTP-14384 Aux Id: OTP-14201

  • Add function enif_hash for NIFs to calculate hash values of arbitrary terms.

    Own Id: OTP-14385 Aux Id: PR-1413

  • './configure --enable-lock-counter' will enabling building of an additional emulator that has support for lock counting. (The option previously existed, but would turn on lock counting in the default emulator being built.) To start the lock-counting emulator, use 'erl -emu_type lcnt'.

    On Windows, erl recognized the undocumented option -debug for starting a debug-compiled emulator. That option has been removed. Use 'erl -emu_type debug' instead.

    Own Id: OTP-14407

  • Warnings have been added to the relevant documentation about not using un-secure distributed nodes in exposed environments.

    Own Id: OTP-14425

  • Improvement of the documentation of the environment variable ERL_CRASH_DUMP_SECONDS as well as the default behavior when it is not set.

    Own Id: OTP-14434

  • Enabled off-heap message queue for some system processes that might receive large amounts of messages.

    Own Id: OTP-14438

  • ETS lock indexes have been replaced with the table name in LCNT results.

    Own Id: OTP-14442 Aux Id: ERIERL-22

  • Introduced the new functions enif_whereis_pid() and enif_whereis_port().

    Own Id: OTP-14453 Aux Id: PR-1400

  • Fixed bug in operator band of two negative operands causing erroneous result if the absolute value of one of the operands have the lowest N*W bits as zero and the other absolute value is not larger than N*W bits. N is an integer of 1 or larger and W is 32 or 64 depending on word size.

    Own Id: OTP-15487 Aux Id: ERL-804

  • Added an optional ./configure flag to compile the emulator with spectre mitigation: --with-spectre-mitigation

    Note that this requires a recent version of GCC with support for spectre mitigation and the --mindirect-branch=thunk flag, such as 8.1.

    Own Id: OTP-15430 Aux Id: ERIERL-237

  • Fixed small memory leak that could occur when sending to a terminating port.

    Own Id: OTP-14609 Aux Id: ERIERL-238

  • Fixed a race condition in the inet driver that could cause receive to hang when the emulator was compiled with gcc 8.

    Own Id: OTP-15158 Aux Id: ERL-654

  • Fixed a bug causing some Erlang references to be inconsistently ordered. This could for example cause failure to look up certain elements with references as keys in search data structures. This bug was introduced in R13B02.

    Thanks to Simon Cornish for finding the bug and supplying a fix.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-15225

  • Fixed a bug in file closure on Unix; close(2) was retried on EINTR which could cause a different (recently opened) file to be closed as well.

    Own Id: OTP-14775

  • A race-condition when tearing down a connection with active node monitors could cause the runtime system to crash.

    This bug was introduced in ERTS version 8.0 (OTP 19.0).

    Own Id: OTP-14781 Aux Id: OTP-13047

  • A timer internal bit-field used for storing scheduler id was too small. As a result, VM internal timer data structures could become inconsistent when using 1024 schedulers on the system. Note that systems with less than 1024 schedulers are not effected by this bug.

    This bug was introduced in ERTS version 7.0 (OTP 18.0).

    Own Id: OTP-14548 Aux Id: OTP-11997, ERL-468

  • Fixed bug in binary_to_term and binary_to_atom that could cause VM crash. Typically happens when the last character of an UTF8 string is in the range 128 to 255, but truncated to only one byte. Bug exists in binary_to_term since ERTS version 5.10.2 (OTP_R16B01) and binary_to_atom since ERTS version 9.0 (OTP-20.0).

    Own Id: OTP-14590 Aux Id: ERL-474

  • Fix bug causing VM crash when a module with -on_load directive is loaded while erlang:trace(on_load, ...) is enabled.

    Own Id: OTP-14612

  • Fixed bug that could cause a VM crash when a corrupt message is received on distribution channel from other node.

    Own Id: OTP-14661 Aux Id: ERIERL-80

  • Fix performance bug in pre-allocators that could cause them to permanently fall back on normal more expensive memory allocation. Pre-allocators are used for quick allocation of short lived meta data used by messages and other scheduled tasks. Bug exists since OTP_R15B02.

    Own Id: OTP-14491

  • Fixed a bug that prevented TCP sockets from being closed properly on send timeouts.

    Own Id: OTP-14509

  • Fixed bug in operator bxor causing erroneuos result when one operand is a big negative integer with the lowest N*W bits as zero and the other operand not larger than N*W bits. N is an integer of 1 or larger and W is 32 or 64 depending on word size.

    Own Id: OTP-14514

  • Fixed a bug in gen_tcp:send where it never returned when repeatedly called on a remotely closed TCP socket.

    Own Id: OTP-13939 Aux Id: ERL-193

  • Fixed segfault that could happen during cleanup of aborted erlang:port_command/3 calls. A port_command is aborted if the port is closed at the same time as the port_command was issued. This bug was introduced in erts-8.0.

    Own Id: OTP-14481

  • Fixed implementation of statistics(wall_clock) and statistics(runtime) so that values do not unnecessarily wrap due to the emulator. Note that the values returned by statistics(runtime) may still wrap due to limitations in the underlying functionality provided by the operating system.

    Own Id: OTP-14484

  • Active-mode TCP sockets are now cleaned up properly on send/shutdown errors.

    Own Id: OTP-14441 Aux Id: ERL-430

  • A code purge operation could under certain circumstances expand the size of hibernated processes.

    Own Id: OTP-14444 Aux Id: ERIERL-24

  • Fix so that the ERL_ZZ_SIGTERM_KILL introduced in erts-8.3.4 works.

    Own Id: OTP-14451

  • Add option to make SIGTERM trigger the OS default behaviour instead of doing a graceful shutdown. To activate this bahviour the environment variable ERL_ZZ_SIGTERM_KILL should be set to "true". This option only works in OTP 19 as OTP 20 will have a different way to deal with SIGTERM.

    Own Id: OTP-14418 Aux Id: ERIERL-15

  • Fixed memory segment cache used for multiblock carriers. Huge (> 2GB) memory segments could cause a VM crash. Creation of such huge memory segments used for multiblock carriers is however very uncommon.

    Own Id: OTP-14360 Aux Id: ERL-401, PR-1417

  • Fix release note for OTP-14290 in ERTS version 8.3.1. It was erroneously placed under "Known Bugs and Problems".

    Own Id: OTP-14363 Aux Id: OTP-14290

  • The +Bi command line argument of erl erroneously caused SIGTERM to be ignored by the VM as well as of all its child processes. This bug was introduced in erts version 8.3.

    Own Id: OTP-14358 Aux Id: OTP-14085

  • Invoking init:stop/0 via the SIGTERM signal, in a non-SMP BEAM, could cause BEAM to terminate with fatal error. This has now been fixed and the BEAM will terminate normally when SIGTERM is received.

    Own Id: OTP-14290

  • Trying to open a directory with file:read_file/1 on Unix leaked a file descriptor. This bug has now been fixed.

    Own Id: OTP-14308 Aux Id: ERL-383

  • Fixed a number of bugs that caused faulty stack-traces to be generated. The faulty stack traces were generated either when applying the following functions or tracing the following functions:

    • erlang:error/1
    • erlang:error/2
    • erlang:exit/1
    • erlang:throw/1

    Own Id: OTP-14055

  • Corrected documentation about memory footprint for maps.

    Own Id: OTP-14118

  • Fix process_info(Pid, current_stacktrace) to use stack depth limit set by system_flag(backtrace_depth). The old behavior was a hard coded depth limit of 8.

    Own Id: OTP-14119 Aux Id: PR-1263

  • A process calling erlang:system_flag(multi_scheduling, block) could end up hanging forever in the call.

    Own Id: OTP-14121

  • Dirty scheduler bug fixes:

    • Fixed call time tracing of process being scheduled on dirty scheduler.

    • GC info from dirty schedulers.

    • Multi scheduling block with dirty schedulers could crash the runtime system.

    • Process structures could be removed prematurely.

    • GC on dirty scheduler could crash the runtime system.

    • Termination of a process executing on a dirty scheduler could cause a runtime system crash.

    Own Id: OTP-14122

  • Fixed crash that occurred when writing timer data to a crash dump.

    Own Id: OTP-14133

  • A literal area could be removed while still referred from processes.

    Own Id: OTP-14134

  • Fixed a bug in the garbage collector that could crash the runtime system.

    Own Id: OTP-14135

  • Fixed a bug in call-time trace for NIFs which caused tracing to erroneously be started multiple times for one call.

    Own Id: OTP-14136

  • Remove a debug printout and an unnecessary garbage collection when handling exceptions in hipe compiled code.

    Own Id: OTP-14153

  • Fix bug in tracing of garbage collection that could cause VM crash. Bug exists since OTP 19.0.

    Own Id: OTP-14154

  • Fix bug in binary_to_term for binaries created by term_to_binary with option compressed. The bug can cause badarg exception for a valid binary when Erlang VM is linked against a zlib library of version 1.2.9 or newer. Bug exists since OTP 17.0.

    Own Id: OTP-14159 Aux Id: ERL-340

  • Fix suspension of schedulers when generating a crashdump.

    Own Id: OTP-14164

  • NIF resources was not handled in a thread-safe manner in the runtime system without SMP support.

    As a consequence of this fix, the following driver functions are now thread-safe also in the runtime system without SMP support:

    • driver_free_binary()

    • driver_realloc_binary()

    • driver_binary_get_refc()

    • driver_binary_inc_refc()

    • driver_binary_dec_refc()

    Own Id: OTP-14202

  • Fix erlang:round/1 for large floating point numbers with an odd absolute value between (1 bsl 52) and (1 bsl 53). The result was falsely calculated as the next higher even number even though all integer values up to (1 bsl 53) can be represented as floats with full precision.

    Own Id: OTP-14227

  • Add size of literals to module code size in crash dump and (l)oaded command in break menu like it used to be before OTP-19.0.

    Own Id: OTP-14228

  • Fix potential bug in enif_send when called without a process context and with argument msg_env as NULL.

    Own Id: OTP-14229

  • Fix bug where passing an appendable binary to erlang:port_control() could crash the emulator.

    Own Id: OTP-14231

  • Receive expressions with timeout in the Erlang shell could cause a VM crash.

    Own Id: OTP-14241 Aux Id: ERL-365

  • A received SIGTERM signal to beam will generate a 'stop' message to the init process and terminate the Erlang VM nicely. This is equivalent to calling init:stop/0.

    Own Id: OTP-14085

  • Workaround for buggy Android implementation of PTHREAD_STACK_MIN causing build of runtime system to crash on undeclared PAGE_SIZE.

    Own Id: OTP-14165 Aux Id: ERL-319

  • Add configure option --without-thread-names that removes the naming of individual emulator threads.

    Own Id: OTP-14234

  • Add warning in documentation of zlib:deflateInit/6 about option WindowsBits values 8 and -8.

    Own Id: OTP-14254 Aux Id: ERL-362

  • Fix bug in binary_to_term for binaries created by term_to_binary with option compressed. The bug can cause badarg exception for a valid binary when Erlang VM is linked against a zlib library of version 1.2.9 or newer. Bug exists since OTP 17.0.

    Own Id: OTP-14159 Aux Id: ERL-340

  • The driver efile_drv when opening a file now use fstat() on the open file instead of stat() before opening, if fstat() exists. This avoids a race when the file happens to change between stat() and open().

    Own Id: OTP-14184 Aux Id: seq-13266

  • Fix a quite rare bug causing VM crash during code loading and the use of export funs (fun M:F/A) of not yet loaded modules. Requires a very specific timing of concurrent scheduler threads. Has been seen on ARM but can probably also occurred on other architectures. Bug has existed since OTP R16.

    Own Id: OTP-14144 Aux Id: seq13242

  • Fixed configure failures on MacOSX. Most important clock_gettime() was detected when building for MacOSX - El Capitan using XCode 8 despite it is not available until MacOSX - Sierra.

    Own Id: OTP-13904 Aux Id: ERL-256

  • code:add_pathsa/1 and command line option -pa both revert the given list of directories when adding it at the beginning of the code path. This is now documented.

    Own Id: OTP-13920 Aux Id: ERL-267

  • Fix a compilation error of erts in OpenBSD related to the usage of the __errno variable.

    Own Id: OTP-13927

  • Fixed so that when enabling tracing on a process that had an invalid tracer associated with it, the new tracer overwrites the old tracer. Before this fix, calling erlang:trace/3 would behave as if the tracer was still alive and not apply the new trace.

    This fault was introduced in ERTS 8.0.

    Own Id: OTP-13928

  • Fix parsing of -profile_boot 'true' | 'false'

    Own Id: OTP-13955 Aux Id: ERL-280

  • A slight improvement of erlang:get_stacktrace/0 for exceptions raised in hipe compiled code. Beam compiled functions in such stack trace was earlier replaced by some unrelated function. They are now instead omitted. This is an attempt to reduce the confusion in the absence of a complete and correct stack trace for mixed beam and hipe functions.

    Own Id: OTP-13992

  • Correct type declaration of match specification head.

    Own Id: OTP-13996

  • HiPE code loading failed for x86_64 if gcc was configured with --enable-default-pie. Fixed by disabling PIE, if needed for HiPE, when building the VM.

    Own Id: OTP-14031 Aux Id: ERL-294, PR-1239

  • Faulty arguments could be presented on exception from a NIF that had rescheduled itself using enif_schedule_nif().

    Own Id: OTP-14048

  • The runtime system could crash if a garbage collection on a process was performed immediately after a NIF had been rescheduled using enif_schedule_nif().

    Own Id: OTP-14049

  • A reference to purged code could be left undetected by the purge operation if a process just had rescheduled a NIF call using enif_schedule_nif() when the process was checked. This could cause a runtime system crash.

    Own Id: OTP-14050

  • Fixed a number of dirty scheduler related bugs:

    • Process priority was not handled correct when scheduling on a dirty scheduler.

    • The runtime system could crash when an exit signal with a compound exit reason was sent to a process executing on a dirty scheduler.

    • The runtime system crashed when call tracing a process executing on a dirty scheduler.

    • A code purge operation could end up hanging forever when a process executed on a dirty scheduler

    Own Id: OTP-14051

  • Fix minor soft purge race bug that could incorrectly trigger code_server to load new code for the module if the soft purge failed and no current version of the module existed.

    Own Id: OTP-13925

  • To ease troubleshooting, erlang:load_nif/2 now includes the return value from a failed call to load/reload/upgrade in the text part of the error tuple. The crypto NIF makes use of this feature by returning the source line where/if the initialization fails.

    Own Id: OTP-13951

  • New environment variable ERL_CRASH_DUMP_BYTES can be used to limit the size of crash dumps. If the limit is reached, crash dump generation is aborted and the generated file will be truncated.

    Own Id: OTP-14046

  • A code purge operation could under certain circumstances expand the size of hibernated processes.

    Own Id: OTP-14444 Aux Id: ERIERL-24

  • The emulator got a dynamic library dependency towards libsctp, which on Linux was not intended since the emulator there loads and resolves the needed sctp functions in runtime. This has been fixed and a configure switch --enable-sctp=lib has been added for those who want such a library dependency.

    Own Id: OTP-13956 Aux Id: ERL-262, ERL-133

  • Fix SIGUSR1 crashdump generation

    Do not generate a core when a crashdump is asked for.

    Own Id: OTP-13997

  • The new functions in code that allows loading of many modules at once had a performance problem. While executing a helper function in the erl_prim_loader process, garbage messages were produced. The garbages messages were ignored and ultimately discarded, but there would be a negative impact on performance and memory usage. The number of garbage message depended on both the number of modules to be loaded and the length of the code path.

    The functions affected of this problem were: atomic_load/1, ensure_modules_loaded/1, and prepare_loading/1.

    Own Id: OTP-14009

  • Fix bug for calls from hipe code to BIFs that disable GC while yielding. Has been causing Dialyzer crashes on ARM (and presumably all other non-intel platforms).

    Own Id: OTP-13724 Aux Id: PR-1116

  • Fix a bug where changing the current working directory of the VM would not change the current working directory of programs spawned using erlang:open_port({spawn,""}, ...).

    Own Id: OTP-13733 Aux Id: ERL-175

  • Fix a bug where disabling tracing from a process that had return_to tracing enabled and was tracing on erlang:trace/3 would cause a segmentation fault.

    Own Id: OTP-13734

  • Update all erts documentation to use simpler English, use consistent terminology and be easier to navigate.

    Own Id: OTP-13740

  • Add dirty schedulers to the microstate accounting statistics.

    Own Id: OTP-13744

  • Fixed dirty scheduler build support on 32-bit windows.

    Own Id: OTP-13759

  • inet:getstat(Socket) on an SCTP socket returned 0 for send stats. This bug has now been corrected. Reported by systra as issue ERL-102 on bugs.erlang.org.

    Own Id: OTP-13773 Aux Id: ERL-102

  • AF_UNSPEC and unknown address families were misread by UDP receive in prim_inet resulting in an exception. This bug has now been corrected.

    Own Id: OTP-13775

  • Sweep HiPE stack for literals during code purge.

    Own Id: OTP-13777 Aux Id: PR-1122

  • Fix bug in run_erl for OpenBSD that could cause it on rare occations to exit without starting the program (erl) at all.

    Own Id: OTP-13795

  • Update build scripts to not make assumptions about where env, cp and perl are located.

    Own Id: OTP-13800

  • Fixed a bug where init:stop could deadlock if a process with infinite shutdown timeout (e.g. a supervisor) attempted to load code while terminating.

    Own Id: OTP-13802

  • Fixed a segmentation fault on sparc CPUs when free'ing a tracer module's state.

    Own Id: OTP-13803

  • funs was not properly handled during purge of a module. This could cause a crash of the VM after a purge of a module.

    Own Id: OTP-13809

  • Fixed a memory leak when the process monitoring a port crashed.

    Own Id: OTP-13818

  • Fixed multiple dirty scheduler related tracing bugs.

    Own Id: OTP-13822

  • Fix error handling in beam code runtime loader for a number of cases when index and size fields got corrupted (negative) values.

    Own Id: OTP-13848 Aux Id: ERL-216

  • Minor fix of dirty scheduler implementation.

    Own Id: OTP-13852

  • Calls to erl_drv_send_term() or erl_drv_output_term() from a non-scheduler thread while the corresponding port was invalid caused the emulator to enter an inconsistent state which eventually caused an emulator crash.

    Own Id: OTP-13866

  • Fix a rare race condition in erlang:open_port({spawn, ""}, ...) that would result in the erl_child_setup program aborting and cause the emulator to exit.

    Own Id: OTP-13868

  • Driver and NIF operations accessing processes or ports could cause an emulator crash when used from non-scheduler threads. Those operations are:

    • erl_drv_send_term()
    • driver_send_term()
    • erl_drv_output_term()
    • driver_output_term()
    • enif_send()
    • enif_port_command()

    Own Id: OTP-13869

  • Fix start scripts generation dependency in Makefile

    Own Id: OTP-13871 Aux Id: ERL-241

  • The VM could crash if erlang:get_stacktrace() was called after a rescheduled NIF had thrown an exception.

    Own Id: OTP-13877

  • Calling code:delete/1 before a loading a module with an on_load function, the old code would be overwritten, causing a memory or a crash if NIFs were involved. (Thanks to vans163 for reporting this bug.)

    Own Id: OTP-13893 Aux Id: ERL-240

  • Improved accuracy of timeouts on MacOS X. This by setting premature timeouts followed by a short actual timeout during scheduler wait.

    Own Id: OTP-13698

  • Added the following symbolic time unit representations to the erlang:time_unit() type:

    • second
    • millisecond
    • microsecond
    • nanosecond

    The following symbolic time unit representations are now deprecated, but still part of the erlang:time_unit() type:

    • seconds
    • milli_seconds
    • micro_seconds
    • nano_seconds

    Own Id: OTP-13735

  • Fix maps hashing entropy of maps with maps keys.

    Own Id: OTP-13763 Aux Id: ERL-199

  • Improved dirty scheduler support. A purge of a module can now be performed without having to wait for completion of all ongoing dirty NIF calls.

    Note that when enabling support for dirty schedulers, a new purge strategy will as of ERTS version 8.1 be enabled. This new strategy is not fully backwards compatible with the strategy used by default. For more information see the documentation of erlang:check_process_code/3.

    Own Id: OTP-13808 Aux Id: OTP-13833

  • A new purge strategy has been introduced. The new strategy will by default be disabled during the OTP 19 release, but will be the only strategy available as of the OTP 20 release.

    The new strategy is slightly incompatible with the strategy being used by default in OTP 19. Using the default strategy, processes holding funs that refer to the module being purged either fail a soft purge, or will be killed during a hard purge. The new strategy completely ignores funs. If funs referring to the code being purged exist, and are used after a purge, an exception will be raised upon usage. That is, the behavior will be exactly the same as the case when a fun is received by a process after the purge.

    The new strategy can optionally be enabled when building OTP during OTP 19, and will automatically be enabled if the runtime system is built with support for dirty schedulers.

    For more information see the documentation of erlang:check_process_code/3.

    Own Id: OTP-13833

  • Fixed unnecessary overestimation of heap size need during garbage collection.

    Own Id: OTP-13851

  • Fixed a VM crash that occurred in a garbage collection of a process when it had received binaries. This bug was introduced in ERTS version 8.0 (OTP 19.0).

    Own Id: OTP-13890

  • Fixed a VM crash that occurred in garbage collection of a process when it had received maps over the distribution. This bug was introduced in ERTS version 8.0 (OTP 19.0).

    Own Id: OTP-13889

  • Fixed a race that could cause a lost wakeup of a process that timed out in a receive ... after. This bug was introduced in ERTS version 7.0.

    Own Id: OTP-13798 Aux Id: OTP-11997

  • Fixed segfault after writing an erl crash dump.

    Own Id: OTP-13799

  • Fix scheduler deadlock bug in ets:update_counter/4 when key is not found and inserting the default object causes the table to grow.

    Own Id: OTP-13731 Aux Id: ERL-188

  • Fix VM abort "Overrun stack and heap" in garbage collection triggered by a bsl operation and some very specific heap conditions.

    Own Id: OTP-13732 Aux Id: seq13142

  • A memory allocation bug in group_leader/2 could cause an emulator crash when garbage collecting a process that had been assigned a remote group leader. This bug was introduced in ERTS version 8.0.

    Own Id: OTP-13716

  • The handling of on_load functions has been improved. The major improvement is that if a code upgrade fails because the on_load function fails, the previous version of the module will now be retained.

    Own Id: OTP-12593

  • is_builtin(erlang, apply, 3) will now return true.

    Own Id: OTP-13034

  • Fix enif_get_list_length to return false if list is improper or have length larger than UINT_MAX (did return true and an incorrect length value).

    Own Id: OTP-13288 Aux Id: PR913

  • Cleanup hipe signal handling code for x86 and make it more portable.

    Own Id: OTP-13341 Aux Id: PR951

  • Make file:datasync use fsync instead of fdatasync on Mac OSX.

    Own Id: OTP-13411

  • Make sure to create a crash dump when running out of memory. This was accidentally removed in the erts-7.3 release.

    Own Id: OTP-13419

  • A bug has been fixed where if erlang was started +B on a unix platform it would be killed by a SIGUSR2 signal when creating a crash dump.

    Own Id: OTP-13425

  • Fix race between process_flag(trap_exit,true) and a received exit signal.

    A process could terminate due to exit signal even though process_flag(trap_exit,true) had returned. A very specific timing between call to process_flag/2 and exit signal from another scheduler was required for this to happen.

    Own Id: OTP-13452

  • Don't search for non-existing Map keys twice

    For maps:get/2,3 and maps:find/2, searching for an immediate key, e.g. an atom, in a small map, the search was performed twice if the key did not exist.

    Own Id: OTP-13459

  • When an abnormally large distribution message is about to be sent, the VM has been changed to create a crash dump instead of a core dump.

    Own Id: OTP-13474

  • Fix erlang:process_info/2 type specification

    Own Id: OTP-13485 Aux Id: ERL-123

  • Fix bug in open_port/2 with option {args, List}. A vm crash could be caused by an improper List.

    Own Id: OTP-13489 Aux Id: ERL-127

  • Fixed a race-condition bug where the emulator could crash when erlang:system_profile/1,2 was enabled and a process had to be re-scheduled during termination.

    Own Id: OTP-13494 Aux Id: ERL-126

  • Fixed bugs where the reduction counter was not handled correct.

    Own Id: OTP-13512

  • Fixed typo in description of the EPMD_DUMP_REQ response.

    Own Id: OTP-13517

  • Fixed a bug where a process flagged as sensitive would sometimes record its save_calls when it shouldn't.

    Own Id: OTP-13540

  • Update configure scripts to not use hard-coded path for /bin/pwd and /bin/rm.

    Own Id: OTP-13562

  • When passing a larger binary than the outputv callback of a linked-in driver can handle in one io vector slot, the binary is now split into multiple slots in the io vector. This change only effects system where the max size of an io vector slot is smaller then the word size of the system (e.g. Windows).

    This change means that it is now possible on Windows to send binaries that are larger than 4GB to port_command, which is what is used for file:write, gen_tcp:send etc.

    Own Id: OTP-13628

  • Workaround of Maps output in crashdumps. Currently the atom 'undefined' is generated instead of Map data if a Map type is encountered during crash.

    Own Id: OTP-13657

  • The tracing support has been extended to allow a tracer module to be the trace event handler instead of a process or port. The tracer module makes it possible for trace tools to filter or manipulate trace event data without the trace event first having to be copied from the traced process or port.

    With the introduction of this feature, erlang:trace(all|existing, _, _) now also returns the tracer process as part of the number of processes on which tracing is enabled. The is incompatible with the previous releases.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-10267

  • Introduce LTTng tracing of Erlang Runtime System

    For LTTng to be enabled OTP needs to be built with configure option --with-dynamic-trace=lttng.

    This feature introduces tracepoints for schedulers, drivers, memory carriers, memory and async thread pool.

    For a list of all tracepoints, see Runtime Tools User's Guide .

    Own Id: OTP-10282

  • Make it possible to monitor/demonitor ports using the erlang:monitor/2 API. The process and port information functions have also been updated to include information about monitors from processes to ports.

    Own Id: OTP-11384

  • Add microstate accounting

    Microstate accounting is a way to track which state the different threads within ERTS are in. The main usage area is to pin point performance bottlenecks by checking which states the threads are in and then from there figuring out why and where to optimize.

    Since checking whether microstate accounting is on or off is relatively expensive only a few of the states are enabled by default and more states can be enabled through configure.

    There is a convenience module called msacc that has been added to runtime_tools that can assist in gathering and interpreting the data from Microstate accounting.

    For more information see erlang:statistics(microstate_accounting, _) and the msacc module in runtime_tools.

    Own Id: OTP-12345

  • The port of Erlang/OTP to the real-time operating system OSE has been removed.

    Own Id: OTP-12573

  • Sharing preserved copy for messages and exit signals

    Enable sharing preserved copy with configure option --enable-sharing-preserving. This will preserve sharing, within the process, when communication with other processes in the Erlang node. There is a trade-off, the copy is more costly but this cost can be reclaimed if there is a lot of sharing in the message. In addition literals will not be copied in a send except during a purge phase of the module where the literals are located. This feature is considered experimental in 19.0.

    Own Id: OTP-12590 Aux Id: OTP-10251

  • Halfword BEAM has been removed.

    Own Id: OTP-12883

  • Added os:perf_counter/1.

    The perf_counter is a very very cheap and high resolution timer that can be used to timestamp system events. It does not have monoticity guarantees, but should on most OS's expose a monotonous time.

    Own Id: OTP-12908

  • Support for a fragmented young heap generation. That is, the young heap generation can consist of multiple non continuous memory areas. The main reason for this change is to avoid extra copying of messages that could not be allocated directly on the receivers heap.

    Own Id: OTP-13047

  • Erlang linked-in driver can now force the call to open_port to block until a call to erl_drv_init_ack is made inside the driver. This is useful when you want to do some asynchronous initialization, for example getting configuration from a pipe, and you want the initial open_port call to fail if the configuration is incomplete or wrong. See the erl_driver documentation for more details on the API.

    Own Id: OTP-13086

  • Erlang linked-in drivers can now set their own pids as seen in erlang:port_info/1 by using the erl_drv_set_pid function. For more details see the erl_driver documentation.

    Own Id: OTP-13087

  • The functionality behind erlang:open_port/2 when called with spawn or spawn_executable has been redone so that the forking of the new program is done in a separate process called erl_child_setup. This allows for a much more robust implementation that uses less memory and does not block the entire emulator if the program to be started is on an un-accessible NFS. Benchmarks have shown this approach to be about 3-5 times as fast as the old approach where the fork/vfork was done by erts. This is a pure stability and performance fix, however some error messages may have changed, which is why it is marked as a backwards incompatible change.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-13088

  • Improved yielding strategy in the implementation of the following native functions:

    • erlang:binary_to_list/1
    • erlang:binary_to_list/3
    • erlang:bitstring_to_list/1
    • erlang:list_to_binary/1
    • erlang:iolist_to_binary/1
    • erlang:list_to_bitstring/1
    • binary:list_to_bin/1

    This in order to improve performance of these functions.

    Own Id: OTP-13096

  • All garbage collections of processes now bump reductions. Also the amount of reductions bumped when garbage collecting has been adjusted. It now better corresponds to the amount of work performed. This in order to improve the real time characteristics of the system.

    Own Id: OTP-13097

  • New functions that can load multiple modules at once have been added to the 'code' module. The functions are code:atomic_load/1, code:prepare_loading/1, code:finish_loading/1, and code:ensure_modules_loaded/1.

    Own Id: OTP-13111

  • The -boot_var option for erl now only supports a single key and single value (as documented). The option used to allow multiple key/value pairs, but that behavior was undocumented.

    The function erl_prim_loader:start/3 has been removed. Its documentation has also been removed.

    The undocumented and unsupported function erl_prim_loader:get_files/2 has been removed.

    Own Id: OTP-13112

  • Low level BIF erlang:purge_module/1 is made more robust against incorrect use. Lingering processes that still refer the old code are now killed before the module is purged to prevent fatal VM behavior.

    Own Id: OTP-13122

  • Improved dirty scheduler implementation. For more information see the NIF documentation.

    Note

    • The dirty scheduler support is still experimental.

    • The support for determining whether dirty NIF support exist or not at compile time using the C preprocessor macro ERL_NIF_DIRTY_SCHEDULER_SUPPORT has been removed.

    • The enif_is_on_dirty_scheduler() function has been removed. Use enif_thread_type() instead.

    Own Id: OTP-13123

  • Various optimizations done to process dictionary access.

    Own Id: OTP-13167

  • Added max_heap_size process flag. max_heap_size allows the user to limit the maximum heap used by a process. See erlang:process_flag for more details.

    Own Id: OTP-13174

  • Allow dynamic drivers and NIF libraries to be built with gcc option -fvisibility=hidden for faster loading and more optimized code.

    Own Id: OTP-13227

  • Add erlang:process_info(Pid, garbage_collection_info) which returns extended garbage_collection information. For more details see the documentation.

    Own Id: OTP-13265

  • The functions erlang:list_to_integer/1 and string:to_integer/1 have been optimized for large inputs.

    Own Id: OTP-13293

  • Improved memory allocation strategy for hipe native code on x86_64 (amd64) architectures by reserving enough low virtual address space needed for the HiPE/AMD64 small code model. The default virtual address area for hipe code is set to 512Mb, but can be changed with emulator flag +MXscs.

    Own Id: OTP-13359

  • Introduction of configurable management of data referred to by the message queue of a process. Each process can be configured individually.

    It is now possible to configure the message queue of a process, so that all data referred by it will be kept outside of the heap, and by this prevent this data from being part of garbage collections.

    For more information see the documentation of process_flag(message_queue_data, MQD).

    Own Id: OTP-13366 Aux Id: OTP-13047

  • Processes now yield when scanning large message queues and not finding a matching message. This in order to improve real time characteristics.

    Own Id: OTP-13401

  • Optimized an erts internal function that is used to traverse erlang terms. The internal function was mainly used by term_to_binary and comparison of terms. Benchmarks have shown up to a 10% performance increase in those functions after the optimization.

    Own Id: OTP-13440

  • Add the following NIF API functions:

    For details of what each function does, see the erl_nif documentation.

    Own Id: OTP-13442

  • Optimize '++' operator and lists:append/2 by using a single pass to build a new list while checking for properness.

    Own Id: OTP-13487

  • Handle terms (pids,ports and refs) from nodes with a 'creation' value larger than 3. This is a preparation of the distribution protocol to allow OTP 19 nodes to correctly communicate with future nodes (20 or higher). The 'creation' value differentiates different incarnations of the same node (name).

    Own Id: OTP-13488

  • Don't send unasked for systemd notifications in epmd

    Own Id: OTP-13493 Aux Id: PR-999

  • The enif_send API has been extended to allow NULL to be used as the message environment. When used this way, a message environment is implicitly created and the given term is copied into that environment before sending. This can be an optimization if many small messages are being sent by the nif.

    Own Id: OTP-13495

  • The tracing support has been extended to allow tracing on ports. Ports can be traced on using the 'ports', 'send' and 'receive' trace flags.

    The first argument of erlang:trace/3 has been extended so that 'all', 'existing' and 'new' now include both processes and ports. New Tracee variants, 'all_processes', 'all_ports', 'existing_processes' etc have been added to specify only processes or ports.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-13496

  • When the 'procs' trace flag is enabled, a 'spawned' trace event is now also generated by a newly created process. The previous event 'spawn' remains, but as it is generated by the process that did the spawn, it is not guaranteed that it is ordered with other trace events from the newly spawned process. So when tracking the lifetime of a process this new event should be used as the creation event.

    This new trace event is marked as an incompatibility because tools that expect certain trace events when enabling 'procs' will have to updated.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-13497

  • Add the erlang:match_spec_test/3 function. The functions allows the testing of match specifications for both tracing and ets tables. It can be used to test that a match specification does the expected filtering on specific data. It also returns more verbose error reasons for incorrectly constructed match specifications.

    Own Id: OTP-13501

  • The erts internal tracing support has been changed to have much less overhead and be more scalable.

    This rewrite does not break any backwards incompatibilities, but it does change the ordering of some trace messages when compared to previous releases. It should be noted that this only applies to trace messages sent to processes or ports, it does not apply to the new tracer module. However in future releases they may also be effected by this.

    Trace messages are only guaranteed to be ordered from one traced process or port. In previous releases this was not visible as a 'send' trace message would always arrive before the corresponding 'receive' trace message that is no longer always the case. This also means that timestamped trace messages may seem to arrive out of order as the timestamp is taken when the event is triggered and not when it is put in the queue of the tracer.

    Own Id: OTP-13503

  • Add possibility to filter send and receive trace with match specifications.

    Own Id: OTP-13507

  • Add maps:update_with/3,4 and maps:take/2

    Own Id: OTP-13522 Aux Id: PR-1025

  • Introduce LTTng tracing via Erlang tracing.

    For LTTng to be enabled OTP needs to be built with configure option --with-dynamic-trace=lttng.

    The dynamic trace module dyntrace is now capable to be used as a LTTng sink for Erlang tracing. For a list of all tracepoints, see Runtime Tools User's Guide .

    This feature also introduces an incompatible change in trace tags. The trace tags gc_start and gc_end has been split into gc_minor_start, gc_minor_end and gc_major_start, gc_major_end.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-13532

  • Print heap pointers for garbing processes during crashdump

    Own Id: OTP-13541 Aux Id: PR-1026

  • Changed and improved low level memory statistics returned by erlang:system_info/1. The info for erts_mmap has been moved from mseg_alloc to its own section returned by {allocator, erts_mmap}.

    Own Id: OTP-13560

  • Add enif_snprintf to the NIF API

    The function enif_snprintf is similar to snprintf call but can handle formatting of Erlang terms via %T format specifier.

    Own Id: OTP-13580

  • The warning in the documentation for erlang:raise/3 has been removed. It is now officially perfectly fine to use raise/3 in production code.

    Own Id: OTP-13599

  • Fix bugs caused by the VM sometimes truncating object sizes or offsets to 32 bits on 64-bit hosts. These bugs were mainly found when working with large unicode strings and nifs environments.

    Own Id: OTP-13606

  • Add -start_epmd command line option, this lets you disable automatic starting of epmd when starting a distributed node.

    Add -epmd_module command line option, this lets you specify a module to register and look-up node names in. The default module is erl_epmd.

    Own Id: OTP-13627

  • erlang:halt now truncates strings longer than 200 characters instead of failing with badarg.

    Own Id: OTP-13630

  • Fix possible race in poller wake up on windows

    Own Id: OTP-13634

  • List subtraction (The -- operator) will now yield properly on large inputs.

    Own Id: OTP-15371

  • Fixed small memory leak that could occur when sending to a terminating port.

    Own Id: OTP-14609 Aux Id: ERIERL-238

  • Fix performance bug in pre-allocators that could cause them to permanently fall back on normal more expensive memory allocation. Pre-allocators are used for quick allocation of short lived meta data used by messages and other scheduled tasks. Bug exists since OTP_R15B02.

    Own Id: OTP-14491

  • Fixed bug in operator bxor causing erroneuos result when one operand is a big negative integer with the lowest N*W bits as zero and the other operand not larger than N*W bits. N is an integer of 1 or larger and W is 32 or 64 depending on word size.

    Own Id: OTP-14514

  • A timer internal bit-field used for storing scheduler id was too small. As a result, VM internal timer data structures could become inconsistent when using 1024 schedulers on the system. Note that systems with less than 1024 schedulers are not effected by this bug.

    This bug was introduced in ERTS version 7.0 (OTP 18.0).

    Own Id: OTP-14548 Aux Id: OTP-11997, ERL-468

  • Fixed bug in binary_to_term and binary_to_atom that could cause VM crash. Typically happens when the last character of an UTF8 string is in the range 128 to 255, but truncated to only one byte. Bug exists in binary_to_term since ERTS version 5.10.2 (OTP_R16B01) and binary_to_atom since ERTS version 9.0 (OTP-20.0).

    Own Id: OTP-14590 Aux Id: ERL-474

  • A bug has been fixed where if erlang was started +B on a unix platform it would be killed by a SIGUSR2 signal when creating a crash dump.

    Own Id: OTP-13425 Aux Id: ERL-94

  • Calls to erl_drv_send_term() or erl_drv_output_term() from a non-scheduler thread while the corresponding port was invalid caused the emulator to enter an inconsistent state which eventually caused an emulator crash.

    Own Id: OTP-13866

  • Driver and NIF operations accessing processes or ports could cause an emulator crash when used from non-scheduler threads. Those operations are:

    • erl_drv_send_term()
    • driver_send_term()
    • erl_drv_output_term()
    • driver_output_term()
    • enif_send()
    • enif_port_command()

    Own Id: OTP-13869

  • Fix bug in binary_to_term for binaries created by term_to_binary with option compressed. The bug can cause badarg exception for a valid binary when Erlang VM is linked against a zlib library of version 1.2.9 or newer. Bug exists since OTP 17.0.

    Own Id: OTP-14159 Aux Id: ERL-340

  • Fixed a race that could cause a lost wakeup of a process that timed out in a receive ... after. This bug was introduced in ERTS version 7.0.

    Own Id: OTP-13798 Aux Id: OTP-11997

  • Fixed segfault after writing an erl crash dump.

    Own Id: OTP-13799

  • Fix scheduler deadlock bug in ets:update_counter/4 when key is not found and inserting the default object causes the table to grow.

    Own Id: OTP-13731 Aux Id: ERL-188

  • process_info(Pid, last_calls) did not work for Pid /= self().

    Own Id: OTP-13418

  • Make sure to create a crash dump when running out of memory. This was accidentally removed in the erts-7.3 release.

    Own Id: OTP-13419

  • Schedulers could be woken by a premature timeout on Linux. This premature wakeup was however harmless.

    Own Id: OTP-13420

  • A process communicating with a port via one of the erlang:port_* BIFs could potentially end up in an inconsistent state if the port terminated during the communication. When this occurred the process could later block in a receive even though it had messages matching in its message queue.

    This bug was introduced in erts version 5.10 (OTP R16A).

    Own Id: OTP-13424 Aux Id: OTP-10336

  • The reference count of a process structure could under rare circumstances be erroneously managed. When this happened invalid memory accesses occurred.

    Own Id: OTP-13446

  • Fix race between process_flag(trap_exit,true) and a received exit signal.

    A process could terminate due to exit signal even though process_flag(trap_exit,true) had returned. A very specific timing between call to process_flag/2 and exit signal from another scheduler was required for this to happen.

    Own Id: OTP-13452

  • The '-path' flag to 'erl' has been documented. This flag replaces the path specified in the boot script. It has always existed, but was earlier only documented in SASL (script).

    Own Id: OTP-13060

  • The call_time tracing functionality internally used a time based on OS system time in order to measure call time which could cause erroneous results if OS system time was changed during tracing.

    This functionality now use Erlang monotonic time in order to measure time. Besides fixing the erroneous results due to OS system time being used, the results are often also better since Erlang monotonic time often has better accuracy and precision.

    Own Id: OTP-13216

  • Fix behaviour of -delay_write command line switch of epmd, which is used for debugging - in some cases epmd was sleeping twice the requested amount of time.

    Own Id: OTP-13220

  • Fix race between timeout and exit signal that could cause a process to ignore the exit signal and continue execution. Bug exist since OTP 18.0.

    Own Id: OTP-13245

  • Fix bug in erlang:halt/1,2 for large exit status values, causing either badarg (on 32-bit) or exit with a crash dump and/or core dump (on 64-bit). Make erlang:halt/1,2 tolerate any non negative integer as exit status and truncate high order bits if the OS does not support it.

    Own Id: OTP-13251 Aux Id: ERL-49

  • gen_tcp:accept/2 was not time warp safe. This since it used the same time as returned by erlang:now/0 when calculating timeout. This has now been fixed.

    Own Id: OTP-13254 Aux Id: OTP-11997, OTP-13222

  • Fix faulty error handling when writing to a compressed file.

    Own Id: OTP-13270

  • Fix sendfile usage for large files on FreeBSD

    Own Id: OTP-13271

  • Fix bug that could cause process_info(P,current_location) to crash emulator for hipe compiled modules.

    Own Id: OTP-13282 Aux Id: ERL-79

  • Out of memory errors have been changed to cause an exit instead of abort.

    Own Id: OTP-13292

  • When calling garbage_collect/[1,2] or check_process_code/[2,3] from a process with a higher priority than the priority of the process operated on, the run queues could end up in an inconsistent state. This bug has now been fixed.

    Own Id: OTP-13298 Aux Id: OTP-11388

  • A workaround for an issue with older gcc versions (less than 5) and inline assembly on 32-bit x86 caused an emulator crash when it had been compiled with a newer gcc version. An improved configure test, run when building OTP, now detects whether the workaround should be used or not.

    Own Id: OTP-13326 Aux Id: ERL-80

  • Introduced new statistics functionality in order to more efficiently retrieve information about run able and active processes and ports. For more information see:

    Own Id: OTP-13201

  • Time warp safety improvements.

    Introduced the options monotonic_timestamp, and strict_monotonic_timestamp to the trace, sequential trace, and system profile functionality. This since the already existing timestamp option is not time warp safe.

    Introduced the option safe_fixed_monotonic_time to ets:info/2 and dets:info/2. This since the already existing safe_fixed option is not time warp safe.

    Own Id: OTP-13222 Aux Id: OTP-11997

  • Fix a register race where down nodes goes undetected in epmd

    Own Id: OTP-13301

  • Improved the gcc inline assembly implementing double word atomic compare and exchange on x86/x86_64 so that it also can be used when compiling with clang.

    Own Id: OTP-13336

  • An optimization preventing a long wait for a scheduler thread looking up information about a process executing on another scheduler thread had unintentionally been lost in erts-5.10 (OTP R16A). This optimization has now been reintroduced.

    Own Id: OTP-13365 Aux Id: OTP-9892

  • Revert "Fix erroneous splitting of emulator path"

    Own Id: OTP-13202

  • Fix HiPE enabled emulator for FreeBSD.

    Own Id: OTP-13204 Aux Id: pr926

  • Small documentation fixes

    Own Id: OTP-13017

  • Fix memory corruption bug caused by disabling distribution and then re-enable distribution with a node name that has previously been used by a remote node.

    Own Id: OTP-13076 Aux Id: seq12959

  • Renamed variables with name bool as Visual Studio 2015 now treats this is a keyword.

    Own Id: OTP-13079

  • erl_prim_loader has not supported custom loaders for several releases. In the documentation for erl_prim_loader, all references to custom loaders have now been removed.

    Own Id: OTP-13102

  • Fixed compilation of erts together with libc versions that do not define __uint32_t.

    Own Id: OTP-13105

  • erl -make now returns non-zero exit codes on failure

    Own Id: OTP-13107

  • Fix crash on init:restart in embedded mode caused by on_load handler process not being relaunched leading to load failure for modules such as crypto and asn1rt_nif that need it to be present for correct NIF loading.

    Own Id: OTP-13115

  • Fix maps decode in erlang:binary_to_term/1

    Decoding a term with a large (HAMT) map in an small (FLAT) map could cause a critical error if the external format was not produced by beam.

    Own Id: OTP-13125

  • Fix very rare bug in GC when big maps with a lot of hash collisions from a remote node are waiting in inner message queue.

    Own Id: OTP-13146

  • Fixed a bug that could cause a crash dump to become almost empty.

    Own Id: OTP-13150

  • Updated the xmllint target to just check the xml files with real documentation content.
    Corrected some errors and added some missing target in the DTD's.

    Own Id: OTP-13026

  • Add function enif_getenv to read OS environment variables in a portable way from NIFs.

    Own Id: OTP-13147

  • Fix bug in ETS that could cause stray objects marked for deletion to occasionally be missed by the cleanup done by safe_fixtable(_,false).

    Own Id: OTP-12870

  • Fixed VM crash that could occur if a trace port was linked to a process, and the trace port terminated abnormally while handling a trace message. This bug has always existed in the runtime system with SMP support.

    Own Id: OTP-12901

  • Instead of aborting, the vm now creates a crash dump when a system process is terminated.

    Own Id: OTP-12934

  • Fixed a rare emulator dead lock that occurred when erlang:process_flag(priority,...) was called by a process that was also scheduled for an internal system activity.

    Own Id: OTP-12943

  • The runtime system on various posix platforms (except for Linux and Solaris) could crash when large amounts of file-descriptors were in use.

    Own Id: OTP-12954

  • A beam file compiled by hipe for an incompatible runtime system was sometimes not rejected by the loader, which could lead to vm crash. This fix will also allow the same hipe compiler to be used by both normal and debug-built vm.

    Own Id: OTP-12962

  • Fix bug in maps:merge/2 when called by hipe compiled code that could cause vm crash. Bug exists since erts-7.0 (OTP 18.0).

    Own Id: OTP-12965

  • When tracing with process_dump option, the VM could abort if there was an ongoing binary match somewhere in the call stack of the traced process.

    Own Id: OTP-12968

  • Fixed possible output deadlock in tty driver when hitting "CTRL-C" in a non-smp emulator shell on unix.

    Own Id: OTP-12987 Aux Id: Seq12947

  • Fix binary_to_integer to throw badarg for "+" and "-" similar to list_to_integer.

    Own Id: OTP-12988

  • Suppress warning of unused argument when using macro enif_make_pid.

    Own Id: OTP-12989

  • Changed default clock source used for OS system time on MacOS X to gettimeofday() in order to improve performance. The system can be configured during build to use the previously used higher resolution clock source by passing the switch --with-clock-resolution=high when configuring the build.

    Own Id: OTP-12945 Aux Id: OTP-12892

  • Added the configure option --disable-saved-compile-time which disables saving of compile date and time in the emulator binary.

    Own Id: OTP-12971

  • Fixed a binary memory leak when printing to shell using the tty driver (i.e. not -oldshell).

    Own Id: OTP-12941

  • Fix a bug where the standard error port sometimes crashes with eagain as the reason.

    Own Id: OTP-12942

  • When tracing with process_dump option, the VM could abort if there was an ongoing binary match somewhere in the call stack of the traced process./

    Own Id: OTP-12968

  • A process could end up in an inconsistent half exited state in the runtime system without SMP support. This could occur if the processes was traced by a port that it also was linked to, and the port terminated abnormally while handling a trace message for the process.

    This bug has always existed in the runtime system without SMP support, but never in the runtime system with SMP support.

    Own Id: OTP-12889 Aux Id: seq12885

  • Removed unnecessary copying of data when retrieving corrected Erlang monotonic time.

    Own Id: OTP-12894

  • Changed default OS monotonic clock source chosen at build time. This in order to improve performance. The behavior will now on most systems be that (both OS and Erlang) monotonic time stops when the system is suspended.

    If you prefer that monotonic time elapse during suspend of the machine, you can pass the command line argument --enable-prefer-elapsed-monotonic-time-during-suspend to configure when building Erlang/OTP. The configuration stage will try to find such a clock source, but might not be able to find it. Note that there might be a performance penalty associated with such a clock source.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-12895

  • erlang:system_info(end_time) returned a faulty value on 32-bit architectures.

    Own Id: OTP-12896

  • The configure command line argument --enable-gettimeofday-as-os-system-time has been added which force usage of gettimeofday() for OS system time. This will improve performance of os:system_time() and os:timestamp() on MacOS X, at the expense of worse accuracy, resolution and precision of Erlang monotonic time, Erlang system time, and OS system time.

    Own Id: OTP-12892

  • Fix a rare hanging of the VM seen to happen just after emulator start. Bug exists since R14.

    Own Id: OTP-12859 Aux Id: seq12882

  • Fix issuing with spaces and quoting in the arguments when using erlang:open_port spawn_executable on windows. The behavior now mimics how unix works. This change implies a backwards incompatibility for how spawn_executable works on windows.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-11905

  • Fix global call trace when hipe compiled code call beam compiled functions. Tracing of beam functions should now always work regardless who the caller is.

    Own Id: OTP-11939

  • Correct cache alignment for ETS write_concurrency locks to improve performance by reduced false sharing. May increase memory footprint for tables with write_concurrency.

    Own Id: OTP-11974

  • All possibly blocking operations in the fd/spawn and terminal driver have been converted to non-blocking operations. Before this fix it was possible for the VM to be blocked for a long time if the entity consuming stdout/stderr did not consume it fast enough.

    Own Id: OTP-12239

  • Add missing overhead for offheap binaries created from external format. This fix can improve the garbage collection of large binaries originating from binary_to_term or messages from remote nodes.

    Own Id: OTP-12554

  • Ensure hashing of zero is consistent

    Erlang treats positive and negative zero as equal:

    true = 0.0 =:= 0.0/-1

    However, Erlangs hash functions: hash, phash and phash2 did not reflect this behaviour. The hash values produced by the different hash functions would not be identical for positive and negative zero.

    This change ensures that hash value of positive zero is always produced regardless of the signedness of the zero float, i.e.,

    true = erlang:phash2(0.0) =:= erlang:phash2(0.0/-1)

    Own Id: OTP-12641

  • Ensure NIF term creation disallows illegal floating point values and too long atoms. Such values will cause a NIF to throw badarg exception when it returns.

    Own Id: OTP-12655

  • Fixed building of Map results from match_specs

    A faulty "box-value" entered into the heap which could cause a segmentation fault in the garbage collector if it was written on a heap fragment.

    Own Id: OTP-12656

  • Fix hipe bug when matching a "writable" binary. The bug has been seen to sometimes cause a failed binary matching of a correct utf8 character, but other symptoms are also possible.

    Own Id: OTP-12667

  • Keep dirty schedulers from waking other schedulers.

    Own Id: OTP-12685

  • Disable floating point exceptions if the VM is compiled by clang/llvm. This is a known long-standing problem in clang/llvm.

    Own Id: OTP-12717

  • Fix bug in file:sendfile for FreeBSD causing not the entire file to be sent.

    Own Id: OTP-12720

  • Fix the broken Android support in erl_child_setup.c

    Own Id: OTP-12751

  • Faulty statistics reported by the fix_alloc allocator.

    Own Id: OTP-12766

  • Fix two erts_snprintf() calls to correct sizes.

    - run_erl.c (ose): Use the size of the signal type, not its pointer. - erl_node_tables.c: Use the size of the _BUFFER in erts_snprintf() to make sure we can use the full space.

    Own Id: OTP-12771

  • Delayed memory allocations could be delayed an unnecessarily long time.

    Own Id: OTP-12812

  • Make sure that timeouts on a pool of acceptors are released in the correct order.

    Own Id: OTP-12817

  • Fix segmentation fault in module_info for deleted modules

    Own Id: OTP-12820

  • Fix garbage collection of literals in code purge

    During code purging and check_process_code, the checking of the binary reference embedded in the match binary state was omitted for the tracing tests. This would cause the binary match state to reference deallocated memory.

    Own Id: OTP-12821

  • A bug has been corrected for gen_tcp:close so when {linger,{true,0}} is in effect it does not wait for data in the driver queue to transfer out before closing the port. Bug fix by Rory Byrne.

    Own Id: OTP-12840

  • The documentation of the driver callback start() erroneously stated that a return value of ERL_DRV_ERROR_ERRNO caused the error value to be passed via erl_errno when it should have been errno.

    Own Id: OTP-12855

  • Add md5 and module entries to ?MODULE:module_info/0/1 and remove obsolete entry 'import'.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-11940

  • Debug function erlang:display/1 shows content of binaries and bitstrings, not only the length.

    Own Id: OTP-11941

  • The time functionality of Erlang has been extended. This both includes a new API for time, as well as time warp modes which alters the behavior of the system when system time changes. You are strongly encouraged to use the new API instead of the old API based on erlang:now/0. erlang:now/0 has been deprecated since it is and forever will be a scalability bottleneck. For more information see the Time and Time Correction chapter of the ERTS User's Guide.

    Besides the API changes and time warp modes a lot of scalability and performance improvements regarding time management has been made internally in the runtime system. Examples of such improvements are scheduler specific timer wheels, scheduler specific BIF timer management, parallel retrieval of monotonic time and system time on systems with primitives that are not buggy.

    Own Id: OTP-11997

  • erlang:function_exported(M, F, A) will now return true if M:F/A refers to a BIF.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-12099

  • New BIF: erlang:get_keys/0, lists all keys associated with the process dictionary. Note: erlang:get_keys/0 is auto-imported.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-12151 Aux Id: seq12521

  • Make distributed send of large messages yield to improve real-time characteristics.

    Own Id: OTP-12232

  • Use high accuracy poll timeouts

    Where available, use poll/select API's that can handle time resolutions less than 1ms. In the cases where such API's are not available the timeout is rounded up to the nearest ms.

    Own Id: OTP-12236

  • The internal group to user_drv protocol has been changed to be synchronous in order to guarantee that output sent to a process implementing the user_drv protocol is printed before replying. This protocol is used by the standard_output device and the ssh application when acting as a client.

    This change changes the previous unlimited buffer when printing to standard_io and other devices that end up in user_drv to 1KB.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-12240

  • The previously introduced "eager check I/O" feature is now enabled by default.

    Eager check I/O can be disabled using the erl command line argument: +secio false

    Characteristics impact compared to previous default:

    • Lower latency and smoother management of externally triggered I/O operations.
    • A slightly reduced priority of externally triggered I/O operations.

    Own Id: OTP-12254 Aux Id: OTP-12117

  • Properly support maps in match_specs

    Own Id: OTP-12270

  • The notice that a crashdump has been written has been moved to be printed before the crashdump is generated instead of afterwords. The wording of the notice has also been changed.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-12292

  • New function ets:take/2. Works the same as ets:delete/2 but also returns the deleted object(s).

    Own Id: OTP-12309

  • Tracing with cpu_timestamp option has been enabled on Linux.

    Own Id: OTP-12366

  • ets:info/1,2 now contains information about whether write_concurrency or read_concurrency is enabled.

    Own Id: OTP-12376

  • Improved usage of gcc's builtins for atomic memory access. These are used when no other implementation of atomic memory operations is available. For example, when compiling for ARM when libatomic_ops is not available.

    The largest improvement will be seen when compiling with a gcc with support for the __atomic_* builtins (using a gcc of at least version 4.7), but also when only the legacy __sync_* builtins are available (using a gcc of at least version 4.1) an improvement can be seen.

    For more information see the "Atomic Memory Operations and the VM" section of $ERL_TOP/HOWTO/INSTALL.md.

    Own Id: OTP-12383

  • Introduce math:log2/1 function to math module.

    Own Id: OTP-12411

  • The documentation of the Abstract Format (in the ERTS User's Guide) has been updated with types and specification. (Thanks to Anthony Ramine.)

    The explicit representation of parentheses used in types of the abstract format has been removed. Instead the new functions erl_parse:type_inop_prec() and erl_parse:type_preop_prec() can be used for inserting parentheses where needed.

    Own Id: OTP-12492

  • Remove perfctr support

    Development of perfctr in the linux kernel ceased in 2010. The perfctr support code in the Erlang VM is thus effectively dead code and therefore removed.

    Own Id: OTP-12508

  • zlib:inflateChunk/2 has been added. It works like zlib:inflate/2, but decompresses no more data than will fit in the buffer configured by zlib:setBufSize/2.

    Own Id: OTP-12548

  • Use linear search for small select_val arrays

    Own Id: OTP-12555

  • New BIF ets:update_counter/4 with a default object as argument, which will be inserted in the table if the key was not found.

    Own Id: OTP-12563

  • Export missing types from zlib module

    Own Id: OTP-12584

  • Use persistent hashmaps for large Maps

    Maps will use a persistent hashmap implementation when the number of pairs in a Map becomes sufficiently large. The change will occur when a Map reaches 33 pairs in size but this limit might change in the future.

    The most significant impact for the user by this change is speed, and to a lesser degree memory consumption and introspection of Maps. Memory consumption size is probalistic but lesser than gb_trees or dict for instance. Any other impacts will be transparent for the user except for the following changes.

    Semantics of Maps have changed in two incompatible ways compared to the experimental implementation in OTP 17:

    • Hashing of maps is done different by erlang:phash2/1,2, erlang:phash/1 and erlang:hash/2.
    • Comparing two maps with ==, /=, =<, <, >= and >, is done different if the keys contain floating point numbers.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-12585

  • Scalability improvement for erlang:make_ref/0, and other functionality that create references. Each scheduler now manage its own set of references. By this no communication at all is needed when creating references.

    Previous implementation generated a strictly monotonically increasing sequence of references corresponding to creation time on the runtime system instance. This is not the case with current implementation. You can only expect reference to be unique. The Erlang/OTP documentation has never mentioned anything else but the uniqueness property, so this change is fully compatible. The only reason we've marked this as a potential incompatibility is since an early draft for an Erlang specification mentions strict monotonicity as a property.

    If you need to create data with a strict monotonicity property use erlang:unique_integer([monotonic]). Do not use the deprecated erlang:now().

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-12610

  • Enable different abort signal from heart

    By using environment variable HEART_KILL_SIGNAL, heart can now use a different signal to kill the old running Erlang.

    By default the signal is SIGKILL but SIGABRT may also be used by setting environment variable: HEART_KILL_SIGNAL=SIGABRT

    Own Id: OTP-12613 Aux Id: seq12826

  • Update autconf to latest version 2015-03-04

    Own Id: OTP-12646

  • Optimization of timers internally in the VM. This include process timers (receive ... after), port timers (driver_set_timer()) as well as BIF timers (erlang:send_after()/erlang:start_timer()).

    Each scheduler thread now has its own lock-free timer service instead of one locked central service. This dramatically improves performance of timer management on systems with a large amount of schedulers and timers.

    The timer service internal data structure has also been optimized to be able to handle more timers than before. That is, each timer service is by its self able to handle more timers without dramatic performance loss than the old centralized timer service.

    The API of BIF timers has also been extended. Timeout values are for example no longer limited to 32-bit integers. For more information see the documentation of erlang:start_timer/4, erlang:send_after/4, erlang:cancel_timer/2, and erlang:read_timer/2.

    Characteristics impact: Calls to the synchronous versions of erlang:cancel_timer(), and erlang:read_timer() may take substantially longer time to complete than before. This occur when the timer that is accessed is managed by a remote scheduler. You typically want to use the new asynchronous option in order to avoid blocking the calling process.

    Own Id: OTP-12650 Aux Id: OTP-11997

  • Specialize instructions from common assembler patterns

    Specialize common instructions of rem, band, minus and plus in the beam loader. This will reduce the number of fetches and thus lessen the instruction dispatch pressure during runtime and speed up those operations in some common cases.

    Specialize move patterns from x-registers to the stack with a new move_window instruction. This change will reduce instruction dispatch pressure.

    Own Id: OTP-12690

  • Fix cross compilation for Android.

    Own Id: OTP-12693

  • Fix incorrect use of autoconf macro AC_EGREP_CPP, which could cause faulty configuration if run from a path containing the string 'yes'.

    Own Id: OTP-12706

  • Minimal Java version is now 1.6

    Own Id: OTP-12715

  • Send format and args on process exit to error_logger

    Previously, the emulator would generate a whole string with values and call the error_logger passing "~s~n". This changes it to a format string containing ~p with the respective values as arguments.

    Own Id: OTP-12735

  • Map error logger warnings to warning messages by default.

    Own Id: OTP-12755

  • Configure architecture ppc64le architecture as a ppc64

    Own Id: OTP-12761

  • Add function enif_raise_exception to allow a NIF to raise an error exception with any type of reason.

    Own Id: OTP-12770

  • Optimized node table statistics retrieval.

    Own Id: OTP-12777

  • Map beam error logger warnings to warning messages by default. Previously these messages were mapped to the error channel by default.

    Own Id: OTP-12781

  • gen_tcp:shutdown/2 is now asynchronous

    This solves the following problems with the old implementation:

    It doesn't block when the TCP peer is idle or slow. This is the expected behaviour when shutdown() is called: the caller needs to be able to continue reading from the socket, not be prevented from doing so.

    It doesn't truncate the output. The current version of gen_tcp:shutdown/2 will truncate any outbound data in the driver queue after about 10 seconds if the TCP peer is idle of slow. Worse yet, it doesn't even inform anyone that the data has been truncated: 'ok' is returned to the caller; and a FIN rather than an RST is sent to the TCP peer.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-12797

  • Introduced delayed node table GC. This in order to avoid oscillation of entries in and out of the tables. The oscillation caused unnecessary lock contention on the table locks. The delay length can be set by passing the +zdntgc command line argument.

    Characteristics impact: The tables can grow to very large sizes with unused entries if the node is get huge amounts of short lived connections from other nodes. This problem can be alleviated by shortening the length of the delay using the +zdntgc command line argument.

    Own Id: OTP-12802

  • Improved implementation of erlang:statistics(io) in order to reduce contention between schedulers.

    Characteristics impact: The actual call to erlang:statistics(io) takes longer time to complete, but the overall impact on the system is improved.

    Own Id: OTP-12842

  • There are many cases where user code needs to be able to distinguish between a socket that was closed normally and one that was aborted. Setting the option {show_econnreset, true} enables the user to receive ECONNRESET errors on both active and passive sockets.

    Own Id: OTP-12843

  • Do not preallocate too large event pool

    A default pool size of 4000 is too excessive for the common case. This corresponds directly to the number of threads in the system. Change ERTS_TS_EV_ALLOC_DEFAULT_POOL_SIZE to 2048. Change ERTS_TS_EV_ALLOC_POOL_SIZE to 32.

    Own Id: OTP-12849

  • A process communicating with a port via one of the erlang:port_* BIFs could potentially end up in an inconsistent state if the port terminated during the communication. When this occurred the process could later block in a receive even though it had messages matching in its message queue.

    This bug was introduced in erts version 5.10 (OTP R16A).

    Own Id: OTP-13424 Aux Id: OTP-10336

  • Calls to erl_drv_send_term() or erl_drv_output_term() from a non-scheduler thread while the corresponding port was invalid caused the emulator to enter an inconsistent state which eventually caused an emulator crash.

    Own Id: OTP-13866

  • Driver and NIF operations accessing processes or ports could cause an emulator crash when used from non-scheduler threads. Those operations are:

    • erl_drv_send_term()
    • driver_send_term()
    • erl_drv_output_term()
    • driver_output_term()
    • enif_send()
    • enif_port_command()

    Own Id: OTP-13869

  • Fix bug in binary_to_term for binaries created by term_to_binary with option compressed. The bug can cause badarg exception for a valid binary when Erlang VM is linked against a zlib library of version 1.2.9 or newer. Bug exists since OTP 17.0.

    Own Id: OTP-14159 Aux Id: ERL-340

  • Fixed bug in operator bxor causing erroneuos result when one operand is a big negative integer with the lowest N*W bits as zero and the other operand not larger than N*W bits. N is an integer of 1 or larger and W is 32 or 64 depending on word size.

    Own Id: OTP-14514

  • Fixed bug in binary_to_term and binary_to_atom that could cause VM crash. Typically happens when the last character of an UTF8 string is in the range 128 to 255, but truncated to only one byte. Bug exists in binary_to_term since ERTS version 5.10.2 (OTP_R16B01) and binary_to_atom since ERTS version 9.0 (OTP-20.0).

    Own Id: OTP-14590 Aux Id: ERL-474

  • When calling garbage_collect/[1,2] or check_process_code/[2,3] from a process with a higher priority than the priority of the process operated on, the run queues could end up in an inconsistent state. This bug has now been fixed.

    Own Id: OTP-13298 Aux Id: OTP-11388

  • Fixed a bug that could cause a crash dump to become almost empty.

    Own Id: OTP-13150

  • The 'raw' socket option could not be used multiple times in one call to any e.g gen_tcp function because only one of the occurrences were used. This bug has been fixed, and also a small bug concerning propagating error codes from within inet:setopts/2.

    Own Id: OTP-11482 Aux Id: seq12872

  • The VTS mode in Common Test has been modified to use a private version of the Webtool application (ct_webtool).

    Own Id: OTP-12704 Aux Id: OTP-10922

  • Fix missing quotation in the LM_FIND_EMU_CC autoconf macro which could cause build failures.

    Own Id: OTP-12388

  • Fix erroneous printout of monitors in crashdump file.

    Own Id: OTP-12537

  • The runtime system without SMP support could crash in the BIF port_control/3 if the port that was being accessed died during the call to the BIF.

    Own Id: OTP-12544 Aux Id: Seq12777

  • Avoid corrupt oversized integer to be created from binary matching. Instead throw system_limit exception which is the correct behavior. A peculiar symptom of this bug was that bitwise operations (band, bor, bxor) on such oversized integers could return the empty list []. Credit: Mikael Pettersson, Nico Kruber

    Own Id: OTP-12556

  • A race condition when calling port_info/1 could cause a memory fault has been fixed.

    Own Id: OTP-12587

  • Fix comparison of exact terms. An overflow that could cause faulty comparisons has been fixed. Comparison of exact terms is exclusively used within Maps.

    Own Id: OTP-12623

  • Fix bug in list_to_integer/1 for very long lists that could cause VM crash.

    Own Id: OTP-12624

  • Introduced a runtime system internal 64-bit API for atomic memory operations.

    Own Id: OTP-12351

  • Add command line argument option for the initial size of process dictionaries.

    Use '+hpds <size>' to set initial process dictionary size for spawned processes.

    Own Id: OTP-12535 Aux Id: seq12809

  • Fix documentation on $char for Unicode

    Own Id: OTP-12545

  • Fix getifaddrs realloc pointer error

    When a buffer was exhausted and subsequently reallocated, we could get an unsafe pointer pointing to faulty memory.

    For this to occur we would need to have a large number of interfaces and a reallocation of memory to a lower addresses.

    The symptom would be garbage returned from erlang:port_control(Port, 25, []) (prim_inet:getifaddrs(Port) resulting in a badarg) or a segmentation fault.

    Own Id: OTP-12445

  • Don't close all file descriptors twice in child_setup

    The commit c2b4eab25c907f453a394d382c04cd04e6c06b49 introduced an error in which child_setup erroneously tried to close all file descriptors twice.

    Use closefrom() if available when closing all file descriptors.

    The function closefrom() was only used in the vfork() case before but is now also used in the fork() case if available.

    Own Id: OTP-12446

  • During a crashdump all file descriptors are closed to ensure the closing of the epmd port and to reserve a file descriptor for the crashdump file.

    If a driver (third party library) cannot handle closing of sockets this could result in a segmentation fault in which case a crashdump would not be produced. This is now fixed by only closing inets sockets via an emergency close callback to the driver and thus closing the epmd socket.

    Own Id: OTP-12447

  • Fix HiPE debug lock checking on OS X 64bit

    Position-independent code is mandatory on OS X. We use r11 as an intermediate register to fill BIF_P->hipe.bif_callee. This fixes the following error when doing `make debug FLAVOR=smp`:

    clang -cc1as: fatal error: error in backend: 32-bit absolute addressing is not supported in 64-bit mode

    Own Id: OTP-12188

  • Fix race bug that could cause VM crash in erlang:port_get_data/1 if the port was closed by a concurrent process. Also fix fatal bug if port_set_data/2 is called with a non-immediate data term. Both bugs exist since R16B01.

    Own Id: OTP-12208

  • Correct make variable SSL_DED_LD_RUNTIME_LIBRARY_PATH when erl_xcomp_sysroot ends with a slash.

    Own Id: OTP-12216 Aux Id: seq12700

  • Fix two cases of unreachable code caused by false use of assignment operators.

    Own Id: OTP-12222

  • Fix bug when hipe compiled code makes tail call to a BIF that disables GC while trapping (sush as binary_to_list, list_to_binary, binary_to_term, term_to_binary).

    Own Id: OTP-12231

  • Fix bug when a migrated empty memory carrier is reused just before it should be destroyed by the thread that created it.

    Own Id: OTP-12249

  • Prevents compile-time errors in NIFs, when the compiler is instructed to treat missing field initializers as errors, by adding an initializer for the new options field which was added to ErlNifEntry for 17.3.

    Own Id: OTP-12266

  • Fixed CPU topology detection on FreeBSD systems where Erlang/OTP is compiled by new C compilers (including, but possibly not limited to, gcc 4.9 and clang).

    Own Id: OTP-12267

  • Use C99 function isfinite() instead of finite() when available on non GCC compilers.

    Own Id: OTP-12268

  • Fix bug on windows where an incorrect number of links could be returned when doing file:read_file_info on a directory.

    Own Id: OTP-12269

  • Fix rare bug when purging module on VM started with +Meamin.

    Own Id: OTP-12273

  • Repair run_erl terminal window size adjustment sent from to_erl. This was broken in OTP 17.0 which could lead to strange cursor behaviour in the to_erl shell.

    Own Id: OTP-12275 Aux Id: seq12739

  • Fixed bug on windows causing gen_tcp/udp to return an error when given an fd to work with.

    Own Id: OTP-12289

  • Fix various internal erts issues where negating a signed integer in C would trigger undefined behavior. This fixes issues when dividing with bignums and list_to_integer.

    Own Id: OTP-12290

  • When flushing output to stdout on windows, the emulator could sometimes hang indefinitely waiting for the flush to complete. This has been fixed.

    Own Id: OTP-12291

  • Fix so that non-smp emulators with dirty scheduler support shows the correct number of dirty schedulers when calling erlang:system_info(system_version).

    Own Id: OTP-12295

  • Add nif_version to erlang:system_info/1 in order to get the NIF API version of the runtime system in a way similar to driver_version.

    Own Id: OTP-12298

  • Fix bug that could cause the return value from dirty NIF with zero arity to be treated as garbage, leading to VM crash.

    Own Id: OTP-12300

  • Improve allocation carrier migration search logic. This will reduce the risk of failed migrations that could lead to excess memory consumption. It will also improve smp performance due to reduced memory contention on the migration pool.

    Own Id: OTP-12323

  • Introduced support for eager check I/O.

    By default eager check I/O will be disabled, but this will most likely be changed in OTP 18. When eager check I/O is enabled, schedulers will more frequently check for I/O work. Outstanding I/O operations will however not be prioritized to the same extent as when eager check I/O is disabled.

    Eager check I/O can be enabled using the erl command line argument: +secio true

    Characteristics impact when enabled:

    • Lower latency and smoother management of externally triggered I/O operations.
    • A slightly reduced priority of externally triggered I/O operations.

    Own Id: OTP-12117

  • Fix erts .app-file

    Own Id: OTP-12189

  • Add configure option --with-ssl-incl=PATH to support OpenSSL installations with headers and libraries at different places.

    Own Id: OTP-12215 Aux Id: seq12700

  • Optimization of atomic memory operations with release barrier semantics on 32-bit PowerPC when using the implementation included in OTP.

    Own Id: OTP-12250

  • Minor adjustment of scheduler activation code making sure that an activation of a scheduler is not prevented by its run-queue being non-empty. (Thanks to Songlu Cai)

    Own Id: OTP-12287

  • Improved support for atomic memory operations provided by the libatomic_ops library. Most importantly support for use of native double word atomics when implemented by libatomic_ops (for example, implemented for ARM).

    The $ERL_TOP/HOWTO/INSTALL.md document now also more clearly describes when you want to build together with a libatomic_ops installation.

    Own Id: OTP-12302

  • Add configure option --with-ssl-rpath to control which runtime library path to use for dynamic linkage toward OpenSSL.

    Own Id: OTP-12316 Aux Id: seq12753

  • Added systemd notify support to epmd

    Own Id: OTP-12321

  • Fix bug when an migrated empty memory carrier is reused just before it should be destroyed by the thread that created it.

    Own Id: OTP-12249

  • Repair run_erl terminal window size adjustment sent from to_erl. This was broken in OTP 17.0 which could lead to strange cursor behaviour in the to_erl shell.

    Own Id: OTP-12275 Aux Id: seq12739

  • General documentation updates.

    Own Id: OTP-12052

  • A bug in the VM code implementing sending of signals to ports could cause the receiving port queue to remain in a busy state forever. When this state had been reached, processes sending command signals to the port either got suspended forever, or, if the nosuspend feature was used, always failed to send to the port. This bug was introduced in ERTS version 5.10.

    In order for this bug to be triggered on a port, one had to at least once utilize the nosuspend functionality when passing a signal to the port. This by either calling

    Thanks Vasily Demidenok for reporting the issue, and Sergey Kudryashov for providing a testcase.

    Own Id: OTP-12082 Aux Id: OTP-10336

  • Fix size overflow bug at memory allocation. A memory allocation call, with an insane size close to the entire address space, could return successfully as if it had allocated just a few bytes. (Thanks to Don A. Bailey for reporting)

    Own Id: OTP-12091

  • Fix various issues where negating a signed integer would trigger undefined behaviour. This fixes issues in the enif_make_int64 interface and some edge cases inside the erlang runtime system.

    Own Id: OTP-12097

  • The documentation erroneously listed the +swct command line argument under +sws.

    Own Id: OTP-12102 Aux Id: OTP-10994

  • Profiling messages could be delivered out of order when profiling on runnable_procs and/or runnable_ports using erlang:system_profile/2. This bug was introduced in ERTS version 5.10.

    Own Id: OTP-12105 Aux Id: OTP-10336

  • Various logging fixes, including: Add run queue index to the process dump in crash dumps.
    Add thread index to enomem slogan when crashing.
    Remove error logger message for sending messages to old instances of the same node.

    Own Id: OTP-12115

  • Fix compiler warnings reported by LLVM

    Own Id: OTP-12138

  • Correct conversion of MIN_SMALL by list_to_integer/1 and binary_to_integer/1. The bug produced an unnormalized bignum which can cause strange behavior such as comparing different to a correct MIN_SMALL integer. The value MIN_SMALL is -(1 bsl 27) = -134217728 on a 32-bit VM and -(1 bsl 59) = -576460752303423488 on a 64-bit VM. (Thanks to Jesper Louis Andersen, Mikael Pettersson and Anthony Ramine for report, patch and optimization suggestion)

    Own Id: OTP-12140

  • Fix bug in term_to_binary that reallocates binary with inconsistent size information. Bug has never been confirmed to be the cause of any faulty behavior.

    Own Id: OTP-12141

  • Real_path method used while prim loading archive files was not taking into account the fact that windows directory symlinks can be across different drives.

    Own Id: OTP-12155

  • Add log2 histogram to lcnt for lock wait time

    Own Id: OTP-12059

  • Introduced enif_schedule_nif() to the NIF API.

    The enif_schedule_nif() function allows a long-running NIF to be broken into separate NIF invocations without the help of a wrapper function written in Erlang. The NIF first executes part of the long-running task, then calls enif_schedule_nif() to schedule a NIF for later execution to continue the task. Any number of NIFs can be scheduled in this manner, one after another. Since the emulator regains control between invocations, this helps avoid problems caused by native code tying up scheduler threads for too long.

    The enif_schedule_nif() function also replaces the enif_schedule_dirty_nif() in the experimental dirty NIF API. Note that the only incompatible changes made are in the experimental dirty NIF API.

    See the NIF documentation for more information.

    Thanks to Steve Vinoski.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-12128

  • OTP-11850 fixed filelib:wildcard/1 to work with broken symlinks. This correction, however, introduced problems since symlinks were no longer followed for functions like filelib:ensure_dir/1, filelib:is_dir/1, filelib:file_size/1, etc. This is now corrected.

    Own Id: OTP-12054 Aux Id: seq12660

  • Fixed ETHR_FORCE_INLINE which caused the build to break on some platforms without adequate thread support (VxWorks).

    Own Id: OTP-12010

  • The documentation for spawn_opt/5 now has a note mentioning that the monitor option is not supported.

    Own Id: OTP-11849

  • Fix broken system monitoring of large_heap for non-smp VM. No message for large_heap was ever sent on non-smp VM. Bug exist since R16B.

    Own Id: OTP-11852

  • The emulator without SMP support crashed when passing a message to a process without enough heap space for the message. This bug was introduced in erts-6.0.

    Own Id: OTP-11887 Aux Id: OTP-11388

  • Fix race between ETS table deletion and unfixation that could cause VM crash. The race could happen between a terminating process that does not own the table but has a fixation on it and another process that deletes the table (maybe the owner terminating) at the same time. Bug existed since R15B02.

    Own Id: OTP-11892

  • The string following the -eval option when invoking erl would not be properly translated from UTF-8 to a list of Unicode characters (as would the arguments for -run).

    That bug would cause the build of Erlang/OTP to fail when building in a directory whose pathname contained non-US ASCII characters encoded in UTF-8. (Thanks to Eric Pailleau for reporting this bug.)

    Own Id: OTP-11916

  • Fix erts_debug:size/1 to handle Map sizes

    Own Id: OTP-11923

  • Removed erlang:bitstr_to_list/1 and erlang:list_to_bitstr/1. They were added by mistake, and have always raised an undefined exception when called.

    Own Id: OTP-11942

  • Fixed compilation using mingw-w64 on Windows.

    Thanks to Jani Hakala.

    Own Id: OTP-11945

  • The git sha is no longer printed in the shell start header when erlang is built from a tagged git release.

    Own Id: OTP-11961

  • Fixed a bug where send trace events were erroneously dropped when the send was done to a registered process. This bug was introduced in R16B.

    Own Id: OTP-11968

  • The following native functions now bump an appropriate amount of reductions and yield when out of reductions:

    • erlang:binary_to_list/1
    • erlang:binary_to_list/3
    • erlang:bitstring_to_list/1
    • erlang:list_to_binary/1
    • erlang:iolist_to_binary/1
    • erlang:list_to_bitstring/1
    • binary:list_to_bin/1

    Characteristics impact:

    Performance
    The functions converting from lists got a performance loss for very small lists, and a performance gain for very large lists.
    Priority
    Previously a process executing one of these functions effectively got an unfair priority boost. This priority boost depended on the input size. The larger the input was, the larger the priority boost got. This unfair priority boost is now lost.

    Own Id: OTP-11888

  • The systemd features of epmd have been removed from epmd by default. To enable them you have to build erlang with the configure option --enable-systemd.

    Own Id: OTP-11921

  • Removed Erlang wrapper code used when calling binary_to_term/1, and binary_to_term/2. This improves the performance of these BIFs especially when they are called with small binaries as input.

    Own Id: OTP-11931

  • Add erlang:system_info(tolerant_timeofday), an API to check whether compensation for sudden changes of system time is enabled or not.

    Own Id: OTP-11970

  • Fix broken system monitoring of large_heap for non-smp VM. No message for large_heap was ever sent on non-smp VM. Bug exist since R16B.

    Own Id: OTP-11852

  • Fixed type spec of erlang:system_info/1.

    Own Id: OTP-11859 Aux Id: OTP-11615

  • The option dupnames did not work as intended in re. When looking for names with {capture, [Name, ...]}, re:run returned a random instance of the match for that name, instead of the leftmost matching instance, which was what the documentation stated. This is now corrected to adhere to the documentation. The option {capture,all_names} along with a re:inspect/2 function is also added to further help in using named subpatterns.

    Own Id: OTP-11205

  • Allow loading of NIF library with unicode path name

    Own Id: OTP-11408

  • Allow loading of driver with unicode path name

    Own Id: OTP-11549

  • Fixed a bug where starting Erlang without having an open stdin on fd 0 would sometimes deadlock the emulator when terminating.

    Own Id: OTP-11558

  • The option '-names' in epmd now works on Windows (Thanks to Johannes Weißl)

    Own Id: OTP-11565

  • Correction of the examples in escript documentation. (Thanks to Pierre Fenoll).

    Own Id: OTP-11577

  • Fix bs_get_integer instruction

    The instruction bs_get_integer could unnecessarily trigger a garbage collection in failure cases which is unwanted or outright dangerous.

    Ex:

    <<X:Sz,_/bits>> = <<"some binary">>

    Previously, if Sz induced X to a bignum it would reserved memory size this on the heap via a garbage collection before checking if the size could actually match.

    It will now check the binary size before triggering a collection.

    Own Id: OTP-11581

  • Remove heap space overestimation in binary_to_term (and remote message reception) for integers in the intervals [-2147483648,-1] and [256,2147483647] on 64-bit emulators.

    Own Id: OTP-11585

  • Add support for detecting the separate tinfo library from ncurses (Thanks to Dirkjan Ochtman)

    Own Id: OTP-11590

  • Deprecation warning for system_flag(cpu_topology) has been extended for removal in OTP 18 (Thanks to Steve Vinoski for the update)

    Own Id: OTP-11602

  • Documentation improvement regarding some awkward wording around the +spp flag. (Thanks to Brian L. Troutwine )

    Own Id: OTP-11607

  • Fixed bug where sendfile would return the wrong error code for a remotely closed socket if the socket was in passive mode. (Thanks to Vincent Siliakus for reporting the bug.)

    Own Id: OTP-11614

  • Increase garbage collection tenure rate

    The garbage collector tries to maintain the previous heap block size during a minor gc, i.e. 'need' is not utilized in determining the size of the new heap, instead it relies on tenure and garbage to be sufficiently large.

    In instances during intense growing with exclusively live data on the heap coupled with delayed tenure, fullsweeps would be triggered directly after a minor gc to make room for 'need' since the new heap would be full.

    To remedy this, the tenure of terms on the minor heap will always happen (if it is below the high watermark) instead of every other minor gc.

    Characteristics Impact: Reduced CPU-time spent in garbage collection but may infer delays in collecting garbage from the heap. Tweak 'fullsweep_after' options to increase gc pressure if needed.

    Own Id: OTP-11617

  • Fix bug when comparing integers with floats larger than 2^992. The bug could potentially cause memory corruption on 32-bit emulators.

    Own Id: OTP-11618

  • Cross-compilation fixes for TileraMDE-3.0.1.125620

    Own Id: OTP-11635

  • sendfile no longer uses async threads by default

    This has been done because a slow client attack is possible if the async thread pool is used. The scenario is:

    Client does a request for a file and then slowly receives the file one byte at a time. This will eventually fill the async thread pool with blocking sendfile operations and thus starving the vm of all file operations.

    If you still want to use the async threads pool for sendfile an option to enable it has been introduced.

    Thanks to Christopher Faulet for identifying this vulnerability.

    *** POTENTIAL INCOMPATIBILITY ***

    Own Id: OTP-11639

  • Do proper rollback of calls to enif_open_resource_type when load/upgrade callbacks of NIF library return failure.

    Own Id: OTP-11722

  • Changed the default configuration when configuring with $ERL_TO