## Erts 5.1

### Fixed errors and malfunctions

- The call `trunc(F)` where `F` is a float such that the expected result is 2^27, instead returned -2^27. Also `round(134217727.5)` gave an erroneous answer.
  (Own Id: OTP-3722)
  (Aux Id: Seq 4925, OTP-3190)

- If the user suspended Erlang (e.g., by pressing ^Z), and the operating system is SunOS 2.6 or higher, trying to continue only resulted in Erlang being suspended again.
  (Own Id: OTP-3726)

- Deliverance of SIGCHLD signals to the emulator could fail when threads where used on Solaris. This could result in the (Solaris) process table being filled with defunct processes. Child process management in the emulator has been modified to eliminate this problem.
  (Own Id: OTP-3906)
  (Aux Id: Seq 5143, OTP-3963)

- A close of a tcp socket could be delayed up to 5 seconds after all pending output had been sent. Now the socket is closed immediately after all pending output has been sent.
  (Own Id: OTP-3924)
  (Aux Id: seq 5182, OTP-3963)

- When `demonitor/1` was used on a monitor for a process on another node (for example, using `gen_server` calls), not all associated allocated memory was freed, causing a memory leak of some 20 bytes each time. This has been fixed.
  (Own Id: OTP-3929)

- If `erlang:demonitor/1` was called in order to demonitor a process on another node, at the same time as the node went down, Erlang could sometimes crash. This has been fixed.
  (Own Id: OTP-3969)
  (Aux Id: seq5152)

- When constructing a binary, using a number of bits other than a multiple of 8 from a binary could give the wrong result in compiled code. Example: `B1 = <<73>>, B2 = <<0>>, <<B1:6/binary-unit:1,B2:2/binary-unit:1>>`.
  (Own Id: OTP-3995)

- The bor operator could return incorrect answer for big integers.
  (Own Id: OTP-4005)

- `binary_to_term` on binaries (for example `list_to_binary([131,111,255,255,255,0])` not corresponding to a term could crash Erlang.
  (Own Id: OTP-4053)

- When the system limit on maximal number of nodes known to a node had been reached (the distribution table had been filled), pids, ports, and references belonging to previously connected nodes could change node belonging. This bug has now been fixed. (Own Id: OTP-4071)
  (Aux Id: Seq-5311, OTP-4048)

- A bug in the heap fragment allocation could cause an emulator crash. This bug has now been fixed.
  (Own Id: OTP-4109)

- Emulator could crash due to exiting process monitoring process on a node that concurrently goes down. This has now been corrected.
  (Own Id: OTP-4112)
  (Aux Id: OTP-3969)

- A memory leak of 36 bytes per thread created, and a potential memory leak of 8 bytes per thread created have been fixed.
  (Own Id: OTP-4115)

- Miscalculation in gc could cause emulator crash. This has now been fixed.
  (Own Id: OTP-4116)

- An mmap leak in sl_alloc has been fixed.
  (Own Id: OTP-4120)

### Improvements and new features

- The driver interface (for writing Erlang drivers in C) is now documented. See the man page erl_driver in the ERTS documentation.

  The old <c>driver.h</c> include file has been moved to <c>$(ERL_ROOT)/usr/include/obsolete</c>. It is not recommended to use it, but if you need to use it, you must move it or change the include path to make sure that the C compiler can find it.

- The abstract format for representing Erlang code as Erlang terms is now documented, in the ERTS User's Guide.
  (Own Id: OTP-3039)

- A number of bug fixes and improvements have been done to applications `runtime_tools`, `kernel` and `erts`:
  - A read timeout no longer resets the sequential trace token. This is an incompatibility towards the previous behaviour. Use `seq_trace:set_token([])` to reset the sequential trace token.
  - `seq_trace:get_token/0` and `seq_trace:set_token/1` now have compatible token formats.
  - `dbg:trace_port/2` and `dbg:trace_client/2,3` now supports trace to and read from a size limited "wrap file set".
  - `dbg:trace_port_control/1` now supports operation `get_listen_port` for the ip trace driver.
  - New match spec functions `{is_seq_trace}` and `{get_seq_trace}` has been added to test and read the sequential trace token in match specs.
  - New match spec functions `{get_tcw}` and `{set_tcw Value}` that reads and sets a "trace control word" in the node has been added. The "trace control word" is a word in each Erlang node of at least 24 bits. There are also enhancements of BIFs: `erlang:system_info(trace_control_word)` and `erlang:system_flag(trace_control_word, Value)` for the same purpose.
  - A new match spec function `{silent, TrueOrFalse}` for setting a silent call trace flag per process that inhibits call trace messages, both local and global, has been added. The BIF `erlang:trace/3` has been extended to recognize the flag 'silent' to start a call trace in silent mode.
  - Some bugs in the `dbg` module has been fixed, e.g the 'old_trace_call' flag has been removed from the 'all' flags list, and the dbg server no longer hangs if the supplied tracer fails to start.
  - A bug in the emulator that made 'EXIT' messages from a process involved in a sequential call trace get overwritten by the sequential trace token itself has been fixed.
  - The documentation regarding the above has been updated. Especially, the fact that the match spec function `{return_trace}` destroys the tail recursiveness of the traced function has been pointed out.
  (*** POTENTIAL INCOMPATIBILITY ***)
  (Own Id: OTP-3747)
  (Aux Id: OTP-3592, OTP-3744)

- Hidden nodes and hidden global groups have been introduced. This makes it possible to establish hidden connections between Erlang nodes. See global_group(3), and erl(1).
  (Own Id: OTP-3916)
  (Aux Id: OTP-3963)

- The flag 'procs' to erlang:trace/3 has got a slightly new behaviour: Trace tag 'spawn' has a new element, and trace tags 'register', 'unregister', and 'getting_unlinked' are new. Therefore, new and/or different trace messages will arrive to the tracer when the 'procs' trace flag is used.
  (*** POTENTIAL INCOMPATIBILITY ***)
  (Own Id: OTP-3934)
  (Aux Id: seq5193)

- Wrap file traces now can limit the size of each file with a time instead of a size. See the documentation for dbg:trace_port/2.
  (Own Id: OTP-3935)
  (Aux Id: seq5193)

- When using trace flags 'running' and 'timestamp' to determine the amount of running time different processes in the system were using, the results were somewhat unreliable since the time to write the trace buffer itself randomly burdened the traced processes. This is now compensated for by faking process schedule out and in trace messages around the file writes (for the trace file driver trace_file_drv).
  (Own Id: OTP-3938)

- A new command line argument `-extra` has been introduced, which causes all following arguments to remain uninterpreted by Erlang; the arguments are included in the list returned by `init:get_plain_arguments/0`.
  (Own Id: OTP-3955)
  (Aux Id: OTP-3030, Seq 5203)

- dlmalloc was introduced in the Erlang emulator version 5.0.2.3 because it performed better than Solaris malloc when the emulator needed to allocate large short-lived memory blocks. It was later observed that it performed worse than Solaris malloc under some conditions. We have therefore now removed dlmalloc and replaced it with our own special treatment of short-lived memory blocks (called sl_alloc) and the standard malloc implementation for other blocks.

  The current version of sl_alloc uses the system call mmap() (on platforms where mmap() exists) in order to allocate large blocks (just as dlmalloc) and uses the standard malloc implementation for small blocks.

  Maximum number of mmapped blocks and the threshold which is used to determine if a block should be mmapped can be adjusted, see "System Flags" in erl(1).

  sl_alloc can be disabled. The standard malloc implementation will in this case be used instead, see "System Flags" in erl(1).
  (Own Id: OTP-4075)
  (Aux Id: SEQ-7057,)

- When the emulator runs without the async thread pool, large file read and write operations are now segmented into smaller, so that other Erlang processes can run in parallel. Still, a sync or a close operation on a large file may block the emulator as before. Using the async thread pool is the only cure for that.
  (Own Id: OTP-4144)

- In the Open-Source release of Erlang/OTP, the HiPE (High Performance Erlang) extension can be enabled. (Using `./configure --enable-hipe` when building.) If the runtime-system is hipe-enabled, a module can be native-code compiled like this:

  `c(Module, [native|OtherOptions])`.

  Compiling in this way, the beam file will contain both standard beam byte-code and the native code. If loaded on a hipe-enabled system the native code will be loaded; otherwise the beam-code will be loaded.

  HiPE is supported for Ultra Sparc and Intel Pentium.
  (Own Id: OTP-4153)

- Process termination when the process owns ETS tables is made considerably faster.
  (Own Id: OTP-4154)
  (Aux Id: OTP-3547)

- Due to the handling of the ETS name-to-table translations, a ets call when the named table did not exist could take considerable time before throwing "badarg". This is no longer the case.
  (Own Id: OTP-4155)
  (Aux Id: OTP-3547)

- The following new functions are added to the ets modules: ets:select/2 ets:select/3 ets:select/1 ets:match/3 ets:match/1 ets:match_object/3 ets:match_object/1 ets:member/2 ets:delete_all_objects/1 ets:delete_object/2 ets:from_dets/2 ets:to_dets/2 ets:test_ms/2 - See the ETS manual page for details. Furthermore the ets:insert/2 function now also accepts a list of objects to be inserted.
  (Own Id: OTP-4156)
  (Aux Id: OTP-3547)

- Ets:safe_fixtable/2 is made more efficient. Fixation is done without message passing and structures are held internally by the emulator.
  (Own Id: OTP-4157)
  (Aux Id: OTP-3547)

## Erts 5.0.2

### Fixed errors and malfunctions

- Heart could time out due to system time adjustments. Heart is now modified to use timestamps unrelated to system dates.
  Own Id: OTP-3401
- The -nohup option didn't work on Windows, causing erlsrv to fail.
  Own Id: OTP-3715
- zlib in the emulator (used during compress/decompress of files) did not use the right memory allocation routines on vxworks.
  Own Id: OTP-3815
- Instability problems in the erlang emulator introduced in R7 are now corrected: *) The R7B01 emulator may now be restarted after halting without rebooting the VxWorks node. *) Parallel portprogrm execution no longer may cause memory access errors in tExecTask. *) Use of list_to_binary may no longer cause stack overruns for the emulator.
  Own Id: OTP-3819
