20062016 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. STDLIB Release Notes
STDLIB 1.13
Fixed Bugs and Malfunctions

For the bit syntax, when matching with a size field that is bound during the same matching, a warning for unused variable was emitted. This bug has been fixed.

Own Id: OTP-4858

When parsing a badly formed file epp hangs. This problem has been fixed.

Own Id: OTP-4871 Aux Id: OTP-4870

Bugs concerning guards have been fixed in the Erlang interpreter.

Own Id: OTP-4885

The linter now checks the record name when calling the function erlang:is_record/2.

Own Id: OTP-4886

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 User's Guide. The following things are corrected:

Guard semantics 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 bug that could cause a crash has been fixed in the file_sorter module. The crash could only occur when sorting or merging to a file and the input function returned {end_of_input, Value}.

Own Id: OTP-5009

A function clause exit in filelib:fold_files/5 has been fixed.

Own Id: OTP-5137

filelib:fold_files/5 has been fixed to not include directories that match the regular expression in the result. In this process, filelib:is_regular/1 has been added to the module.

WARNING the behaviour of filelib:fold_files/5 has also been changed so the regexp match is tried not on the full name, but locally in each traversed directory.

Own Id: OTP-5171 Aux Id: OTP-5128

Improvements and New Features

The initial shell process started in parallel with the init boot process. This made it possible to pipe commands to the shell that got evaluated before the system had booted properly. Also the shell was normally accessible before .erlang had been evaluated and this caused problems especially related to code loading. This has now been fixed so that the initial shell is not accessible until after the init boot routine has finished and .erlang has been evaluated. Note that the shell starts before any -s arguments are executed.

Own Id: OTP-4877

It is now possible to compile files with erlc without getting a lot of (for compilation) unnecessary code loaded and executed (like distribution, inet config, etc). erlc now also calls erl with -boot start_clean (so that SASL is not started even if start_sasl is default boot script).

Own Id: OTP-4878

Dets tables can now be opened or closed in parallel. In particular, if some table is being repaired, other tables can still be opened or closed.

Own Id: OTP-4908

The new STDLIB module qlc implements a query language with a list comprehension syntax completely embedded in Erlang. There is support for reading data from ETS, Dets, and Mnesia tables as well as for defining other sources of data. For easy testing queries can be stated in the Erlang shell. The qlc module aims at replacing Mnemosyne. See qlc(3) for details and examples.

Own Id: OTP-5043

Some support for records has been added to the Erlang shell. There are commands for reading record definitions from files and for manipulating record definitions in the shell. The record syntax can be used in the shell and return values are printed as records when possible using the records definitions known to the shell. New commands in the shell are rd/2, rf/0,1, rl/0,1, rp/1, and rr/1,2,3. Existing functions in user_default.erl with any of these names need to be renamed. See shell(3) for further details.

*** POTENTIAL INCOMPATIBILITY ***

Own Id: OTP-5063

A new function, string:to_integer/1, has been added.

Own Id: OTP-5081 Aux Id: OTP-5136

The new function dets:repair_continuation/2 can be used for restoring an opaque continuation returned by dets:select/1 or dets:select/3 if the continuation has passed through the external term format (been sent between nodes or stored on disk).

Own Id: OTP-5126

A new function, string:to_float/1, has been added.

Own Id: OTP-5136 Aux Id: OTP-5081

Test cases have been added for string.

Own Id: OTP-5138

STDLIB 1.12.8
Improvements and New Features

The functions ets:insert_new/2 and dets:insert_new/2 are added. Please consult the manual pages for details.

Own Id: OTP-5075

New function: proc_lib:hibernate/3. Processes spawned using proc_lib (also indirectly, such as gen_server process), should use this function instead of the BIF erlang:hibernate/3 directly to ensure that the exception handler for the process continues to work when the process is awaken.

Own Id: OTP-5077

STDLIB 1.12.6
Fixed Bugs and Malfunctions

If many files or sockets were open (more than 256), beam_lib operations could fail. Corrected.

Own Id: OTP-5046 Aux Id: OTP-4997, seq8590

STDLIB 1.12.5
Fixed Bugs and Malfunctions

When opening a Dets table read only an attempt was made to re-hash the table resulting in an error message. This problem has been fixed.

Own Id: OTP-4989 Aux Id: seq8536

Improvements and New Features

If a gen_server, gen_event or gen_fsm process exits with {undef,[{M,F,A}|...]}, the error report will now state if the function call failed because the module could not be loaded or because the function was not exported.

Own Id: OTP-4952 Aux Id: OTP-4925

STDLIB 1.12.4
Fixed Bugs and Malfunctions

The shell function c:regs() did crash if there was a registered port among the registered names. This is now corrected.

Own Id: OTP-4890

A bug has been fixed in dets: not all objects were always visible in tables with more than 131072 keys.

Own Id: OTP-4906

A bug has been fixed in dets: when trying to repair a version 9 table, a not_a_dets_file error message was returned unnecessarily often.

Own Id: OTP-4907

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

STDLIB 1.12.3
Fixed Bugs and Malfunctions

A bug in erl_scan caused the compiler to hang when end-of-file in a comment was encountered. This is now corrected.

Own Id: OTP-4787

The linter now reports errors for unsafe variables when the option nowarn_unused_vars is given.

Own Id: OTP-4831 Aux Id: seq8202

gen_server:cast/2 now crashes for invalid arguments.

gen_server:abcast/2-3 now crashes for invalid arguments. The behaviour when casting to the name global has been corrected. Previously, gen_server:abcast(global,[node@host]) tried to cast to the globally registered name node@host, which is more of a bug than less. Now such a call will cast to the registered name global at the node node@host as (probably) expected.

An rpc:call/5 and rpc:block_call/5 having a timeout argument has been added.

rpc:abcast/2-3 has been improved not to get stuck waiting for connection setup if the remote node is not connected. In this case the send is spawned off to a temporary process.

Two typos in the docs for module calendar has been corrected thanks to Bengt Kleberg.

*** POTENTIAL INCOMPATIBILITY ***

Own Id: OTP-4844 Aux Id: seq8226

Improvements and New Features

The f/1 shell command did not work correctly with restricted shell.

Own Id: OTP-4818

STDLIB 1.12.2
Fixed Bugs and Malfunctions

gen_server: the internal function get_parent, called by gen_server:enter_loop/[4,5], now returns the pid of parents that are registered processes, instead of returning their name. The reason for this is that gen_server relies on that the parent is represented as a pid. This error in get_parent/0 had the effect that the terminate function of the child was not run when it was shutdown.

Own Id: OTP-4820 Aux Id: seq8170

STDLIB 1.12.1
Fixed Bugs and Malfunctions

The code server could hang if invoked early in the startup. For example if the emulator was started with "-s file eval Filename and Filename contained a call to code:add_patha/1 the code server accidentally tried to execute code in an unloaded module from inside the code that loaded a module - hence hangup. This bug has now been fixed.

Note! Starting Erlang through code loading from a remote Erlang boot server will not work after this patch. It will be fixed in a later patch. Rumours has it that remote boot server code loading did not work before this patch either. It is not a commonly used feature.

*** POTENTIAL INCOMPATIBILITY ***

Own Id: OTP-4802 Aux Id: seq8314