2006 2016 Ericsson AB. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Erl_Interface Release Notes History

## Erl_Interface 3.4

### Fixed Bugs and Malfunctions

erl_print_term() and erl_copy_term() could not previously handle uints. This bug has now been fixed.

Own Id: OTP-4061 Aux Id: seq7079

ei_x_format() was not working correctly for floating point arguments on some platforms. This is now corrected.

Own Id: OTP-4379

erl_compare_ext() did not compare the node parts of pids, ports, and references. This has now been fixed. Comparison between two pids, ports, or references does now conform to the Erlang specification.

Own Id: OTP-4512 Aux Id: OTP-4511

### Improvements and New Features

Erl_Interface and EI now supports 64 bit architectures.

Own Id: OTP-4772

There are new functions that support the GCC and Visual C++ 64 bit extended integer types.

`int ei_decode_longlong(const char *buf, int *index, EI_LONGLONG *p); int ei_decode_ulonglong(const char *buf, int *index, EI_ULONGLONG *p); int ei_encode_longlong(char *buf, int *index, EI_LONGLONG p); int ei_encode_ulonglong(char *buf, int *index, EI_ULONGLONG p); int ei_x_encode_longlong(ei_x_buff* x, EI_LONGLONG n); int ei_x_encode_ulonglong(ei_x_buff* x, EI_ULONGLONG n);`

Own Id: OTP-4772

If you compile the library from source you can use the ei library together with GMP, the GNU multi precision library, to convert integers larger than 64 bits from and to the external format.

`int ei_decode_bignum(const char *buf, int *index, mpz_t obj); int ei_encode_bignum(char *buf, int *index, mpz_t obj); int ei_x_encode_bignum(ei_x_buff *x, mpz_t obj);`

Own Id: OTP-4772

Some general code improvements where done like correcting buffer sizes, added more error checking etc.

Own Id: OTP-4772

In order to conform to the Erlang specification, comparison between two pids was changed in the R9B release. This change did however break a deadlock prevention algorithm used by Mnesia during release upgrade. Therefore, comparison between two pids has been changed back so that R9B nodes are compatible with Erlang nodes running pre-R9 releases.

Pre-R9 comparison between two pids which now is used again: If t1 and t2 are both pids, t1 will precede t2 if and only if either

the node local id of t1 precedes the node local id of t2, or the node local ids of t1 and t2 are equal, and node(t1) precedes node(t2), or the node local ids of t1 and t2 are equal, and also node(t1) and node(t2) are equal, and node(t1) was created before node(t2).

The node local id consist of two integers; serial which is most significant, and number.

The Erlang specification states: If t1 and t2 are both refs, both PIDs, or both ports, then t1 precedes t2 if and only if either

node(t1) precedes node(t2), or node(t1) equals node(t2) and t1 was created before t2.

Note that comparisons between two refs, or two ports will still conform to the Erlang specification.

*** POTENTIAL INCOMPATIBILITY ***

Own Id: OTP-4715 Aux Id: OTP-4511, OTP-4512

## ErlInterface 3.3

### Improvements and New Features

Erl_Interface has been rewritten extensively. The library ei is now documented and supported. The old erl_interface is considered obsolete, and provided only for backward compatibility.

Erl_Interface is now thread-safe, and multiple C-nodes may run from the same process.

New functions are added for connecting and accepting connections from ei; these are documented in ei_connect.

New functions are added for converting to and from Erlang binary format; these are documented in ei.

## Erl_Interface 3.2.9

### Fixed Bugs and Malfunctions

Changed back the return values from erl_send() and erl_reg_send() to 1 (as they used to be). Incompatible with plain R7, compatible with previous versions.

*** INCOMPATIBILITY with R7B ***

Own Id: OTP-3772

A race-condition bug in the term allocation routines was corrected.

Own Id: OTP-3809

Erl_Interface could not be linked with pthreads.

Own Id: OTP-3810 Aux Id: Seq 5032

The TCB of VxWorks processes no longer grows when erl_errno is accessed. On Pthreads platforms the use of erl_errno no longer crashes programs using multithreading.

Own Id: OTP-3820

Name clashes between Erlang emulator and Erl_Interface on VxWorks removed.

Own Id: OTP-3824

## Erl_Interface 3.2.3

### Fixed Bugs and Malfunctions

Memory lossage affecting pids, ports and refs fixed.

## Erl_Interface 3.2.2

### Improvements and New Features

An error reporting facility erl_errno has been introduced.

Own Id: OTP-3641

ETERMs are now shrunk to a more reasonable size.

Own Id: OTP-3648

## Erl_Interface 3.2.1

### Fixed Errors and Malfunctions

Lists containing negative numbers were incorrectly encoded by erl_encode(). This has been corrected.

Own Id: OTP-3535

## Erl_Interface 3.2

### Improvements and New Features

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

The function erl_receive_msg has the problem that a fixed buffer must be given - a larger message than expected is simply discarded. A function erl_xreceive_msg has been introduced, which dynamically resizes the buffer given to it, if needed.

Own Id: OTP-3313 Aux Id: OTP-2927

## Erl_Interface 3.1.1

### Improvements and New Features

#ifdef __cplusplus extern C { is added to all the erl*.h and ei*.h files in order to support use from C++.

On Unix the object files are now produced with the -fPIC option to make it possible to include them in a shared library.

Own Id: OTP-3138 Aux Id: Seq 1722

## Erl_Interface 3.1

### Fixed Bugs and Malfunctions

A buffer overflow in erl_connect() was causing C-node crashes on Linux.

Own Id: OTP-2743

When decoding very long strings (more than 65535 characters) the terminating 0 was left out.

Own Id: OTP-2744

erl_accept() was not handshaking properly with Erlang, causing incoming connection attempts to fail.

Own Id: OTP-2862

Very large negative numbers are no longer encoded incorrectly.

Own Id: OTP-2897

Atoms could sometimes contain an unterminated string. This is fixed.

Own Id: OTP-2956

Erl_Interface now uses the SENS resolver functions if they are available at runtime. This primarily concerns use on the VxWorks platform.

Own Id: OTP-3034 Aux Id: Seq 1559

The documentation for erl_connect_init() no longer makes erroneous reference to the remote node.

Own Id: OTP-3102 Aux Id: Seq 1671

### Improvements and New Features

Erl_Interface has been moved out of the Erlang runtime system (ERTS) and is now a separate application. This has implications for all users of Erl_Interface, who will need to make changes to the Makefiles used to build applications based on Erl_Interface. In particular, header and library files are no longer in $(OTPROOT)/usr/. The include and lib directories are now located in the directory $(OTPROOT)/lib/erl_interface-3.1 (i.e. the directory name is now version specific).

Own Id: OTP-3082