- Name clashes between Erlang emulator and erl_interface on VxWorks removed.
  Own Id: OTP-3824
- A bug in efile_drv that randomly caused memory access violation when using file:get_cwd() has been fixed.
  Own Id: OTP-3832
- In some cases, the debugger would in a call to undefined function `erts_debug:apply/4`. This problem has been corrected.
  Own Id: OTP-3845
  Aux Id: Seq 5094
- Running erlang in an console on Windows (erl) no longer causes output from erlang to be blocked. Using Ctrl-C to interrupt emulator now works as expected.
  Own Id: OTP-3888
- Deliverance of SIGCHLD signals to the emulator could fail when threads where used on Solaris. This could result in the (Solaris) process table being filled with defunct processes. Child process management in the emulator has been modified to eliminate this problem.
  Own Id: OTP-3963
  Aux Id: OTP-3906
- When the system limit on maximal number of nodes known to a node had been reached (the distribution table had been filled), pids, ports, and references belonging to previously connected nodes could change node belonging. This bug has now been fixed.
  Own Id: OTP-4071
- The `--enable-threads` flag was previously ignored by the `configure` script. This has now been corrected, and it is now possible to enable threads by passing the `--enable-threads` flag to the `configure` script when building the open source release.
  Own Id: OTP-4019
- A bug in the heap fragment allocation could cause an emulator crash. This bug has now been fixed.
  (Own Id: OTP-4109)
- Emulator could crash due to exiting process monitoring process on a node that concurrently goes down. This has now been corrected.
  (Own Id: OTP-4112)
  (Aux Id: OTP-3969)
- A memory leak of 36 bytes per thread created, and a potential memory leak of 8 bytes per thread created have been fixed.
  (Own Id: OTP-4115)
- Miscalculation in gc could cause emulator crash. This has now been fixed.
  (Own Id: OTP-4116)
- An mmap leak in sl_alloc has been fixed.
  (Own Id: OTP-4120)

### Improvements and new features

- A number of bug fixes and improvements have been done to applications `runtime_tools`, `kernel` and `erts`:
  - A read timeout no longer resets the sequential trace token. This is an incompatibility towards the previous behaviour. Use `seq_trace:set_token([])` to reset the sequential trace token.
  - `seq_trace:get_token/0` and `seq_trace:set_token/1` now have compatible token formats.
  - `dbg:trace_port/2` and `dbg:trace_client/2,3` now supports trace to and read from a size limited "wrap file set".
  - `dbg:trace_port_control/1` now supports operation `get_listen_port` for the ip trace driver.
  - New match spec functions `{is_seq_trace}` and `{get_seq_trace}` has been added to test and read the sequential trace token in match specs.
  - New match spec functions `{get_tcw}` and `{set_tcw Value}` that reads and sets a "trace control word" in the node has been added. The "trace control word" is a word in each Erlang node of at least 24 bits. There are also enhancements of BIFs: `erlang:system_info(trace_control_word)` and `erlang:system_flag(trace_control_word, Value)` for the same purpose.
  - A new match spec function `{silent, TrueOrFalse}` for setting a silent call trace flag per process that inhibits call trace messages, both local and global, has been added. The BIF `erlang:trace/3` has been extended to recognize the flag 'silent' to start a call trace in silent mode.
  - Some bugs in the `dbg` module has been fixed, e.g the 'old_trace_call' flag has been removed from the 'all' flags list, and the dbg server no longer hangs if the supplied tracer fails to start.
  - A bug in the emulator that made 'EXIT' messages from a process involved in a sequential call trace get overwritten by the sequential trace token itself has been fixed.
  - The documentation regarding the above has been updated. Especially, the fact that the match spec function `{return_trace}` destroys the tail recursiveness of the traced function has been pointed out.
  (*** POTENTIAL INCOMPATIBILITY ***)
  Own Id: OTP-3747
  Aux Id: OTP-3592, OTP-3744
- The use of the environment variable ERL_GC_TYPE to force fullsweep garbage collection is no longer supported in R7B, instead the environment variable ERL_FULLSWEEP_AFTER can be set to "0" to get the same result. The misleading README and example start script for VxWorks are now updated.
  Own Id: OTP-3884
- The dlmalloc malloc() implementation has been included in the emulator in order to reduce memory consumption and memory fragmentation when running Erlang on Solaris. See README file (in top directory) on how to enable dlmalloc when building an open source release.
  Own Id: OTP-3997
  Aux Id: OTP-3917
- `dlmalloc` was introduced in the Erlang emulator version 5.0.2.3 because it performed better than Solaris `malloc` when the emulator needed to allocate large short-lived memory blocks. It was later observed that it performed worse than Solaris `malloc` under some conditions. We have therefore now removed `dlmalloc` and replaced it with our own special treatment of short-lived memory blocks (called `sl_alloc`) and the standard `malloc` implementation for other blocks.

  The current version of `sl_alloc` uses the system call `mmap()` (on platforms where `mmap()` exists) in order to allocate large blocks (just as `dlmalloc`) and uses the standard `malloc` implementation for small blocks.

  Maximum number of mmapped blocks and the threshold which is used to determine if a block should be mmapped can be adjusted, see "System Flags" in `erl(1)`.

  `sl_alloc` can be disabled. The standard `malloc` implementation will in this case be used instead, see "System Flags" in `erl(1)`.
  Own Id: OTP-4075

## Erts 5.0.1

### Fixed errors and malfunctions

- For newer versions of gcc the value of GCCLIB_PATH was set incorrectly.
  Own Id: OTP-3785
- Loading of dynamic drivers on VxWorks works again. (erl_ddll:load_driver/2)
  Own Id: OTP-3808
  Aux Id: Seq 5037

## Erts 5.0.1 (R7B)

### Improvements and new features

- A new better and more portable hash BIF, <c>erlang:phash/2</c>, has been introduced. The <c>dets</c> module will use the <c>erlang:phash/2</c> for newly created tables. To rebuild an old table and start to use the new hash BIF, give the <c>{repair,force}</c> option to <c>dets:open_file/2</c>. See the documentation.
  Own Id: OTP-3397
- The `-detached` flag has been documented in the `erl` man page. Some other minor documenation errors were also corrected.
  Own Id: OTP-3686
- Function c:memory/[0,1] added. It can be used to retrieve current memory allocation status, see the documentation of the c module.
  Own Id: OTP-3698

## Erts 5.0 (R7A)

### Known problems

- System enters unstable state if epmd crashes
  Own Id: OTP-1067
  Aux Id: tir-f-054

### Fixed errors and malfunctions

- Windows: Some scrollbar problems in Werl were fixed.
  Own Id: OTP-3560
- The BIFs split_binary/2 and binary_to_list/3 did not accept positions greater than 134217727 (128Mb - 1). This has been corrected.
  Own Id: OTP-3594
- Calling binary_to_term/1 on a term which contains several funs could cause an emulator crasch. This has been corrected.
  Own Id: OTP-3644

### Improvements and new features

- We have made several changes to the garbage collector and internal memory allocation routines to reduce memory consumption and memory fragmentation. Also, the compiler now makes sure that references to any data that will not be used again will be killed, so that the garbage collector can discard it as soon as possible. (Thanks to Claes Wickstrom at Bluetail who suggested most of the changes to the garbage collector.)
  Own Id: OTP-2375
  Aux Id: seq 816, HA81951
- There now exists syntax for constructing and matching binaries. For more infomation, see Extensions to Erlang. Also, the handling of small binaries (up to 64 bytes) has been optimised, as well as splitting of binaries.
  Own Id: OTP-3376
- The maximum number of ports that can be opened using `erlang:open_port/2` can now be configured using the environment variable `ERL_MAX_PORTS`. By default, the maximum number of ports is 1024. Note that the default value of 1024 in rare cases may be lower than the default value in previous releases (it used to be the maximum number of file descriptors for the current process on Unix).
  (*** INCOMPATIBILITY with R6 ***)
  Own Id: OTP-3494
- The new BIF `erlang:read_timer/1` returns the remaining time (in ms) for a timer started by `start_timer/3` or `send_after/3`.
  Own Id: OTP-3495
- Call tracing is greatly improved. It is now possible to trace local function calls (and calls to local functions) set up with the erlang:trace_pattern BIF. Trace compilation for local call is no longer needed.
  Own Id: OTP-3518
- There is now support for operating system threads in drivers. The file driver has been modified to make use of this, which means that lengthy file operations no longer cause everything on the node to pause. Currently only supported on Solaris and Windows. The number of threads in the thread pool can be set with the emulator system flag `-A`. The default number of threads is 0, which means that this feature is turned off. The number of threads in a node can be obtained by the call `erlang:info(thread_pool_size)`.
  Own Id: OTP-3599
