## 1 Erts Release Notes

This document describes the changes made to the Erts application.

### 1.1 Erts 5.4.8

#### 1.1.1 Fixed Bugs and Malfunctions

- ets:delete/1 now allows other Erlang process to run when a large table is being deleted.
  Own Id: OTP-5572
- A bug regarding tcp sockets which results in hanging `gen_tcp:send/2` has been corrected. To encounter this bug you needed one process that read from a socket, one that wrote more date than the reader read out so the sender got suspended, and then the reader closed the socket. (Reported and diagnosed by Alexey Shchepin.)
  Corrected a bug in the (undocumented and unsupported) option '{packet,http}' for gen_tcp. (Thanks to Claes Wikstrom and Luke Gorrie.)
  Updated the documentation regarding the second argument to `gen_tcp:recv/2`, the Length to receive.
  Own Id: OTP-5582 Aux Id: seq9839
- Erlang/OTP will now build on Mac OS X 10.4 "Tiger" (the problem was that 10.4 has a partially implemented poll() function that can't handle devices). Also, on Mac OS X 10.3 "Panther", Erlang/OTP will now use select() instead of poll() (because poll() on Mac OS X 10.3 is implemented using select()).
  Own Id: OTP-5595
- A bug in the file driver when opening a file in compressed mode, and the returned allocated pointer from the compressing library was in very high memory (>= 2GB), causing e.g. file:read/2 to return {error,ebadf}, has been corrected.
  Own Id: OTP-5618

#### 1.1.2 Improvements and New Features

- The new 'fun M:F/A' construct creates a fun that refers to the latest version of M:F/A. This syntax is meant to replace tuple funs '{M,F}' which have many problems.
  The new type test 'is_function(Fun, A)' (which may be used in guards) test whether Fun is a fun that can be applied with A arguments. (Currently, Fun can also be a tuple fun.)
  Own Id: OTP-5584
- In the hipe application, there's a new experimental register allocator (optimistic coalescing), and the linear scan register allocator is now also available on ppc. Plus lots of cleanups.
  Minor hybrid heap corrections.
  The maximum size of a heap used to be articially limited so that the size of a heap would fit in 28 bits; that limitation could cause the emulator to terminate in a garbage collection even if there still was available memory. Now the largest heap size for a 32 bit CPU is 1,699,221,830 bytes. (Thanks to Jesper Wilhelmsson.)
  Also removed the undocumented +H emulator option.
  Own Id: OTP-5596

### 1.2 Erts 5.4.7

#### 1.2.1 Fixed Bugs and Malfunctions

- to_erl could close unexpectedly on Linux systems. Also, output from the emulator could be lost. Corrected.
  Own Id: OTP-5561

#### 1.2.2 Improvements and New Features

- The cpu_timestamp option for erlang:trace/3 is now also supported on Linux.
  Own Id: OTP-5532 Aux Id: seq9813
- The last known werl window size/position is now saved correctly when werl is stopped with the window minimized. A problem with the placement not being saved if the emulator is halted or stopped from the JCL menu has also been fixed.
  Own Id: OTP-5544 Aux Id: OTP-5522

### 1.3 Erts 5.4.6

#### 1.3.1 Fixed Bugs and Malfunctions

- Some math libraries do not always throw floating-point exceptions on errors. In order to be able to use these libraries, floating-point errors are now more thoroughly checked.
  Misc floating-point fixes for Linux and MacOSX.
  Own Id: OTP-5467
- An internal buffer was sometimes not cleared which caused garbage to appear in error messages sent to the error logger.
  errno was sometimes clobbered which caused erroneous error reports about poll() errors.
  Only emulators on unix platforms were affected by these bugs.
  Own Id: OTP-5492
- The ethread library now works on OpenBSD
  Own Id: OTP-5515
- Corrected a bug in the (undocumented and unsupported) option '{packet,http}' for gen_tcp. (Thanks to Claes Wikstrom and Luke Gorrie.)
  Own Id: OTP-5519

#### 1.3.2 Improvements and New Features

- binary_to_term/1 could cause the emulator to crash when given invalid pids or funs.
  Own Id: OTP-5484 Aux Id: seq9801
- Some more stability problems were fixed in the hybrid-heap emulator.
  Own Id: OTP-5489
- After werl was closed with the window minimized, it was not possible to restart werl with an open window. A temporary solution has so far been implemented that restores the initial window settings every time werl is started.
  Own Id: OTP-5522

### 1.4 Erts 5.4.5

#### 1.4.1 Fixed Bugs and Malfunctions

- If a process had node links (created by monitor_node/2), excuting process_info(Pid, memory) for that process would crash the emulator.
  Own Id: OTP-5420
- Minor corrections to the help text printed by 'erlc -help'. The documentation for erlc was also slightly updated.
  Own Id: OTP-5428
- 32-bit words were used for offsets in the garbage collector. This caused the emulator to crash on 64-bit machines when heaps were moved more than 4 GB during garbage collection.
  Own Id: OTP-5430
- is_boolean(42.5) failed to load if optimization was explicitly turned off.
  Own Id: OTP-5448
- If there was a call to Module:foo/X from any loaded module, the returned by M:module_info(exports) would always include {foo,X} (even though Module:foo/X if was not defined).
  Own Id: OTP-5450 Aux Id: seq9722

#### 1.4.2 Improvements and New Features

- The c option for the +B flag has been introduced which makes it possible to use Ctrl-C (Ctrl-Break on Windows) to interrupt the shell process rather than to invoke the emulator break handler. All new +B options are also supported on Windows (werl) as of now. Furthermore, Ctrl-C on Windows has now been reserved for copying text (what Ctrl-Ins was used for previously). Ctrl-Break should be used for break handling. Lastly, the documentation of the system flags has been updated.
  Own Id: OTP-5388

### 1.5 Erts 5.4.4

#### 1.5.1 Fixed Bugs and Malfunctions

- The function `erlang:float/1` can now be used in match specifications and is recognized by `dbg:fun2ms/1` and `ets:fun2ms/1`. This addition is part of the work to "harmonize" match specification guards with Erlang guards.
  Own Id: OTP-5297 Aux Id: OTP-4927
- The register/2 BIF would return 'true' even if the second argument was not a pid for living process. Corrected to cause an exception.
  Own Id: OTP-5324 Aux Id: seq9698
- In the 'bag' type of ets tables, elements having the same key were supposed to be order in insertion order. The would be wrong if a rehash occurred.
  Own Id: OTP-5340 Aux Id: seq9704
- Linked in drivers in the crypto, and asn1 applications are now compiled with the -D_THREAD_SAFE and -D_REENTRANT switches on unix when the emulator has thread support enabled.
  Linked in drivers on MacOSX are not compiled with the undocumented -lbundle1.o switch anymore. Thanks to Sean Hinde who sent us a patch.
  Linked in driver in crypto, and port programs in ssl, now compiles on OSF1.
  Minor makefile improvements in runtime_tools.
  Own Id: OTP-5346
- Fixed a bug in the hybrid heap in distributed send operations.
  Own Id: OTP-5361
- A BIF erlang:raise/3 has been added. See the manual for details. It is intended for internal system programming only, advanced error handling.
  Own Id: OTP-5376 Aux Id: OTP-5257
- Mikael Pettersson (HiPE) corrected a few bugs in the emulator that caused problems when compiled with the experimental gcc-4.0.0.
  Own Id: OTP-5386

#### 1.5.2 Improvements and New Features

- Minor update of the internal documentation of the epmd protocol.
  The listen port of epmd has now been registered at IANA: http://www.iana.org/assignments/port-numbers
  Own Id: OTP-5234
- run_erl.c now works on Mac OS X and FreeBSD.
  Own Id: OTP-5384
- A few bugs were corrected in the hipe application.
  Own Id: OTP-5385

### 1.6 Erts 5.4.3

#### 1.6.1 Fixed Bugs and Malfunctions

- Font and color preferences for werl.exe now can be saved even after the first time you run werl.exe. The window position and size is also saved. Patch from James Hague who did all the hard work.
  Own Id: OTP-5250
- OTP archive libraries, e.g. the erl_interface library, on MacOSX could not be used without first rerunning ranlib on them. This bug has now been fixed.
  Own Id: OTP-5274
- Bugs in `erlang:hash/2` and `erlang:phash/2` on 64-bit platforms have been fixed.
  Own Id: OTP-5292

#### 1.6.2 Improvements and New Features

- Corrected a crash in the 64-bits emulator.
  Corrected a problem in the hybrid heap emulator.
  In the chapter about the abstract format in the ERTS User's Guide, updated the last section about how the abstract format is stored in BEAM files.
  Own Id: OTP-5262
- The maximum number of concurrent threads in the internal ethread thread package has been limited to 2048.
  Own Id: OTP-5280

### 1.7 Erts 5.4.2.1

#### 1.7.1 Improvements and New Features

- If Erlang/OTP was installed in a short directory name, such as "C:\Program\erl5.4.2", the emulator would not start.
  Own Id: OTP-5254

### 1.8 Erts 5.4.2

#### 1.8.1 Fixed Bugs and Malfunctions

- If one used select/3 and select/1 on a non-fixed table and deleted objects simultaneously, the emulator could crash. Note that the result of such simultaneous operations on tables that are not in a fixed state is still undefined, but the emulator crash is, needless to say, fixed.
  Own Id: OTP-5209 Aux Id: seq9198
- Arithmetic with big numbers could crash the emulator.
  The HiPE native code compiler and run-time code in the emulator has been updated. (Note: Native code is still not supported.)
  Eliminated a few bugs that could crash the hybrid emulator (which is not supported).
  Own Id: OTP-5233 Aux Id: seq9587

### 1.9 Erts 5.4.1

#### 1.9.1 Fixed Bugs and Malfunctions

- The ethread library was unnecessarily rebuilt multiple times during the build process, also a debug version of the library was build during the install phase. These unnecessary builds have now been removed. Note, the content of the installed Erlang/OTP system is not effected at all by this change.
  Own Id: OTP-5203
- The emulator could fail to clear the memory segment cache. This could potentially cause memory allocation to unnecessarily fail when memory usage was close to its maximum. This bug has now been fixed.
  Own Id: OTP-5211
- std_alloc (std short for standard) was sometimes called def_alloc (def short for default). std_alloc is now everywhere refered to as std_alloc.
  Own Id: OTP-5216
- A documentation bug has been corrected in the erts_alloc(3) documentation. It was stated that some of the memory allocators present were by default disabled. This is true for Erlang/OTP R9C, but is not true for Erlang/OTP R10B. In R10B all memory allocators present are enabled by default.
  Own Id: OTP-5217

#### 1.9.2 Improvements and New Features

- The emulator now close all open files and sockets immediately after receiving an USR1 signal. This causes the emulator to unregister at epmd as early as possible.
  Own Id: OTP-5221 Aux Id: OTP-4985, seq9514
- Try/catch support in the emulator slightly updated.
  Own Id: OTP-5229

### 1.10 Erts 5.4

#### 1.10.1 Fixed Bugs and Malfunctions

- The BIF is_record(Record, RecordTag) has been added to the run-time system. It checks that Record is a tuple whose first element is the atom RecordTag. No check is made of the size of the tuple (because the run-time system doesn't know anything about records).
  Note that normally the compiler translates calls to is_record/2 to code that also verify the size of the tuple, in addition to verifying the first element. The BIF version will be used is_record/2 is applied or if the second argument is not a literal atom (e.g. an variable or another term type, in which case the BIF will generate a badarg exception).
  Own Id: OTP-4812
- Guards of mach specifications are corrected to resemble the semantics of guards in real code more closely. The implementation now corresponds to the documentation in erts users guide. The following things are corrected:
  - Guard sematics was wrong when it came to logical operators and exceptions. {'or', {'is_integer','$1'}, {'or', '$1', '$1'}} evaluated to true with '$1' bound to an integer.
  - Unary + and - was not implemented
  - Calling operators as Bif's was not supported by ets/dbg:fun2ms (erlang:'or'(A,B) etc)
  - Old typetests (like integer(X) instead of is_integer(X)) was not supported by ets/dbg:fun2ms
  - Semicolon (;) in guards was not supported by ets/dbg:fun2ms
  *** POTENTIAL INCOMPATIBILITY ***
  Own Id: OTP-4927
- A potential initialization failure when using threads and elib_malloc has been removed.
  Own Id: OTP-5125
- Several problems in the 64-bit emulator has been corrected. For instance, the emulator could crash while running the debugger.
  Own Id: OTP-5146
- The match spec parse transform `ms_transform` no longer accepts the `andalso` and `orelse` constructs in guards for consistency with the standard Erlang language. A future release of Erlang/OTP may allow `andalso` and `orelse` in guards.
  *** POTENTIAL INCOMPATIBILITY ***
  Own Id: OTP-5149
- In rare circumstances in a process that has caught exceptions and uses funs, the process would be killed when changing code because the code server would think that the process still held references to the funs.
  Own Id: OTP-5153
- `erlang:system_monitor/2` no longer sends any monitoring messages to the system monitor process from itself. This behavior is more consistent with other trace functionality.
  *** POTENTIAL INCOMPATIBILITY ***
  Own Id: OTP-5183

#### 1.10.2 Improvements and New Features

- The documentation stated that ets:safe_fixtable/2 could return true or false, that was wrong, it always returns true.
  Own Id: OTP-4830
- The unary '+' operator has been changed to throw an 'badarith' exception if its argument is not numeric (or fail in a guard). It used its argument unchanged whatever the type. Given the new meaning, unary '+' can now be used to test whether a term is numeric.
  *** POTENTIAL INCOMPATIBILITY ***
  Own Id: OTP-4928
- Process identifiers and port identifiers have been made more unique. Previously 18 bits were used as id in the internal representation of process and port identifiers. Now 28 bits are used.
  The maximum limit on the number of concurrently existing processes due to the representation of pids has been increased to 268435456 processes. The same is true for ports. This limit will at least on a 32-bit architecture be impossible to reach due to memory shortage.
  NOTE: By default, the `ERTS`, and the `erl_interface`, `ei`, and `jinterface` libraries are now only guaranteed to be compatible with other Erlang/OTP components from the same release. It is possible to set each component in compatibility mode of an earlier release, though. See the documentation for respective component on how to set it in compatibility mode.
  *** POTENTIAL INCOMPATIBILITY ***
  Own Id: OTP-4968 Aux Id: OTP-4196
- A new internal thread library for the ERTS has been added.
  Own Id: OTP-5048
- The system's performance could degrade severely if one process held numerous links or monitors. The issue is resolved.
  Own Id: OTP-5079
- A new function, string:to_integer/1, has been added.
  Own Id: OTP-5081 Aux Id: OTP-5136
- A new function, string:to_float/1, has been added.
  Own Id: OTP-5136 Aux Id: OTP-5081
- The exception code for calling a fun with wrong number of arguments has been changed from simply `badarity` to `{badarity,{Fun,Args}}`.
  *** POTENTIAL INCOMPATIBILITY ***
  Own Id: OTP-5139
- The long-awaited `try`...`catch` construction is included in this release. However, its use in production code is not yet supported as there are several known cases of legal code crashing the compiler. We plan to release a patch to the compiler (including the documentation) and at that time `try`...`catch` will be supported.
  Own Id: OTP-5150

### 1.11 Erts 5.3.6.6

#### 1.11.1 Fixed Bugs and Malfunctions

- A bug that caused an emulator crash when using system monitor of long GC has been fixed.
  Own Id: OTP-5123

### 1.12 Erts 5.3.6.5

#### 1.12.1 Fixed Bugs and Malfunctions

- erlang:memory(ets), and c:memory(ets) sometimes reported erroneous values. This bug has now been fixed.
  Own Id: OTP-5115 Aux Id: seq9063
- There is now a packet size limit option for `gen_tcp` sockets. See the manual for `inet:setopts/2`.
  The ASN.1 BER packet decoding for `gen_tcp` sockets can now decode indefinite length packets.
  Own Id: OTP-5128

#### 1.12.2 Improvements and New Features

- Port index was unnecessarily incremented by port table size when port table got full. This unnecessary increment has now been removed.
  Own Id: OTP-5119

### 1.13 Erts 5.3.6.3

#### 1.13.1 Fixed Bugs and Malfunctions

- Resolved a build problem on Mac OS 10.3 ("Panther"). Because of a conflict with the zlib sources included in the Erlang run-time system and the zlib library included in Panther, linking would fail.
  Minor optimization on all Unix systems: caching the system name returned from the uname() system call. (Thanks to David N. Welton.)
  Own Id: OTP-5069

#### 1.13.2 Improvements and New Features

- The ability to set system wide options for TCP sockets is added through the kernel application variables inet_default_listen_options and inet_default_connect_options, see the inet manual page for details.
  Own Id: OTP-5080

### 1.14 Erts 5.3.6.2

#### 1.14.1 Fixed Bugs and Malfunctions

- A few portability enhancements for the R9C-1 Open Source release: The installer for Windows can now be built with NSIS 2.0 (as well as with the NSIS 2.0b3). The driver header files updated to allowed drivers to be built wich the MinGW compiler on Windows. Minor portability enhancement in io_lib:fread.
  Own Id: OTP-4789
- Conversion of extremely small floating point numbers in the external format (distribution) could sometimes fail leading to unexpected closing of distribution channels, i.e. generating nodedowns for healthy nodes.
  Own Id: OTP-5026 Aux Id: seq8631 EABln12478

### 1.15 Erts 5.3.6.1

#### 1.15.1 Fixed Bugs and Malfunctions

- Conversion of extremely small floating point numbers in the external format (distribution) could sometimes fail leading to unexpected closing of distribution channels, i.e. generating nodedowns for healthy nodes.
  Own Id: OTP-5026 Aux Id: seq8631 EABln12478

#### 1.15.2 Improvements and New Features

- Remote spawn on a nonreachable node now gives warning instead of error in the error_log.
  Own Id: OTP-5030 Aux Id: seq8663]

#### 1.15.3 Known Bugs and Problems

- Emulator with elib_malloc enabled could hang when many I/O threads were in use.
  Own Id: OTP-5028 Aux Id: EABln13041, EABln12253

### 1.16 Erts 5.3.6

#### 1.16.1 Fixed Bugs and Malfunctions

- Distributed monitoring in combination with nodes restarting did not behave correctly in rare circumstances.
  Own Id: OTP-4914
- A module containing code similar to 'receive after 4.1' could not be loaded.
  Own Id: OTP-4963 Aux Id: seq8344
- Problems fixed in file:open/2: "/dev/null" can now be opened. Opening a FIFO will now return an error instead of hanging the emulator. The documentation has been updated to point out that file:open/2 returns the error code `eisdir` when the pathname is not a regular file (the pathname is not necesserarily a directory).
  Own Id: OTP-4992

#### 1.16.2 Improvements and New Features

- The Solaris kernel poll feature was changed from a compile time option to a runtime option. The kernel poll feature can be enabled, by passing the command-line argument "+K true" to an emulator (see erl(1)) that have kernel poll support, i.e. an emulator for Solaris 8. By default the kernel poll feature is disabled.
  Own Id: OTP-4979 Aux Id: seq8478
- Before the Erlang emulator writes an erl_crash.dump file (for any reason), it will close all open files and sockets.
  Own Id: OTP-4985 Aux Id: EABln10730, EABln11277, EABln11279
- The '+c' switch has been added to disable time correction in the runtime system, this should be used on systems where one is certain no dramatic wall clock time changes will occur and the time correction algorithm is too costly (namely very fast Linux systems where loads of erlang:now() are executed).
  Own Id: OTP-4986
- The process_flag/2,3 BIFs now take a flag min_heap_size that allows changing an existing process's minimum heap size. The actual size will only be changed when the next garbage collection occurs.
  Own Id: OTP-4991 Aux Id: seq8515, OTP-4987

### 1.17 Erts 5.3.4

#### 1.17.1 Improvements and New Features

- A possibility to make distribution messages be qued up during running of erlang code, so that larger packages is sent over the network is added.
  Own Id: OTP-4916
- When code loading failed it was impossible to know exactly what caused it, only {undef,[{M,F,A}|...]} would be reported. Now the primitive loader lets the error_logger print an error report if a file operation fails. All file errors except enoent and enotdir are reported this way.
  Own Id: OTP-4925 Aux Id: OTP-4952

### 1.18 Erts 5.3.3

#### 1.18.1 Fixed Bugs and Malfunctions

- The driver for dynamically linked in drivers has been fixed to delete loaded drivers when its erlang server dies. The erlang server has also been updated to improve the start-on-demand behaviour.
  Own Id: OTP-4876 Aux Id: OTP-4855 seq8272
- `erlang:register/2` does no longer generate an ERROR REPORT to the error logger when the name already is registered. If the name is already registered the process function will crash with {'EXIT',Reason} and that is enough. It is up to the caller to decide if it is an error that the name is already registered.
  Own Id: OTP-4892
- When using erlang:system_monitor(Pid,{long_gc,Time}), and the GC time exceeded 1 second, it sometimes erroneously showed up as about 4300 seconds. This bug has now been corrected.
  Own Id: OTP-4903 Aux Id: seq8379

#### 1.18.2 Improvements and New Features

- Starting Erlang with the +Bi flag (to ignore ^C), now also disables the quit ('q') option in the JCL menu.
  Own Id: OTP-4897

### 1.19 Erts 5.3.2

#### 1.19.1 Improvements and New Features

- The elib_malloc alternative dynamic memory allocator has been improved to use an address order best fit strategy. The instrumented emulator has been improved to be able to catch memory allocations done by external libraries. The emulator flag '+r' (stands for "relocate") makes ets updates always result in an object relocation, which significantly lessens the memory fragmentation in certain systems. The erlang:system_info/1 bif can now be called with the argument 'ets_realloc_moves' and will return true if the '+r' emulator flag is in effect, false otherwise.
  Own Id: OTP-4838 Aux Id: seq8156

Copyright © 1991-2005 Ericsson AB