This document describes the release notes for older versions of the
stdlib
application.Stdlib 1.5.2
Fixed errors and malfunctions
ets:file2tab
which usesdisk_log
now uses theread_only
option todisk_log:open
when it opens the file.
Own Id: OTP-1716
Aux Id: OTP-1765- On Unix, if the name of the current directory contained a blank,
os:cmd/1
would fail. This has been corrected.
Own Id: OTP-2026- It was possible for ets:all/1 to include malformed table identifiers in the result. This has been fixed.
Own Id: OTP-2214- The compiler previously silently accepted that a module defined a function with the same name and arity as an imported function. This now causes an error.
Own Id: OTP-2338
Aux Id: seq 793- erl_scan:string/1 used to exit in many situations where it should return an error tuple. This has been fixed.
Own Id: OTP-2347- When given a bad first argument, io:format/3, io:fwrite/3 and io:fread/3 could hang instead of returning an error. This has been fixed.
Own Id: OTP-2400- lists:seq/3 hanged instead of exiting for some invalid arguments; e.g., lists:seq(1, 5, -1). This has been fixed.
Own Id: OTP-2404- Guard expressions could cause exit when used in shell and erl_eval, instead of causing the guard to fail. This has been fixed.
Own Id: OTP-2405- missing parameter, Id, in application_controller:do_change_appl/3 fixed.
Own Id: OTP-2681
Aux Id: seq 1029- The low level process interface 'proc_lib' used by itself and also by generic servers has a syncronisation bug. The scenario is
1. Process A calls proc_lib:spawn() returning the process id B of the child. The function will wait for an answer from the child.
2. The function times out waiting for an answer from the child using proc_lib:init_ack().
3. Process A tries again calling proc_lib:spawn() returning process id C. But now the child B has answered and because the wait function doesn't check where the answer comes from it believes that it was process C that was succeeding.
Own Id: OTP-2702
Aux Id: seq1051Improvements and new features
- erl_lint now gives warnings for some useless constructions which are usually the result of misspellings, e.g., "7(X)", or "s#state{nr=1}".
Own Id: OTP-1927
Aux Id: OTP-1961Stdlib 1.5.1
Fixed errors and malfunctions
- keysort/2 is now stable (i.e., it preserves the order of elements which have the same key). Bad arguments now cause an exit, instead of just silently returning the input list.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-2300- A call to dets:open_file/1 resulting in an error could cause both the caller and the dets server to hang. This has been fixed.
Own Id: OTP-2399- The documentation for erl_parse:parse_term/1 incorrectly stated that it returns the abstract form of a term, so that parse_term/1 and tokens/1 are the inverses of each other. Actually, erl_parse:parse_term/1 returns the term itself. The documentation has been changed to reflect this.
Own Id: OTP-2401Improvements and new features
- Many functions in stdlib do not enforce the types which the functions are documented to accept, thus resulting in undefined behaviour when given arguments of invalid type. Stricter error checking has been added to some functions in stdlib, namely lists:sublist/[2,3] and lists:keysort/2, resulting in an exit if an invalid argument is given.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-2441
Aux Id: OTP-2300, OTP-2689- ets:i/0 used to truncate entries which didn't fit in the designated field. Now, nothing is truncated - the remaining entries are pushed to the right instead.
Own Id: OTP-2524R3B02 (Stdlib 1.4.2)
Fixed errors and malfunctions
dets
can now repair files even if parts of the segment array is truncated. The problem occured whenmnesia
was used.
Own Id: OTP-2056
Aux Id: seq 559, OTP-2042- The compiler (on jam systems) did report "error head-mismatch" on the wrong line (the last instead of the first head-mismatch). This is corrected.
Own Id: OTP-2125
Aux Id: seq 616- A
dets
internal problem withsplit_to_binary
which caused mnesia user problems is fixed.
Own Id: OTP-2156
Aux Id: seq 636- If the system was halted when
dets
is in the middle of repairing a small file (i.e a file that is repaired in RAM), this could result in a corruptdets
file. This is now corrected. The version of thedets
file format is stepped to 8 and version 6 and 7 files are automatically upgraded when they are opened.
Own Id: OTP-2221
Aux Id: seq 672- In previous R3 releases,
slave:start/X
didn't work iferl
was started with long names (-name Name
).
Own Id: OTP-2288
Aux Id: seq 746dets
is now put under control of a supervisor when it is started. This corrects the earlier problem that causeddets
to be terminated when mnesia was terminated even though there could be other users ofdets
.
Own Id: OTP-2296
Aux Id: seq 754ets: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- A
dets
file must be closed by the owner (i.e the process that opened it).{error, not_owner}
will be returned if another process tries to close the file.
Own Id: OTP-2393R3B (Stdlib 1.4.1)
Fixed errors and malfunctions
- If the evaluator exits while the shell is reading a new prompt, the exit message will be printed immediately.
Own Id: OTP-2085
Aux Id: seq 592R3A (Stdlib 1.4)
Fixed errors and malfunctions
- In dets tables of type bag an object could sometimes be duplicated by mistake. This is corrected.
Own Id: OTP-1642- The ets:info/2 BIF used to fail with badarg if the table didn't exist, contrary to the documentation which states that undefined should be returned. The implementation has been corrected. This might break existing code that evaluated ets:info/2 within a catch and assumed that an nonexisting table was indicated by an 'EXIT' tuple.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-1868
Aux Id: seq 418- The function sys:log_to_file didn't close old files, this is corrected.
Own Id: OTP-1977Improvements and new features
- The function nativename/1 has been added to the filename module. It converts a filename to a form acceptable for command shell and native applications on the currently running platform. Specifically, on Windows it replaces slashes with backslashes.
Own Id: OTP-1632- Enhancements in dets: Support for etimated_no_objects. Dets now uses ram_files pread and pwrite which results in significantly improved performance for certain operations.
Own Id: OTP-1641- The documentation regarding terminate and trap_exits is improved for the gen_* modules.
Own Id: OTP-1755- The following functions are added to the module calendar: now_to_local_time/1, now_to_universal_time/1 (== now_to_datetime/1), local_time_to_universal_time/1, universal_time_to_local_time/1.
Own Id: OTP-1801- New table option 'duplicate_bags' added to both ets and dets. A 'duplicate_bag' table can have several identical objects.
Own Id: OTP-1810Known problems
- It is currently not possible to open a
disk_log for reading only. The same limitation applies toets:file2tab . We consider this to be a bug which will be fixed in a forthcoming version.
Own Id: OTP-17161 Stdlib 1.3.2
1.1 Incompatibilities with Stdlib 1.3.1
- Because of the major updates to the
slave
module a version of OTP with this new slave module as described here *cannot* start slave nodes on computers using an older version of OTP, and vice versa.
The return values fromslave
on error are changed (atoms are used instead of strings).
Own Id:OTP-1463
1.2 Fixed Bugs and malfunctions
filename:basename("/foo/bar/")
returned wrong result:[]
. The last/
should be ignored and the result should be"bar"
.
Own Id:OTP-1451
1.3 Improvements and new features
slave:start
is enhanced to work on other platforms (e.g WIN32). Previously it was UNIX specific.
Own Id:OTP-1463
- The
timer
module is modified to be a gen_server and is now supervised by the safe kernel supervisor.
Own Id: OTP-1469
2 Stdlib 1.3.1
2.1 Fixed Bugs and malfunctions
ets
tables created before the system was converted to a distributed system could not be accessed then the system became distributed. The representation of theets
table identifier is thus changed.
Own Id: OTP-1393
3 Stdlib 1.3
3.1 Improvements and new features
erl_eval
did crash on valid input like:
1> lists:sort(A=[1,2]).A correction conserning variable bindings is done.
Own Id: OTP-1295
dets:next
did sometimes erreounously return'$end_of_table'
.
Own Id: OTP-1293
- Corrected spelling errors in
help()
printout from shell.
Own Id: OTP-1038
- Added a new function
sync_notify
ingen_event
.
Own Id: OTP-1310
- The functions
add_sup_handler/3
andswap_sup_handler/3
are added to thegen_event
module. They are used to supervisegen_event
handlers.
Own Id: OTP-1122
- It is possible to add several handlers using the same call-back module to a
gen_event
event manager. Use the new{Module, Id}
syntax for such event handlers.
gen_event
generates an error report when a handler crashes.
- Two new supervisor types
rest_for_one
andsimple_one_for_one
are added.
Own Id: OTP-1177
os:type/1
and its documentation is corrected.
Own Id: OTP-1185
- The function
init_ack/1
is added to theproc_lib
module.
erl_lint
produces warnings related to thebehaviour
module attribute. For example, missing call-back functions are reported. This feature is used by the compiler.
Own Id: OTP-1200
3.2 Fixed Bugs and malfunctions
gen_server:cast
andgen_server:abcast
did sometimes crash if the server did not exist.
Own Id:OTP-1343
- The
ets
reference manual is corrected to describe what happens when trying to access a non existant table.
Own Id:OTP-1244
3.3 Incompatibilities with Stdlib 1.2
4 Stdlib 1.2
4.1 Improvements and new features
- The
dets
module has been greatly enhanced. Previously thedets
module had no real space management on the file. Now, space is managed on a per file basis by a builtin buddy system. This means that allocation is much faster. The format of a dets file is consequently also changed, the dets module will however recognize files with the old format and automatically upgrade the file to the new format the first time it is opened.
This has consequences for the Mnesia system, or rather it does not, since the version upgrade is done automatically.
- A new module
filename
which has a number of useful functions for manipulation of filenames. These functions are recommended to use when writing applications which shall be runnable on a number of different platforms.
- A new module
os
which provides functions which enables various information from the host operating system to the Erlang programmer. The functioncmd/1
is equivalent with theunix:cmd/1
on a unix platform and will also be available on other platforms if applicable, e.g on Windows NT. This function is the recommended way of issuing operating system commands from Erlang programs (rather thanunix:cmd/1
). Other functions in the module areversion
andtype>
which give information about the host operating system version and type.
4.2 Fixed Bugs and malfunctions
- The
ets
man page updated (Name instead of Id).
Own Id: OTP-1001.
- The
ets
module now handles arbitrarily many variables. Previously there was an upper limit of 10.
Own Id: OTP-1124.
5 Stdlib 1.1
5.1 Improvements and new features
- Added
disk_log
, a disc based term logging facility.
- Added
dets
, a disc based term storage.
- Added
proc_lib:start/3,4
,proc_lib:start_link/3,4
andproc_lib:init_ack/2
for synchronous start ofproc_lib
processes.
- Added
regexp
, regular expression functions for strings.
- It is possible to have anonymous supervisors.
5.2 Fixed Bugs and malfunctions
- Fixed bug in
timer
there timeouts would cause an internal error under heavy load.
5.3 Incompatibilities with OTP P1G
- It is possible to change the internal state of the event manager using the
gen_event:call
function. Thehandle_call/2
call-back function should return in a similar way as thehandle_event/2
function.
- A
gen_event
worker should specifydynamic
for modules in the supervisor child specification.
5.4 Known bugs and problems
-