- The BIF erlang:monitor(process, Proc) has been extended to accept named processes, local and remote. See the documentation for erlang:monitor/2 and erlang:demonitor/1.
  Own Id: OTP-3657
- The inet driver (inet_drv, i.e the driver for (TCP&UDP)/IP) and a lot of supporting Erlang code in the application kernel, has been replaced. The new code, courtesy of Tony Rogvall, eliminates one data relay process per socket and thereby gives a throughput boost.
  Own Id: OTP-3661
- Thanks to the HiPE project at Uppsala University, the Erlang emulator now uses a 2 bit tag scheme internally. This change is not visible at the language level, but it means that the Erlang emulator can now address the entire 4Gb address space (OTP R6 could only address 1Gb).
  Own Id: OTP-3667
- The `erlang:info/1` and `erlang:system_info/1` BIFs have been merged into one. The recommended way to use the combined BIF is by the name `erlang:system_info/1`, but `erlang:info/1` will also work.
  Own Id: OTP-3669
- In Unix, there was once a problem running the erlang emulator as part of a pipeline or with redirected input and/or output. An earlier OTP release introduced the infamous "cat process" which partly solved the problem, but introduced its own new problems. In this version, the internal cat process has been removed in favour of a cleaner solution without any unpleasant side-effects.
  Own Id: OTP-3671
- The beam emulator now uses the C library function call poll() instead of select() on Unix systems that support this, e.g Solaris. On those systems the datatype fd_set no longer limits the number of fildescriptor.
  Own Id: OTP-3673
- New socket options for TCP/IP sockets: 'tpkt' and 'line'. See the documentation for inet:setopts/2.
  Own Id: OTP-3674
- Most of the previously undocumented BIFs in the `erlang` module have been documented. Still undocumented are BIFs which are of no use in applications, for instance the set of BIFs used to implement the distribution protocol. The newly documented BIFs are:
  `append_element/2`, `bump_reductions/1`, `display/1`, `function_exported/3`, `garbage_collect/0,1`, `is_builtin/3`, `loaded/0`, `make_tuple/2`, `md5/1`, `md5_final/1`, `md5_init/1`, `md5_update/2`, `port_close/1`, `port_command/2`, `port_connect/2`, `port_control/3`, `port_to_list/1`, `ref_to_list/1`, `system_info/1`, and `yield/0`.
  Own Id: OTP-3675
- The new BIF term_to_binary/2 can be used for automatically compressing the external representation of an Erlang term. The binary_to_term/1 BIF in R7 automatically recognises and decompresses such compressed terms.
  Own Id: OTP-3676

> These release notes describe the Erlang Runtime System, i.e. the emulator, the builtin drivers, `erl_call` utility, and the `erl_interface` library.

> ## Erts 4.9.1

> ### Fixed errors and malfunctions

> - `process_info(Pid, backtrace)` returned just a binary, not a tuple `{backtrace, Pid}`, as the documentation indicates.
>   (*** POTENTIAL INCOMPATIBILITY ***)
>   Own Id: OTP-3357

> ### Improvements and new features

> - Funs are now a distinct type, not tuples as they used to be. Applications that assume that funs are tuples will no longer work. There are new BIFs `erlang:fun_info/2` which can be used to take funs apart and `erlang:fun_to_list/1` which returns a textual representation of a fun.

>   Funs have their own external representaion when they are sent to other nodes. If a fun is sent to an old R5 node, it will automatically be converted to the old tuple form. Funs in the old tuple form received from other nodes will be recognized as funs in this version of OTP (R6), but not in R7.

>   The `check_process_code/2` BIF will now return `true` if the process contains funs that depend on the old code of the module.
>   (*** POTENTIAL INCOMPATIBILITY ***)
>   Own Id: OTP-3364

> - When Erlang was started the path to the runtime system was always added to the PATH environment variable. This could cause the PATH to grow indefinitely when Erlang was restarted by e.g. heart. The path is now only added if needed.
>   Own Id: OTP-3366
> - The BIF `binary_to_term/1` will now ignore any garbage following the encoded term (as it used to do in versions of OTP before R3). The undocumented BIF `erlang:old_binary_to_term/1` (which is now equvivalent to `binary_to_term/1`) will be removed in a future release.
>   Own Id: OTP-3368

> ## Erts 4.9

> ### Known problems

> - System enters unstable state if epmd crashes
>   Own Id: OTP-1067
>   Aux Id: tir-f-054

> ### Fixed errors and malfunctions

> - If more than a few thousand timers (produced by `erlang:send_after` or `erlang:start_timer`) were active, the system became sluggish. This has been somewhat improved.
>   Own Id: OTP-3164
>   Aux Id: OTP-3192
> - Matching on bignumbers was done incorrectly so that matching two different bignumbers would succeed. Also, 'case 38792784388877 of' (bignumber literal as control expression) would not load. These errors have been corrected.
>   Own Id: OTP-3188
>   Aux Id: Seq 3645
> - For the particular number -134217728, the `abs` operator returned an incorrect result.
>   Own Id: OTP-3190
> - When using zombies, about 1k bytes of memory leaked for every process becoming a zombie. In BEAM, keeping large number of zombies caused Erlang to use much more memory than necessary.
>   Own Id: OTP-3191
> - The improved fun handling caused problems for the debugger. If you try interpret a module which have ever been loaded, the emulator will not invoke error_handler:undefined_lambda/3 function when it doesn't find the fun. Therefore, the debugger will never be invoked. This has been fixed so that if the emualator doesn't find a fun in the loaded code for a module, it will invoke error_handler:undefined_lambda/3 if there is no current code for the module.
>   Own Id: OTP-3213
> - erlang:old_term_to_binary/1 could crasch for certain forms of correct input. This has been corrected.
>   Own Id: OTP-3216
>   Aux Id: Seq 8
> - Too long argument lists to apply/2 or apply/3 used to crasch the emulator. This has been corrected. A `system_limit` exception will be generated.
>   Own Id: OTP-3255
> - 'Last change:' removed from manual page footers on Solaris 2.
>   Own Id: OTP-3264
> - The process_info(memory) call returns a more accurate number than in earlier releases. More of the internal structures (old heap and book-keeping information for binaries) are included in the count.
>   Own Id: OTP-3328

> ### Improvements and new features

> - `erlang:monitor/2` can now monitor processes on other nodes.
>   Own Id: OTP-3113
>   Aux Id: OTP-2818, OTP-3114
> - The reference type has been extended from 18 bits to 82 bits. For compatibility with older nodes, an R6 node can send a ref to an older node; if the older node sends it back, it has lost all but its 18 least significant bits, but still compares equal to the original ref. The external format has been extended to represent the new longer refs; that means for example that binaries with refs, produced on an R6 node, cannot be converted to a term on an older node. In `erl_interface`, a function `erl_mk_long_ref` has been added, and macros `ERL_REF_NUMBERS` and `ERL_REF_LEN`.
>   (*** POTENTIAL INCOMPATIBILITY ***)
>   Own Id: OTP-3140
>   Aux Id: OTP-3139
> - BEAM only: The stack of a process was and is allocated as part of the heap. Therefore, `process_info(Pid, stack_size)` used to always return 0. Now, it instead returns the actually used size of the stack.
>   (*** POTENTIAL INCOMPATIBILITY ***)
>   Own Id: OTP-3173
> - For each process, it is possible to save information about the last global calls made by the process. `process_flag(Pid, save_calls, N)` specifies that `N` calls are to be saved. The list of the last calls is obtained with `process_info(Pid, last_calls)`.
>   Own Id: OTP-3230
> - The process dictionary is faster and optimized for integer keys, which makes it suitable for storing incoming messages to a gen_server.
>   Own Id: OTP-3233
> - A mechanism to express function parameter matching and trace actions is added to the emulator. It is used by the erlang:trace_pattern/2 BIF. This allows users to express which actions to take as a result of entering a traced function based on parameter type and values. The descriptions of parameter matching and associated actions are commonly called match_spec's and are documented in the erts users guide.
>   Own Id: OTP-3235
> - Erlang is now resistant to operating system time changes. The internal time, as reported by `erlang:now/0`, is slowly adjusted to match the system time without disturbing any erlang processes.
>   Own Id: OTP-3262
>   Aux Id: Seq 3896
> - Due to an oversight, the following improvement was left out of the documentation in previous releases: The operator `--` performs list subtraction. It is also available as the function `lists:subtract/2`.
>   Own Id: OTP-3318
> - There is now a rudimentary flow control between processes on the same node. The cost of a send operation, counted in reductions, will be proportional to the length of the receiver's message queue. This means that a process sending continously to another process will be slowed down as the message queue of the receiver grows.
>   Own Id: OTP-3332

> ## Erts 4.8.1

> ### Known problems

> - System enters unstable state if epmd crashes
>   Own Id: OTP-1067
>   Aux Id: tir-f-054

> ### Fixed errors and malfunctions

> - In some circumstances, the first character printed on a line could be rubbed out by later material. Example: `io:format("string: ~s", ["yes\r\n"])`. The first 's' disappeared. This has been fixed.
>   Own Id: OTP-3084
>   Aux Id: OTP-3098
> - When editing the command line in the Erlang shell on Unix, the cursor could jump to the wrong line when characters were rubbed out in a line which wrapped over several screen lines. The problem was present at least when using an `xterm` terminal emulator. This has been fixed.
>   Own Id: OTP-3098
>   Aux Id: OTP-3084
> - If the `erl` option `-compile` was used with no arguments, an incomprehensible error message was given. (For example, the call `erl -compile -S file.erl` may be thought to compile `file.erl` with the `-S` option, but it doesn't, since `erl` command-line options cannot take other options as arguments.)
>   Own Id: OTP-3109
> - For Beam, two minor bugs in the relational operators have been corrected. Comparing an atom to a float could give the wrong answer (depending on operand order); for example, `a =< 1.0` used to return `false` instead of `true`. The operator `==` used to work like `=:=` inside lists and tuples; for example, `{42} == {42.0}` used to return `false` instead of the correct `true`.
>   Own Id: OTP-3120
> - The driver_data array is initiated to late. It might be accessed (due to a SIGCHLD) before it is initiated with a emulator crash as result. The error did only occur when something was piped into `erl` from a Bourne shell on Solaris 2.6 or 2.7. This is now corrected.
>   Own Id: OTP-3127

> ### Improvements and new features

> - `erlang:monitor/2` and `erlang:demonitor/1` have been changed since release R5A: an info field containing the exit reason has been added to the message sent when a monitored process exits; `erlang:demonitor(Ref)` can only be performed by the process which obtained `Ref` by calling `erlang:monitor/2`.
>   (*** POTENTIAL INCOMPATIBILITY ***)
>   Own Id: OTP-3114
>   Aux Id: OTP-2818, OTP-3113
> - In Beam, `fun`s can now "survive" a code change, that is, a `fun` defined in the old version of a module can now be called. In previous versions of Beam and in Jam, only `fun`s in the current version of a module could be called.
>   The `error_handler` module has been extended with an `undefined_lambda/3` function, which will be called if an attempt is made to call a `fun` that is defined in a module that is not loaded. This new function will only be called in Beam.
>   `Fun`s in Beam are also faster than in previous versions.
>   Own Id: OTP-3124

> ## Erts 4.8

> ### Fixed errors and malfunctions

> - When a process exits with reason `nocatch`, the BEAM emulator now reports this to the error logger, which it did not previously do. The JAM emulator always did.
>   Own Id: OTP-2667
> - The string printed by 'erl -version' is now prettier and the emulator will terminate after printing the string.
>   Own Id: OTP-2815
> - The encoding and decoding of the Erlang types port and reference is corrected. Previously the emulator could crash when a corrupt reference or port was received from e.g a C-node. Earlier a reference created by a C-node and sent to an Erlang-node got it's creation field changed when it was sent back to the C-node. This is also corrected (for both reference and port).
>   Own Id: OTP-2822
> - Unix only: `halt()` hanged indefinitely if Erlang was started with `-noinput`/`-noshell` and read-only port programs had been started (for example when using `gs:start()`).
>   Own Id: OTP-2947
>   Aux Id: Seq 1409, OTP-3019
> - When the system clock was adjusted, in such a way that time goes "backwards", time-outs were sometimes prematurely released (Unix only).
>   Own Id: OTP-2965
>   Aux Id: Seq 1468
> - If all file descriptors were used up, an Erlang crash dump couldn't be produced. This has been fixed.
>   Own Id: OTP-2977
>   Aux Id: OTP-2662
> - "`erl -compile`" exited with exit code 0 even if compilation failed. Now failing compilation causes non-zero exit code. Note that any trailing '-s' commands will no longer be executed.
>   (*** POTENTIAL INCOMPATIBILITY ***)
>   Own Id: OTP-3055

> ### Improvements and new features

> - Processes which exit abnormally can now be kept for inspection. Such processes are called zombies. The BIF call `erlang:system_flag(keep_zombies, N)` sets the number of zombie processes to keep (default is 0). Zombies are invisible to most BIFs, except `processes/0`, and `process_info/[1,2]`. In order to check whether a process is alive, the test `process_info(Pid,status)==undefined` no longer works; the new BIF `is_process_alive/1` should be used instead. In the `c` module, the new function `zi/0` lists zombies as well as living processes. The number of zombies to keep can also be set with the kernel application environment variable `keep_zombies`.
>   (*** POTENTIAL INCOMPATIBILITY ***)
>   Own Id: OTP-1784
>   Aux Id: seq 359
> - An option `exit_status` has been added to `open_port/2`, to be used when spawning external programs. When the external process connected to the port exits, a message of the form `{Port, {exit_status, Status}}` is sent to the connected process, where `Status` is the exit status of the external process.
>   Own Id: OTP-2398
>   Aux Id: OTP-1241
> - Messages originating from within the Erlang system (not using the Erlang I/O system to do output), such as error reports for exiting processes, used to write all strings as lists of character codes. Now they are written using string syntax when possible.
>   Own Id: OTP-2450
> - The printed form of some Erlang terms has been improved: binaries are now printed with their size; ports are printed with their node and id (id is the result of `erlang:port_info(Port, id)`); references are printed with their node and the sequential number which identifies them. Examples: `#Bin<216>`, `#Port<0.5>`, `#Ref<0.117>`.
>   Own Id: OTP-2600
> - The number of ports is no longer set statically to 256, but set dynamically to at least the number of available file descriptors. The id's of ports are no longer restricted to the maximum number of ports, so they are reused considerably less often.
>   Own Id: OTP-2653
> - Erlang crash dumps now also contain the names of all atoms. This will make it easier to find errors due to excessive run-time generation of atoms.
>   Own Id: OTP-2688
> - On UNIX when Erlang was started with `erl -noshell` from the shell, 2 jam processes (or beam) was created. This was not an error but it was unnecessary in this case. The extra tiny jam process is no longer created in this case.
>   Own Id: OTP-2717
>   Aux Id: OTP-2027
> - New BIFs `erlang:monitor/2` and `erlang:demonitor/1` have been introduced, for monitoring the exit of processes. `erlang:monitor/2` and `erlang:demonitor/1` are likely to change somewhat in release R5B; they are present now for the functionality to be tested. The exact format of the monitoring messages may change, and restrictions may be imposed on which process can turn off a monitoring.
>   Own Id: OTP-2818
>   Aux Id: OTP-2794 WP37
> - Compiled Beam modules have a new format. All modules must be recompiled before they can be used in R5. Also, tools manipulating the module attributes in the object files directly must be changed, because the attributes are now stored differently.
>   (*** POTENTIAL INCOMPATIBILITY ***)
>   Own Id: OTP-2847
>   Aux Id: OTP-2794 WP37
> - Diverse `ets` updates: A new ets data-type `ordered_set` is added, which keeps objects in erlang term order.
>   Limited support for conncurrent updates and traversals of ets tables is added, including a safe way of "fixing" ets tables.
>   The limit on the number of ets tables is now user defineable through an environment variable.
>   A new function, `ets:rename` is added.
>   Any integer field in a tuple can now be updated with the `ets:update_conter/3` function.
>   Own Id: OTP-2849
>   Aux Id: seq 1316, OTP-2705, OTP-2884, OTP-2913, OTP-3005
> - An Erlang system which is instrumented for memory statistics (i.e., started with the `-instr` option) now includes the statistics in the Erlang crash dump when one is produced.
>   Own Id: OTP-2860
> - A new BIF `process_display/2` has been introduced, which prints process information to standard error. Currently, it can be used for inspecting the stack of a process.
>   Own Id: OTP-2941
> - An Erlang crash dump now contains more information than before: the names and sizes of all ETS tables; zombie processes, in the order in which they died. For each process: a stack backtrace (see `erlang:process_display(Pid, backtrace)`); the size of message buffer data; active monitors (see `erlang:monitor/2`) in the list of links; active timers.
>   Own Id: OTP-2975
>   Aux Id: OTP-2662, OTP-2688, OTP-2860
> - `erlang:trace/3` no longer returns `false` for any arguments; it exits with `badarg` in all cases when the trace request couldn't be honoured. The documentation has been improved somewhat.
>   (*** POTENTIAL INCOMPATIBILITY ***)
>   Own Id: OTP-3023
>   Aux Id: OTP-2939
> - The timeout specified in 'receive after' and for the timer BIFs can now be a positive integer up to 4294967295 milli-seconds (almost 50 days). The limit used to be 134217727 milli-seconds (about 37 hours).
>   Own Id: OTP-3047
> - Due to an oversight, the following improvements were left out of the documentation in previous releases:

>   There is a guard test `function/1` for testing whether a term is a fun. Note that since funs are currently represented as tuples, testing for fun should be done before testing for tuple.

>   The operator `++` performs list concatenation.

>   The operators `not`, `and`, `or` and `xor` operate on Boolean values.

>   The unary operator `bnot` performs a bitwise 'not' on an integer.
>   Own Id: OTP-3066

> - The source code for the `setuid_socket_wrap` utility that binds privileged ports (as root) and passes these ports to the Erlang emulator is now included in OTP for the UNIX platforms. The file can be found at `$(ERL_ROOT)/erts-4.8/src/setuid_socket_wrap.c`.
>   Own Id: OTP-3070
> - BEAM only: The address space limit of the Erlang machine, which was 265 MByte in previous releases is now extended to 1GByte for the Beam virtual machine.
>   Own Id: OTP-3089

> ## Erts 4.7.3

> ### Fixed errors and malfunctions

> - Nothing, we need more input, can't recreate the problem, see Notes.
>   Own Id: OTP-2216
>   Aux Id: seq 656
> - When killing a shell in the ^G command level using the sequence "^G k", some processes associated with the shell were left running. Now, there are no extra processes left anymore.
>   Own Id: OTP-2317
> - `os:cmd` on WIN32 does not always catch the output from the executed program correctly. This is now corrected.
>   Own Id: OTP-2371
>   Aux Id: seq 808
> - In previous releases of OTP it was not possible to upgrade the Erlang emulator (named e.g jam471 or beam471) because the executable file was renamed for each new version. This is now corrected by always giving the same name (jam or beam) without version number to the executable file.
>   Own Id: OTP-2372
> - `ets:i()` could cause heart-beat timeout if there was many large ets-tables in the Erlang-system. This is now corrected.
>   Own Id: OTP-2409
>   Aux Id: seq 829
> - Comparison between a float and an integer larger than the largest float gave the wrong result. This has been fixed.
>   Own Id: OTP-2436
> - Heart is corrected to work on Linux.
>   Own Id: OTP-2488
> - LINUX only: The gen_udp process did terminate when sending (with `gen_udp:send`) to a non existing destination port. This is now corrected.
>   Own Id: OTP-2510
> - On WIN32 an output of 0 bytes to the shell console with `io:format` or similar could cause the shell console to hang. This problem occurred when `systools:make_script` was run. The problem only occured when running "erl" and not when "werl" was run. This is now corrected.
>   Own Id: OTP-2575
>   Aux Id: seq 932
> - UNIX only: The UNIX manual page for `erlsrv` was wrongly formatted, this is now corrected.
>   Own Id: OTP-2593
>   Aux Id: Seq 950
> - Unix only: If Erlang was started with -noshell, made some output and then exited, it could happen that the output didn't appear until after Erlang had exited (for example, the error messages from "erlc" could appear after the new Unix shell prompt). This has been fixed.
>   Own Id: OTP-2599
> - Redundant text "Module:" is removed from the title of the reference manual for module `seq_trace`.
>   Own Id: OTP-2603
>   Aux Id: seq 954
> - Low priority processes were not fairly scheduled (in most cases), i.e. a low priority process was never run at all if there were runnable processes of a higher priority. This has been corrected.
>   Own Id: OTP-2644
> - Vxworks only: Erlang crash dumps are now generated if a file system is present.
>   Own Id: OTP-2671
> - Certain BIFs, such as erlang:monitor_node/2 (which are implemented as traps to Erlang code), behaved erratically in JAM (for example, returning an incorrect value). This has been fixed.
>   Own Id: OTP-2680
> - The `heart` port program can now handle the shutdown alternative on all platforms. Previously this only worked on Solaris.
>   Own Id: OTP-2695
> - The number of 'ets' tables was limited to around 1642. This is raised to around 6544.
>   Own Id: OTP-2705

> ### Improvements and new features

> - The name of a distributed Erlang node should always be on the form Node@Host, where both Node and Host are nonempty strings not containing any '@'. This format is checked when the node becomes distributed. Previously, the check was less strict than it should have been, for example allowing duplicated '@' characters. This has been fixed.
>   Own Id: OTP-2537
> - Enhanced memory handling on VxWorks, erlang can use its own malloc algorithms in a user supplied area.
>   Own Id: OTP-2669
> - An additional way to stop an Erlang node when a serious error condition is suspected has been introduced (Unix only): if the signal SIGUSR1 is sent to the Erlang system, an Erlang crash dump and a core dump are produced, whereby the Erlang system terminates. (This function was present already in R4A, but left out of the release notes.)
>   Own Id: OTP-2700
>   Aux Id: OTP-2414
> - The max size for `Cmd` in `heart:set_cmd(Cmd)` is increased from 254 up to 2046 characters.
>   Own Id: OTP-2703

> ## Erts 4.7.1

> ### Fixed errors and malfunctions

> - Processes that did "heavy" file processing did not pay for that. They could execute for a very long time before other processes were scheduled in. Now every file operation costs 100 reductions, which will not allow a process to do many file operations before it is scheduled out.
>   Own Id: OTP-1932
> - When using the -boot and -config command-line options on Windows, filenames in the native Windows syntax using only backslashes didn't work -- forward slashes had to be used. Now backslashes work as well as forward slashes.
>   Own Id: OTP-2373
> - In the Werl window, marking a region containing blank lines below the last line displayed and choosing 'Copy' from the menu, would crash Werl. This has been corrected.
>   Own Id: OTP-2381
> - When several lines were inserted into the Erlang shell using the paste function of the window manager, all but the first line could be lost. This has been fixed.
>   Own Id: OTP-2435
> - Errors when sending incorrect data to a port was reported using the old method if the owner did not trap exit. This has been corrected so posix error codes are always sent.
>   (*** POTENTIAL INCOMPATIBILITY ***)
>   Own Id: OTP-2437
> - If the real-time clock jumped backwards (for any reason), all timers in Erlang would release immediately. This is handled somewhat more gracefully, by pretending that the time stands still.
>   Own Id: OTP-2438
>   Aux Id: seq 836
> - The garbage collector now does a complete garbage collection ("fullsweep"), whenever a process has binaries that could only be freed by a complete collection. This frees binaries sooner, but takes more times for processes that have a lot of live data.
>   Own Id: OTP-2454
>   Aux Id: seq 845, seq 849
> - The `erlc` program now tries to execute the program `erl` in the same directory which the `erlc` program itself is located in. If that fails, `erl` will be searched for in `PATH`.
>   Own Id: OTP-2460
> - `inet:gethostname()` did not always return a short hostname without the domain part. The error was introduced in OTP R3B and is now corrected.
>   Own Id: OTP-2489
>   Aux Id: seq 864

> ### Improvements and new features

> - The erlsrv utility provides the means for running Erlang applications as system services on Windows NT.
>   Own Id: OTP-1669
> - There are two new options to open_port/2 which apply when the port is of type 'spawn': {env, Env} and {cd, Dir}, which set environment variables, and change the working directory, respectively.
>   The new options are currently not implemented on VxWorks.
>   Own Id: OTP-1720
> - Line oriented I/O with new parameter {line, N} to open_port/2.
>   Own Id: OTP-1886
> - New parameter to open_port/2, stderr_to_stdout, will redirect standard error output to standard output for port programs on all platforms.
>   Own Id: OTP-1887
> - The spawn_opt/4 BIF allows the minimum heap size, garbage collection type, and priority to be set when creating a process.
>   Own Id: OTP-2261
>   Aux Id: seq 720
> - Short lived processes no longer get a second heap for the generational garbage collection.
>   Own Id: OTP-2336
> - The emulator can switch GC algorithm for a process when the heap grows to a certain size
>   Own Id: OTP-2337
> - A new module 'instrument' has been added to 'tools'. When running an instrumented version of Erlang, data are collected about the usage of resources, and can later be analysed. The command-line option -instr causes 'erl' to start instrumented Erlang.
>   Own Id: OTP-2358
> - Three new BIFs exist, for managing timers:
>   erlang:start_timer/3, erlang:send_after/3 and erlang:cancel_timer/1.
>   (A previously existing undocumented BIF set_timer/3 has been replaced by the new start_timer/3.)
>   Own Id: OTP-2376
> - When tracing process scheduling, a process to be scheduled in used to be garbage-collected (if needed) before the trace message was sent. This gave an incorrect total for the excution time of the process. This has been corrected.
>   Own Id: OTP-2394
> - For improving the error reporting when detecting an error serious enough to warrant stopping the Erlang node, a new BIF erlang:halt/1 has been introduced.
>   Addendum to the documentation for halt/0: halt/0 returns the status code 0 to the environment.
>   (The BIF erlang:halt/1 previously existed in an undocumented form, with slightly different behaviour.)
>   (*** POTENTIAL INCOMPATIBILITY ***)
>   Own Id: OTP-2414
>   Aux Id: OTP-2359
> - The description of error_handler:undefined_global_name/2 has been removed, since it's no longer called from Erlang 4.6 and later.
>   Own Id: OTP-2525
> - Sequential tracing is available in alfa status and only for JAM systems. Since it is an alpha release the programmatic interface could be slightly changed based on experience from users. The module `seq_trace` contains the interface. Sequential tracing makes it possible to trace all messages that are a direct result from one initiating message e.g. all messages in a call-setup for one connection.
>   Own Id: OTP-2527

> # Erl_interface Release Notes

> ## 4.7.3

> ### Fixed errors and malfunctions

> - A C-node could sometimes leak a file descriptor after querying epmd about a non-existent Erlang node. This is now fixed.
>   Own Id: OTP-2683

> ### Improvements and new features

> - A problem receiving large messages from remote Erlang nodes has been fixed.
>   Own Id: OTP-2676

> ## 4.7.1

> ### Fixed errors and malfunctions

> - Nodenames passed to erl_call with "-s" are now terminated correctly.
>   Own Id: OTP-2241
>   Aux Id: seq 707
> - erl_var_content was sometimes traversing lists incorrectly, possibly resulting in a segmentation violation. This has been corrected.
>   Own Id: OTP-2325
>   Aux Id: OTP-2326
> - A pointer error in the VxWorks version of erl_gethostbyname() was causing segmentation violations. This has been fixed.
>   Own Id: OTP-2327
> - A missing symbol was causing link errors on VxWorks. This is corrected.
>   Own Id: OTP-2333
> - Many of the functions in Erl_interface would abort when passed NULL asrguments. Now, these functions return NULL in situations where it is reasonable to do so.
>   Own Id: OTP-2335
> - Erl_connect() is no longer passing the hostname and nodename arguments in the wrong order to an internal help function. This was causing problems when the node attempted to call erl_publish().
>   Own Id: OTP-2355
> - In R3 a header file `erl_timeout.h` was erroneously included in the release. Some symbols were defined in `erl_timeout.h` that could conflict with user-defined symbols, since they were not prefixed properly. This file is no longer included.
>   Own Id: OTP-2452
>   Aux Id: seq 848

> ### Improvements and new features

> - The documentation for `erl_call` now states correctly that some arguments need to be quoted.
>   Own Id: OTP-2047
> - NULL pointers are now handled properly by an internal function used for free()ing Erlang terms.
>   Own Id: OTP-2242
> - C nodes now have access to Global, through a nearby Erlang node.
>   Own Id: OTP-2249
>   Aux Id: OTP-2459
> - C nodes now have a mechanism for storing state data and backing it up to Mnesia on a nearby Erlang node.
>   Own Id: OTP-2250
> - A set of primitives has been written that enable the use of an IDL backend for C, so the C-Erlang interface can now be specified in IDL.
>   Own Id: OTP-2251
> - erl_fix_alloc has been completely rewritten and is now simpler, faster, and does not leak.
>   Own Id: OTP-2326
> - erl_start_sys and erl_Start_Epmd now works on Windows and VxWorks
>   Own Id: OTP-2356
> - Some of the threads files in erl_interface are only meaningful on a unix platform. These files are no longer used on Windows and VxWorks.
>   Own Id: OTP-2357
> - The ErlMessage struct used by erl_receive_msg() has been changed as part of a larger change to make C nodes understand more of the Erlang distribution protocol.
>   (*** INCOMPATIBILITY with R3B02 ***)
>   Own Id: OTP-2511
> - Users must now include an extra header file and link with an extra library to use some of the erl_interface features. In general, this means that for anything new in R4, or to use the communication facilities.
>   (*** INCOMPATIBILITY with R3B02 ***)
>   Own Id: OTP-2512
> - The functions erl_mk_pid(), erl_mk_port() and erl_mk_ref() previously allowed pids, ports and refs to be created with arbitrary numbers in some of the fields. Now the values provided by the caller are masked, so that only valid numbers can be used.
>   (*** INCOMPATIBILITY with R3B02 ***)
>   Own Id: OTP-2513

> ## R3B02 (Erts 4.6.4)

> ### Fixed errors and malfunctions

> - On Windows, 'epmd -daemon' did not release epmd from the command shell (if the command shell was terminated, so was epmd). This has been corrected.
>   Own Id: OTP-2220
>   Aux Id: seq 671
> - The BEAM emulator did sometimes crash during execution when an Erlang process was about to generate it's exit reason. This is now corrected.
>   Own Id: OTP-2227
>   Aux Id: seq 687, OTP-1783, OTP-1849
> - In the BEAM emulator, the `trace` bif did erroneously report calls to `element/2` as calls to `process_info/2`. This is now corrected. *New-Rev(s):
>   Own Id: OTP-2228
>   Aux Id: seq 689
> - Erlang (R3B version) did not support nis or nisplus lookup of host names. This is now corrected.
>   Own Id: OTP-2235
>   Aux Id: seq 703, OTP-2036
> - Erlang (R3B version) did not support WINS lookup of hostnames. This is now corrected.
>   Own Id: OTP-2236
>   Aux Id: seq 685, seq 702, TSR-1998-02-17/a
> - On WIN32 `receive after` could timeout to early during certain circumstances and only on some PC brands. On these PC:s the assumption that a call to `GetSystemTime` always returns a higher value than the previous call proved to be wrong. This is now corrected.
>   Own Id: OTP-2245
> - Releasehandling did not work on WINDOWS. This is now corrected. A new option `-start_erl` to `werl` and `erl` is introduced which works in the same way as the `start_erl` script on UNIX. I.e with this option the file `start_erl.data` will be read and used to determine which versions to execute.
>   Own Id: OTP-2297
>   Aux Id: seq 755
> - In the following situation, the EXIT message would contain the wrong Pid: Node B holds a pid `OldPidA` which refers to a process on node A. Node A goes down and restarts. Node B does `link(OldPidA)`; the pid in the exit message `{'EXIT', Pid, noproc}` is not the same as `OldPidA`. This has been corrected.
>   Own Id: OTP-2304
>   Aux Id: seq 706
> - `ets:new/2` could case the whole emulator to crash if called with a not well formed list as second argument. Example: `ets:new(a,[set|protected])` which should result in `{'EXIT',{badarg,Reason}}` and not make the emulator to crash. This is corrected.
>   Own Id: OTP-2314
>   Aux Id: seq 769
> - `heart:set_cmd/1` cannot set a command longer than 127 characters, this is now corrected. This problem does not exist in pre R3 versions of OTP.
>   Own Id: OTP-2374
> - A bug in ets:lookup_element could cause the emulator to crash if the lookup was to return a list of more than one element. This is corrected.
>   Own Id: OTP-2386

> ### Improvements and new features

> - On Windows, the value of the environment variable `ERL_WINDOW_TITLE`, if set, will be used as the window title for the `erl` and `werl` windows. To set the title when starting Erlang, the `-env` option can be used like this: `werl -env ERL_WINDOW_TITLE Title`.
>   Own Id: OTP-2222
>   Aux Id: seq 678

> ## R3B01 (Erts 4.6.3)

> ### Fixed errors and malfunctions

> - The `-pa` and `-pz` options to `erl` did not add the paths to the code server when combined with the `-mode embedded` option. This is corrected.
>   Own Id: OTP-2160
>   Aux Id: seq 644

> ## R3B (Erts 4.6.3)

> ### Fixed errors and malfunctions

> - On Unix, using erl in a pipeline like this now works as expected:
>   'cat - | erl -noshell -s nisse'
>   It used to fail with an error message from cat.
>   Own Id: OTP-2027
> - In a distributed node, calling `init:stop/0` used to cause a lot of crash reports to be generated. This has been corrected.
>   Own Id: OTP-2044
>   Aux Id: seq 540
> - Epmd is now reading data non-blocking. This means that hanging nodes, and other situations where epmd may be expecting data but get none, will not block epmd from fulfilling other requests. There is also a one minute timeout for inactivity when epmd expects more data from a node. Epmd will then close the connection.
>   Epmd still writes data blocking. The amount of data that is written is normally so small that this is not a problem but it should be addressed in a future release.
>   Own Id: OTP-2046
> - On Windows, pressing Ctrl-C or Ctrl-Break in erl (not in werl) used to hang erl. This has been corrected.
>   Own Id: OTP-2058
> - Previously (in erts 4.6.1 and 4.6.2) a distributed Erlang node could not be started on a host with a hostname containing for example underscore (_). This checking is now relaxed and the only requirement from the Erlang systems point of view is that it contains visible characters (#21..#7E).
>   Own Id: OTP-2059
>   Aux Id: seq 568
> - For statistics(runtime) and statistics(wall_clock), there was sometimes a discrepancy between the reported time since last call, and the actual difference between the two reported times since the Erlang node was started. This is now fixed.
>   Own Id: OTP-2081
> - The data sent on a socket with `gen_tcp:send` was lost if the socket was explicitly closed. This is corrected.
>   Own Id: OTP-2088
>   Aux Id: seq 591
> - On Windows 95, the `erl` and `werl` programs used to crash if Winsock2 was not installed.
>   In this release, the Erlang emulator will work in a single-node configureation even without Winsock2, but the functionality will be limited in that modules that use TCP/IP or UDP/IP (for instance, gen_tcp, gen_udp, ftp) through the new inet driver will not work.
>   The Erlang emulator will not start if the `-sname` or `-name` is used.
>   Own Id: OTP-2145
> - During startup of OTP on Unix, `receive after` timeouts would trigger too early. This was particularly pronounced in embedded mode when a large number of modules were loaded. This has been corrected.
>   Own Id: OTP-2158
>   Aux Id: OTP-2054 OTP-2152

> ### Improvements and new features

> - International characters in the range 160-255 can now be entered and shown in the Erlang shell on both Unix and Windows. Is is assumed that the characters are encoded according to ISO 8859-1, which is used in both Solaris and Windows. Note that on Windows, characters will be displayed correctly only in the Werl window, not by erl started in a command prompt window (because it uses the IBM character set).
>   As as consequence of this change, the Meta key on Sun keyboards will now generate accented international characters. It cannot be used for entering editing commands, like Meta-B for backing up a word; but Esc B will still work.
>   Own Id: OTP-1782
> - Ports opened with open_port({spawn, Name}, Opts) no longer write error reports. Instead, if the owner of the port (or another process linked to the port) traps exits, it will receive {'EXIT', Port, PosixCode} messages, where PosixCode is an atom given the Posix error codes. Posix error codes are listed in the manual pages for the file and inet modules.
>   Example of Posix codes for ports: einval if you send more than 255 bytes to port opened with {packet, 1} and enomem if driver fails to allocate memory.
>   (*** POTENTIAL INCOMPATIBILITY ***)
>   Own Id: OTP-1796
> - The erl (and also werl on Windows) options -pa and -pz are slightly modified in order to behave exactly the same as the functions add_patha/1 and add_pathz/1 in the module code.
>   Own Id: OTP-2008
> - The following information is interesting for users of the 4.6 through 4.6.2 releases. Others can safely ignore this information.
>   There are new flags in erl (and werl) for controlling what the emulator should do when a send operation to a registered name is attempted and there is no such name registered. In the ERTS 4.6.3 release (like all releases before 4.6), the current process generates an exception if it attempts to send to an unregistered name.
>   The 4.6, 4.6.1, and 4.6.2 releases, however, silently ignored such attempts. In the 4.6.1 and 4.6.2 releases, the +W flag enabled the old exception generating behaviour.
>   In this release (4.6.3) the default behaviour is to generate an exception, but the +W flag is still allowed for backwards compatibility. The new flag +w will turn on the new behaviour (to silently ignore messages sent to an unregistered name); we do not recommend that this flag is used.
>   Own Id: OTP-2010
> - Creation of Unix subprocesses with open_port({spawn,...) now uses the 'vfork' system call by default, instead of 'fork'. Using 'vfork' leads to less swap space usage. If the old behaviour is wanted, set the environment variable "ERL_NO_VFORK" to any value.
>   Own Id: OTP-2131
> - There has been improvements in the `global` and `application_controller` which have made the distribution protocol in R3 incompatible with prior versions.
>   Because of this the Erlang Port Mapper Daemon, epmd, has changed port number. For the user this means that nodes running an older version of OTP can't find or communicate with nodes running R3.
>   An unfortunate side effect of that the change of port number was done in R3B, not R3A when the actual protocol changed, is that a R3A node can't communicate with a R3B node.
>   (*** INCOMPATIBILITY with R2 ***)
>   Own Id: OTP-2139

> ## R3A02

> ### Fixed errors and malfunctions

> - ets:match_object/2 sometimes exited with badarg when applied on a table with more than 1000 entries.
>   Own Id: OTP-2022
>   Aux Id: seq502, HA69908
> - Sending of a message that violates the port protocol, to a port puts the sending process in a strange state (a zombie process). This is now corrected and will result in a badsig exception.
>   Own Id: OTP-2033
>   Aux Id: seq530, HA70127

> ## R3A (Erts 4.6)

> ### Fixed errors and malfunctions

> - A bug involving spurious timeout traces on Beam has been fixed.
>   Own Id: OTP-1486
> - Calling trace(Pid, true, [suspend]) would not suspend the process if it was waiting (and most processes in an Erlang system are waiting). This limitation has been removed.
>   Own Id: OTP-1488
> - When (re)compiling modules in one of the kernel, stdlib, or compiler directories of OTP, or a module with the same name as a module in these directories, an infinite loop could occur.
>   Own Id: OTP-1647
> - On the BEAM system on Solaris 2, a registered message sent from another node could end up in the message queue of the wrong process.
>   Own Id: OTP-1659
>   Aux Id: HA59059
> - When starting erl with both -noshell and -noinput, a shell was started anyway. This has been fixed.
>   Own Id: OTP-1684
> - Invoking Erlang as 'erl -s Module Function Arguments' causes the emulator to terminate if Module:Function/X fails. The emulator used to silently ignore failed calls.
>   (*** POTENTIAL INCOMPATIBILITY ***)
>   Own Id: OTP-1697
> - If the HOME environment variable was set on the command line to the Erlang emulator (using -env), the emulator would still use the earlier value of HOME in the environment of the parent process, and fail to start if HOME was not defined. This has been changed, so that a value of HOME on the command line always overrides the value in the parent environment.
>   On Windows, the same applies to the environment variables HOMEDRIVE and HOMEPATH.
>   Own Id: OTP-1703
> - The erlang:trace/3 BIF didn't report messages that a process sent to itself.
>   Own Id: OTP-1709
> - The Erlang machine could hang in accept, in case it received a signal during the connect phase when connecting to another node. That select was interrupted by a signal was not checked.
>   Own Id: OTP-1722
> - Tcp_drv.c was reusing struct timevals in select, without reinializing them.
>   Own Id: OTP-1723
> - Due to integer overrun, the statistics(wall_clock) BIF could sometimes return a negative value. It now returns a bignum when necessary.
>   Own Id: OTP-1726
>   Aux Id: HA56471, OTP-1604
> - Some interruptible system calls were not being checked.
>   Own Id: OTP-1817

> ### Improvements and new features

> - It is now possible to customize the location of the `releases` directory. This makes it possible to test the release handling procedure without write access to the OTP root directory. Changes in `start_erl` (UNIX), `systools_make` and documentation. The filestructure is slightly changed; the `SystemVsn` directory is moved from `erts-EVsn` to the `releases` directory.
>   (*** POTENTIAL INCOMPATIBILITY ***)
>   Own Id: OTP-1635
>   Aux Id: HA54792
> - The heart program with limited functionality now works on Windows NT.
>   Own Id: OTP-1672
> - The heart program now reports the time when it times out.
>   Own Id: OTP-1806
> - The handling of busy ports has been changed, resulting in improved I/O performance.
>   Own Id: OTP-1895
>   Aux Id: HA55234
> - All linked-in drivers compiled for earlier releases of OTP must be recompiled before being linked with an R3 emulator, because more fields have been added to the DriverEntry struct. Failure to recompile will most likely result in a core dump.
>   (*** INCOMPATIBILITY with R2 ***)
>   Own Id: OTP-2120
> - The erl_prim_loader and erl_boot_server modules now longer supports the distributed loader method. Instead, there is a new inet loader method. As a consequence, `-loader distributed` option to erl is no longer accepted, and should be replaced with `-loader inet`. Also, `-nodes Nodes` should be replaced with `-hosts Hosts`, where hosts is a list of IP addresses.
>   For further intformation, see the documentation for `cerl`, `erl_boot_server`, and `erl_prim_loader`.
>   (*** INCOMPATIBILITY with R2 ***)
>   Own Id: OTP-2123
> - On Windows 95 and Windows NT, the program `werl` has been added as alternative way to start Erlang. The `werl` program starts Erlang in its own window which has scrollbars, allows command-line editing and cut and paste.
>   The `erl` is retained for situations when Erlang is used in a pipeline or its standard input or output is redirected. The `werl` cannot be used in such situations. The `erl` program can be used interactively too, but only the old shell is provided (no line-editing) and on Windows 95 there is no way to scroll back to see text which has scrolled off.
>   Own Id: OTP-2127
> - Executing a send operation like `{Name, Node} ! Msg`, where Node is the current node and Name is an unregistered name, will now fail silently. In 4.5.3 and earlier releases, this used to failed with a `badarg` reason.
>   Note that the new behaviour is consistent with the behaviour that has always been when Node is a remote node.
>   (*** POTENTIAL INCOMPATIBILITY ***)
>   Own Id: OTP-2129

> ### Known problems

> - <c>os:cmd</c> on WIN32 does not always catch the output from the executed program correctly. There is also a problem with executing programs with space in the path.
>   Own Id: OTP-2371
>   Aux Id: seq813

> ## 1 ERTS 4.5.3

> ### 1.1 Incompatibilities with ERTS 4.5.2

> Because of several bug-fixes in `erl_interface` we were forced to introduce a minor incompatibility concerning the representation of an empty list in the C-code. Previously it was allowed to represent the empty list in two alternative ways of which one alternative was a NULL (0) pointer. This alternative is no longer allowed. If old code containing this representation of empty lists is rebuilt with this version of `erl_interface` they will crash at runtime.

> `erl_interface` does no longer try to convert Erlang lists to C strings (this could cause troubles ). New functions which let the user convert an Erlang list to a C-string are added.

> Own Id: OTP-1401

> ### 1.2 Fixed bugs and malfunctions

> - The limitation of max 32 simultaneously open ports or connections to other Erlang nodes in the Windows NT version is removed.
>   Own Id:OTP-1296
> - `erl_print_term` in `erl_interface` returned the wrong number of characters when the escape character '\' was present in the print-string.
>   Own Id:OTP-1474
> - `erl_interface`: Error when encoding a negative ERL_SMALL_BIG (integer). Resulted in that e.g -2e9 became -1999999999 in the resulting Erlang external format.
>   Own Id:OTP-1314, OTP-1442, OTP-1443
> - `erl_interface`: `erl_match` sometimes gives wrong result.
>   Own Id:OTP-1386
> - `erl_interface`: Problems with memory management caused by inconsistent handling of empty lists (two alternative representations). NULL (0) pointer removed as valid representation.
>   Own Id:OTP-1401
> - The `ets:match/2` function could fail to return all matches on Beam if the pattern contained a constant key (for instance, {directory, '$1'}) and a garbage collection occurred inside the `erlang:db_match/2` BIF.
>   Own Id: OTP-1483
> - The documentation for the `suspend` flag `trace/3` BIF has been corrected. It used to say that a suspended process would be scheduled on normal events such as message passing; this is no longer the case.
>   Own Id: OTP-1487

> ### 1.3 Known bugs and limitations

> - If trace on receive is enabled in Beam with the trace/3 BIF, an timeout trace will be generated every time the process executes a receive statement and there is no messages.
>   Own Id: OTP-1486

> ### 1.4 Improvements and new features

> - The following improvements regarding `erl_interface` are done:
>   - Macros to retrieve the fields of `ETERM` is added.
>     Own Id: OTP-1473
>   - There is now *one* representation for an empty list, not two as is used to be. An empty list is represented by the `Erl_EmptyList` structure. There is a new macro, `ERL_IS_EMPTY_LIST(ep)`, to test for an empty list.
>   - None of the type checking macros (`ERL_IS_LIST(ep)`, `ERL_IS_TUPLE(ep)`, etc), accept NULL pointers any longer. Make sure to only pass valid ETERM pointers.
>   - `erl_cons(head, tail)` now requires tail to be a non-NULL pointer. To represent the end of a list, use the return value from erl_mk_empty_list().
>   - `erl_length()` now only works for a proper list; i.e. for the the term [a|b], erl_length() returns -1.
>   - `erl_tl()`, `erl_hd()` is now silent if given a bad list (but still returns NULL).
> - Own Id:

> ## 2 ERTS 4.5.2

> ### 2.1 Incompatibilities with ERTS 4.5.1

> Due to changes in code generation for BEAM, all BEAM code must be recompiled.

> ### 2.2 Fixed bugs and malfunctions

> - Order of messages received could be wrong for a suspended process waiting for a busy port.
>   Own Id:OTP-1421

> ## 3 ERTS 4.5.1

> ### 3.1 Incompatibilities with ERTS 4.5

> Due to changes in code generation for BEAM, all BEAM code must be recompiled.

> ### 3.2 Fixed bugs and malfunctions

> - The include file `decl.h` was missing in the distribution.
>   Own Id:OTP-1395
>   Aux Id:HA48525
> - Exit process when the process is in the timeout queue crashes emulator (BEAM only).
>   Own Id:OTP-1396
> - Error in send primitive in BEAM, which cause the Table Visualizer to crash GS. (BEAM only).
>   Own Id:OTP-1399
> - Error in distributed Erlang, where simultaneous connects between two nodes could crash the emulator (bus error), has been corrected.
>   Own Id:OTP-1403

> ## 4 ERTS 4.5

> ### 4.1 Improvements and new features

> - The Erlang emulator now produces "crash-dumps" if it detects some internal error and terminates it self in a controlled way. The "crash-dump" is written to a file named `erl_crash.dump` or fetches the name from the environment variable `ERL_CRASH_DUMP` if it is defined.
>   Owd Id: OTP-1215
> - The previous solution with different binaries for DNS and NO_DNS is changed to a solution with only one binary wich can adjust it's behaviour in run time.
>   Where it is possible to choose between two different methods of name resolution, e.g. Solaris 2, the `emulator`, `erl_interface`, `erl_call` and `epmd` check the environment variable `ERL_RESOLV` to determine if the DNS resolver should be used or not. If `ERL_RESOLV` has the value `nodns` the regular name resolution method `gethostby{name|addr}` will be used, if `ERL_RESOLV` has the value `dns` the Domain Name Service `res_gethostby{name|addr}` will be used.
> - Dynamic Driver Loading and Linking
>   If the underlying operating system support dynamic loading and linking of shared objects, drivers can be loaded into a running emulator. After loading the driver can be used exactly like a linked-in driver. See the manual page for `erl_ddll` for details.
> - The file-driver is enhanced to support the revised `file` module in `stdlib`.
>   Own Id:OTP-1075
> - The internal representation of string constants in BEAM is significantly improved which result in decreased code size for BEAM compiled modules.
> - The port program `authchk` is removed and replaced by code in the erlang module `auth`.

> ### 4.2 Incompatibilities with ERTS 4.4.2

> - In order to run the BEAM-emulator 4.4.1 all Erlang modules must be recompiled.
> - The possibility to start as an old fashioned Erlang system with `start_old.boot` is no longer supported.
>   Own Id:OTP-1335

> ### 4.3 Fixed bugs and malfunctions

> - `erl_print_term` in `erl_interface` now return the number of chars written.
>   Own Id:OTP-1092
> - A new BIF match_object is introduced for internal use by the `ets` module and `mnesia`.
>   A match operation on a huge table is divided into several blocks, otherwise the Erlang system might be blocked for a too long time. This new function is required by Mnesia.
>   Own Id:OTP-1325
> - The Erlang system now returns error codes when the system is terminated. These error codes is used e.g to interrupt Make when a syntax fault is encountered when compiling an Erlang program with `erl -compile`. A new utility `erlc` which is a front-end for compilation of Erlang programs (and many other things) is also added.
>   Own Id:OTP-1201,OTP-1326
>   Aux Id:HA41029
> - The ERL_TICK protocol towards a HIDDEN node (a c-node) is corrected. An ERL_TICK is now sent if the Erlang node has not received anything from the HIDDEN node within the TICK interval.
>   Own Id:OTP-1254,OTP-1322
> - The handling of timers in the new timing wheel algorithm is corrected. Timeouts was too short or too long during certain circumstances.
>   Own Id:OTP-1270
> - Long timeouts is corrected (was too long e.g 900 sec became 912 sec).
>   Own Id:OTP-1273
> - Corrected communication problems between Erlang nodes (caused segmentation fault).
>   Own Id:OTP-1345

> ## 5 ERTS 4.4.2

> ### 5.1 Improvements and new features

> The handling of timeouts in the emulator (both jam and beam) is implemented with a new algorithm (Timing Wheel) which will execute a system which uses many timeouts ("receive ... after") more efficiently.

> The detection of absent Erlang nodes in a distributed configuration is enhanced. I.e a node that does not respond is detected earlier.

> ### 5.2 Incompatibilities with ERTS 4.4.1

> In order to run the BEAM-emulator 4.4.2 all Erlang modules must be recompiled.

> ### 5.3 Fixed bugs and malfunctions

> - `erl_interface.h` file no longer contains invalid characters.
>   Own Id:OTP-1176
>   Aux Id:HA39735

> ## 6 ERTS 4.4.1

> ### 6.1 Improvements and new features

> Added unlimited number of variables in `ets:match/2`.

> ### 6.2 Incompatibilities with ERTS 4.4

> -

> ### 6.3 Fixed bugs and malfunctions

> - `open_port({spawn,10},[])` caused the emulator to crash.
>   Own Id:OTP-1011
> - `binary_to_term` caused the emulator to crash if the binary contained data which was not a valid format to create a term from.
>   Own Id:OTP-1013
> - The emulator could be hanging when pinging other node which is in CTRL-c mode.
>   Own Id:OTP-1068
> - Correction of documentation of erlang:hash/2.
>   Own Id:OTP-1016
> - Documentation of time-stamped traces.
>   Own Id:OTP-1031
> - CTRL-break handler error on SunOS5.
>   Own Id:OTP-1071
> - `universaltime_to_localtime` did compute the wrong date (sometimes).
>   Own Id:OTP-1081
> - Lack of memory crash. The error was caused by incorrect flow- control between distributed Erlang nodes which caused the sending node to buffer up far to much when the receiving node wasn't ready to receive the data.
>   Own Id:OTP-1082
>   Aux Id:HA35160
> - During certain circumstances a dead-lock between a port program (e.g. esock) and the Erlang emulator could occur. This is solved by adding non-blocking I/O to the Erlang run-time I/O system for spawned port programs (spawn driver).
>   Own Id:OTP-1085
>   Aux Id:HA35005
> - Limit on number of variables in ets table queries removed. Caused Mnemosyne queries to fail.
>   Own Id:OTP-1016, OTP-1124
>   Aux Id: HA36605
> - Emulator bug: TCP buffers to much. Related to OTP-1082 above.
>   Own Id:OTP-1108
> - Communication problems between Erlang nodes. A node which made a re-connection attempt to another node, before the other node had recognised (by timeout or otherwise) that the first node had gone down, would be rejected. Now new connection attempts are always recognised.
>   Own Id: OTP-1110
>   Aux Id: HA36954

> ## 7 ERTS 4.4

> ### 7.1 Improvements and new features

> - New BIF:s for handling of local and universal time:
>   - `erlang:localtime/0`
>   - `erlang:localtime_to_universaltime/1`
>   - `erlang:universaltime/0`
>   - `erlang:universaltime_to_localtime/1`
> - A new information item `message_queue_len` which returns the nubmer of messages currently in a process message queue is added , and can be fetched with `process_info/1` and `process_info/2`.
> - The internal implementation of `ets`-tables is improved, which results in faster access to the data. This is an improvement which the DBMS Mnesia benefits from since it uses `ets`- tables as base for it's implementation.
> - `erl_call` is a new utility which is now supported. It was previously delivered as an example of how to use the `erl_interface` library.
> - A new process priority `high` is added. The scheduling between processes with priority `high` works like normal but processes with priorities `low` and `normal` will not get any time slice.
> - The start command `otp` is changed back to `erl`.
> - `time_stamp` added as a new flag to the BIF `erlang:trace/3`. When `time_stamp` is on the trace messages which are tuples will have an additional last element which is the time_stamp in the same format as returned by `erlang:now/0`.

> ### 7.2 Incompatibilities with ERTS in OTP P1H

> There are no incompatibilities in this step.

> ### 7.3 Fixed bugs and malfunctions

> The priority returned from the BIF `process_info(Pid)` was the priority of the calling process and not as it should be the priority of the process denoted by `Pid`.

Copyright © 1991-99 Ericsson Utvecklings AB