This document describes the release notes for older versions of the
stdlibapplication.Stdlib 1.12
Fixed errors and malfunctions
- A bug in
sofs:partition/2has been fixed.
(Own Id: OTP-4516)
- Bugs concerning list comprehension and guards have been fixed in the Erlang interpreter.
(Own Id: OTP-4518)
c:memory()only reported half of the amount ofetsmemory allocated on 64-bit architectures. This bug has now been fixed.
(Own Id: OTP-4519)
- If a naughty child process did unlink(Supervisor), and then the supervisor decides to terminate that child, it would hang forever. The supervisor now uses erlang:monitor instead of waiting for exit-signals, so that naughty child processes can not make a supervisor hang.
(Own Id: OTP-4568)
(Aux Id: seq3601)
- Fixes bug introduced in patch erl_458 that might have damaging effects on the supervisor causing unwanted behavior in the node.
(Own Id: OTP-4585)
(Aux Id: seq7713)
- erl_tar: Fixed a problem in extracting where a directory leading up to a symbolic link was not created if it didn't exist.
(Own Id: OTP-4595)
- ets:select could sometimes return an empty list although the match_spec was syntactically incorrect, due to the fact that no field in the table could match the head of the match_spec. As the match_spec was actually wrong, a badarg exception was expected. ets:select now always throws badarg when the match_spec cannot be compiled.
(Own Id: OTP-4598)
- The names of temporary files created by the module
file_sorterare now more unique than they used to be.
(Own Id: OTP-4600)
- The file and filename modules now accept the same filenames. (Earlier version of the filename module did not accept atoms except at the top-level.) The documentation for file and filename has been updated.
(Own Id: OTP-4604)
- A bug in
Detsthat could cause a loop has been fixed.
(Own Id: OTP-4609)
- A file descriptor leak was removed in the error logger.
(Own Id: OTP-4641)
- The linter now emits errors for unsafe variables in short circuit Boolean expressions (
andalsoandorelse).
(Own Id: OTP-4671)
- ms_transform now handles record index (#a.b) in guards and bodies correctly. It also detects multiply defined records fields correctly (#a{a=3,a=3} gives error).
(Own Id: OTP-4708)
- A bug in
Detsthat could crash the Dets server has been fixed.
(Own Id: OTP-4730)
Improvements and new features
A new function erlang:send/3 has been added to give more control to when to send if the sender risks being suspended or delayed due to automatic node connection. This function supersedes erlang:send_nosuspend/2,3, which is retained for backward compatibility, and has been upgraded to handle local processes and ports. See the documentation.
The function gen_server:cast/2 (and hence gen_server:abcast/2) has been corrected to not get stuck waiting for automatic node connection; if a node has to be connected for the cast to be sent, a helper process is spawned to do the send so that execution flow can return to the sender immediately.
The function gen_server:cast/2 has also been corrected to crash for invalid arguments.
(*** POTENTIAL INCOMPATIBILITY ***)
(Own Id: OTP-3968)
(Aux Id: Seq 4387)
- The previously undocumented modules
erl_tarandfilelibare now documented.
(Own Id: OTP-3135)
(Aux Id: OTP-1633)
- A number of new functions has been added to the module queue, mostly regarding double-ended operations. See the documentation for details.
(Own Id: OTP-4113)
(Aux Id: Seq7134)
- New functions in gen_fsm: send_event_after/2, start_timer/2 and cancel_timer/1 for FSM internal timer handling. See the documentation.
(Own Id: OTP-4146)
(Aux Id: Seq 7075)
- The
-includeand-include_dirdirectives substitute environment variable values for first path components beginning with a$(dollar) sign.
(Own Id: OTP-4385)
(Aux Id: seq7349)
- The format of Dets files has been slightly changed for the purpose of reducing the risk of memory problems due to corrupt files.
(Own Id: OTP-4553)
- New function
dets:is_compatible_bchunk_format/2to be used in conjunction with the new info tagbchunk_format.
(Own Id: OTP-4554)
- A variant of rpc:multicall with timeout is added, and gen_server:multi_call has been fixed to discard late answers.
(Own Id: OTP-4586)
- The Erlang interpreter has been optimized in such a way that tail recursive calls in the interpreted code lead to tail recursive calls in the interpreter.
(Own Id: OTP-4619)
- erlang:memory/0 and erlang:memory/1 have been added. erlang:memory/[0,1] return the same type of information as c:memory/[0,1] previously did. The erlang:memory/[0,1] functions operate in constant time. c:memory/[0,1] now use erlang:memory/[0,1] and do therefore now also operate in constant time (which they previously did not).
erlang:memory/[0,1] return more accurate information than c:memory/[0,1] previously did.
For more information about erlang:memory/[0,1] see the erlang(3) man page.
(Own Id: OTP-4637)
- The new functions
exprs/4,expr/4andexpr_list/4in theerl_evalmodule add the possibility to supply a function that handles calls to nonlocal functions.
(Own Id: OTP-4643)
(Aux Id: seq7810)
- Introduces a new API function gen_server:enter_loop/[4,5] that may be useful when a more complex initialization procedure is needed than the gen_server behaviour provides
(Own Id: OTP-4662)
(Aux Id: seq7713, seq1051)
- To give applications better control of conversion of local time to UTC with respect to daylight saving time, there are two new functions: erlang:localtime_to_universaltime/2 and calendar:local_time_to_uinversal_time_dst/1. See the documentation for details.
(Own Id: OTP-4667)
(Aux Id: seq7797)
- There are new functions in
proc_libfor spawning processes using a fun:spawn/1,2,spawn_link/1,2, andspawn_opt/2,3.spawn_opt/5is new as well. The reason for making allspawnfunctions inerlang(3)accessible fromproc_libis that when SASL is running you get crash reports for processes started usingproc_lib, something that comes in handy during debugging.
(Own Id: OTP-4704)
(Aux Id: OTP-4718, OTP-4719)
- The timer module is optimized. Previously the performance degraded linearly by the number of simultaneously active timers and was very poor if there where 1000 timers or more. Now this linear behaviour is removed and the time to create and cancel a timer is constant and independent of the number of timers.
(Own Id: OTP-4722)
- Matching on the toplevel in the head of a fun sent to ets/dbg:fun2ms is now possible, creating a more natural way of accessing the match_spec variable '$_'. Thus then code ets:fun2ms(fun(A ={a,_}) -> A end) will work as expected.
(Own Id: OTP-4743)
A http state bug in inet_drv (affecting gen_tcp) has been fixed. Patch from Claes Wikström.
A bug in defining max number of ports has been fixed. Patch from Claes Wikström.
A bug in erlang:port_call/3 when calling a driver with a NULL driver struct ->call field has been fixed. Patch from Luke Gorrie.
There is a new function file:script/1,2 that does the same as file:eval/1 but gives a return value. For completness, file:path_script/2,3, file:eval/2 and file:path_eval/3 are also added. Suggestion from Ulf Wiger. See the documentation for details.
erlang:trace/3did no clear trace flags on processes that were exiting. This bug has now been fixed.The gen_udp options
add_membershipanddrop_membershipare now allowed. Patch from Vance Shipley.
gen_udp:open/1,2with service name instead of port number now works. Patch from carlos@lfcia.org.An unjustified compiler warning when using an explicit space character as pad character to
io:format/2and similar has been removed.If an illegal node name is used to start a node, now
net_kernelfails noisily instead of just letting the node start in non-distributed mode.Now
gen_server:format_status/2also works with non-registered processes.There are two new functions
erlang:list_to_integer/2anderlang:integer_to_list/2that takes a number base argument. See the documentataion for details.New format characters for
io:format/2and similar are ~b, ~B, ~x, ~X, ~+ and ~#. See the documentaion for details.New format characters for
io:fread/2and similar are ~u, ~- and ~#. See the documentation for details.The token scanner
erl_scanhas been rewritten to become twice as fast as before. Now, incomplete any-base numbers such as "16#" are regarded as errors instead of as zero. The allowed base number range has been extended to 2..36 instead of previously 2..16.There is a new function
lists:split/2. See the documentation.For everyone that has written their own function to calculate the time difference between two
now()calls there is nowtimer:now_diff/2. See the documentation.
(Own Id: OTP-4747)
Stdlib 1.11.0
Fixed errors and malfunctions
- The nxdomain error code was added to the erl_posix_msg module.
(Own Id: OTP-2759)
(Aux Id: seq 1212)
lists:sort/2andlists:merge/3were not stable.lists:ukeysort/3andlists:usort/2could leave duplicates. A bug inlists:umerge/3has been fixed.
(Own Id: OTP-4204)
- Traversing a read only Dets table no longer results in a crash.
(Own Id: OTP-4208)
- When converting a version 8 Dets file or repairing a version 9 Dets file containing sufficiently large objects, the resulting file was sometimes badly formed. This has been fixed.
(Own Id: OTP-4220)
- Dets:
delete_objectafterinserton a table ofsettype could cause crash; it was sometimes impossible to open a fragmented table;init_tabledid not always callInitFunexactly once;delete_all_objectsdid not handle fixed tables correctly. (Own Id: OTP-4268)
- Bugs have been fixed in the
erl_lintmodule. The compile options due toerl_lintare now documented incompile(3).
(Own Id: OTP-4356)
- A bug in
sofs:drestriction/3has been fixed.
(Own Id: OTP-4451)
- A fun with 12 arguments called from the shell would only be passed the first 11 arguments, causing a function_clause or badarity exception.
(Own Id: OTP-4456)
Improvements and new features
- A convenient way to create match specifications for ets is provided by the pseudo function ets:fun2ms/1 and the parse_transform ms_transform.
- Documentation of the previously undocumented proc_lib:spawn_opt/4, and the spawn_opt option of gen_server:start, and gen_fsm:start has been added.
(Own Id: OTP-4189)
- The
file_sortermodule now recognises a format calledbinarywhich compares binaries using the standard order of terms.
(Own Id: OTP-4221)
- Dets: The function
init_tablerecognizes the new optionsmin_no_slotsandformat. The new functionbchunkcan be used in conjunction withinit_tablefor copying open tables efficiently.
(Own Id: OTP-4268)
- The
file_sortermodule now provides an easy way of passing a value from input functions to output functions: if the last input function returns{end_of_input, Value}, the first output function is called with the argument{value, Value}.
(Own Id: OTP-4326)
- The function ets:select_count/2 is added to the stdlib application.
(Own Id: OTP-4407)
(Aux Id: seq7482)
- New functions
sofs:extension/3andsofs:partition/3.
(Own Id: OTP-4449)
- The undocumented and deprecated module 'bplus_tree' in stdlib has been removed.
(*** POTENTIAL INCOMPATIBILITY ***)
(Own Id: OTP-4468)
- The deprecated module 'unix' has been removed. (Use 'os' instead.)
(*** POTENTIAL INCOMPATIBILITY ***)
(Own Id: OTP-4470)
Stdlib 1.10
Fixed errors and malfunctions
- The shell allowed patterns which did not have pattern syntax (for example function calls); they became patterns which always failed to match. Now they cause an exit instead, similar to unbound variables.
(Own Id: OTP-3284)
dets:all/0failed if it was called before any other dets calls had been made.
(Own Id: OTP-3621)
(Aux Id: Seq 4590)
- In the documentation for
erl_lintin OTP R6 and R7, the prefix "warn_" for the optional warning optionswarn_unused_varsandwarn_formatwas left out.
(Own Id: OTP-3730)
- Spurious format warnings were given by
erl_lintfor correct calls toformat/1.
(Own Id: OTP-3731)
- The hash function used in dict and sets is now erlang:phash/2 rather than the broken erlang:hash/2.
(*** POTENTIAL INCOMPATIBILITY ***)
(Own Id: OTP-3802)
- In earlier releases of OTP, the manual entry for
sys:change_codewas incorrect.
(Own Id: OTP-3806)
(Aux Id: Seq 5034)
- The functions in the
calendarmodule now have better error checking, exiting for type errors. In particular,is_valid_date/[1,3]no longer returntruefor any invalid dates.
(Own Id: OTP-3925)
(Aux Id: seq5187)
- c:memory/[0,1] could previously fail erroneously with a badmatch. This problem has been solved.
(Own Id: OTP-4017)
- Bug fix:
intersection/1in thesetsandordsetsmodules no longer accepts the empty list as argument. The reason is that intersection of an empty set is undefined.
(*** POTENTIAL INCOMPATIBILITY ***)
(Own Id: OTP-4045)
Improvements and new features
- It is no longer necessary to set a seed explicitly before using
random:uniform; nowuniform:seed/0will be called automatically. In addition, new functions exist for handling random numbers in a functional way.
(Own Id: OTP-3104)
(Aux Id: Seq 1681)
- New functions added to
beam_lib:cmp/2,cmp_dirs/2,diff_dirs/2,strip/1,strip_files/1, andstrip_release/1. New chunks names recognized bybeam_lib:labeled_exportsandlabeled_locals.
(Own Id: OTP-3738)
(Aux Id: OTP-2686)
- All functions in
beam_libmodule now accept a binary as well as a filename.
(Own Id: OTP-3760)
- The
detsmodule has been partly rewritten.finsert/2accepts a list of objects.info/2accepts the new item tagsaccess,ram_fileandauto_save, and the item tagsmemoryandpidhave been documented. The read cache has been removed and thecache_sizeoption is ignored (incompatibility). Many functions have been more efficiently implemented than before, this holds in particular when there are several threads. The repair of Dets tables has been rewritten, and is significantly faster than before. New functions are:to_ets/2(adds Dets objects to an Ets table);foldl/3andfoldr/3(iterate over the objects of a Dets table);from_ets/2(replaces Dets objects by Ets objects);select/1,2,3(select Dets objects using match specifications (see the ERTS User´s Guide for a description of match specifications));match/1,3(match Dets objects in chunks);select_delete/2(deletes Dets objects using match specifications);delete_all_objects/1(deletes all objects of a Dets table efficiently);init_table/2(initiates a Dets table using a function to gather objects);pid2name/1(returns the name of the Dets table handled by a pid).
(*** POTENTIAL INCOMPATIBILITY ***)
(Own Id: OTP-3786)
(Aux Id: OTP-3746, OTP-3782, OTP-1831)
- A new API, member/2 has been added to ets and dets. This function makes it possible to check for key prescence in a table without reading out the actual data associated with the key.
(Own Id: OTP-3804)
(Aux Id: Seq 5029)
lists:merge3/3is a new function that merges three sorted lists.lists:merge/1is a new function that merges a list of sorted lists.
(Own Id: OTP-3880)
- 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 new module
file_sortersorts terms on files.
(Own Id: OTP-3926)
- The number of commands that are saved in the shell can now be changed from the default number 20. The number of command results can be changed independently. See the documentation for the
shellmodule.
(Own Id: OTP-4035)
(Aux Id: Seq 7035)
- The new module
sofsmanipulates sets of sets.
(Own Id: OTP-4039)
usort/1,umerge/{1,2},umerge3/3,ukeysort/2,ukeymerge/3,usort/2, andumerge/3are new functions in thelistsmodule. They work assort/1,merge/1and so on, but remove duplicates.
(Own Id: OTP-4041)
dets:is_dets_file/1is a new function that recognizes Dets tables.
(Own Id: OTP-4083)
(Aux Id: Seq7090)
- A modified format of Dets tables has been introduced in order to enhance performance, in particular when there are threads and for tables of type
bagorduplicate_bag. The modified format preserves the time order of object insertions. The newopen_file/2optionversionsets the version of new tables. Default is the version of the modified format. Opening a table of the hitherto default format does not convert the table unless the option{repair,force}is given.
(Own Id: OTP-4108)
- It is now possible to have the compiler check user-defined behaviours and not only the pre-defined OTP behaviours (gen_server etc.).
This is done by adding a functionbehaviour_info/1to the behaviour module.behaviour_info(callbacks)should return a list of{FunctionName,Arity}which defines the callback functions the behaviour uses.
When a callback module with the attribute-behaviour(Behaviour)is compiled, its exported functions will be compared with the list returned byBehaviour:behaviour_info(callbacks)and a warning will be issued if any callback function is missing.
Note that the user must ensure that the moduleBehaviouris present at compile-time and can be found in the current code path.
(Own Id: OTP-4125)
- 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)
Stdlib 1.9.4
Fixed errors and malfunctions
- Dets file repair failed with {error, eaccess} on the Windows platforms in stdlib-1.9.3 (patched R7B). This is now corrected and dets files can be repaired.
Own Id: OTP-3909
Aux Id: Seq 5146- Ets:info/2 and dets:info/2 no longer returns values other than 'undefined' for non existing ets/dets tables. The behaviour is now as described in the documentation.
Own Id: OTP-3877
Aux Id: Seq 5112- The (betatest) ets:select/2 call in R7B may no longer crash the emulator. This only affects customers beta testing this functionality.
Own Id: OTP-3882Improvements and new features
- The
etsmodule now contains iterator functionsfoldl/3andfoldr/3analogous to the ones in thelistsmodule.
Own Id: OTP-3746- Somewhat faster repair of dets files.
Own Id: OTP-3782
Aux Id: OTP-3746Stdlib 1.9.1 (R7B)
Improvements and new features
- A new better and more portable hash BIF,
erlang:phash/2, has been introduced. Thedetsmodule will use theerlang:phash/2for newly created tables. To rebuild an old table and start to use the new hash BIF, give the{repair,force}option todets:open_file/2. See the documentation.
Own Id: OTP-3397- 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- A new predefined macro has been introduced:
?MODULE_STRING, which expands to the name of the current module, as a string.
Own Id: OTP-3705
Aux Id: OTP-3706Stdlib 1.9 (R7A)
Known problems
- If Erlang is started with longnames (e.g.,
erl -name foo), thenslave:start/1on a nonexistent host exits instead of returning an error tuple.
Own Id: OTP-2635- Excessively large variable numbers in the matching functions in the
etsmodule can crash Erlang or block it for a long time, e.g.,ets:match(Table, '$123456789').
Own Id: OTP-3064- The shell allows patterns which do not have pattern syntax (for example function calls); they become patterns which always fail to match.
Own Id: OTP-3284- When using the
warn_unused_varsoption to the compiler, warnings may be incorrectly given for variables used within list comprehensions.
Own Id: OTP-3412Fixed errors and malfunctions
- Exporting variables from a
catch, which is not legal Erlang, was not caught by the linter in OTP R6, but caused the compiler to crash instead.
Own Id: OTP-3440- Using functions in the
iomodule to do I/O on a remote node could hang if the file process had terminated.
Own Id: OTP-3497
Aux Id: OTP-2400- In OTP R6, if there were many
case,iforreceiveconstructions in one function and variables were exported from them,erl_lint(and thus compilation) could consume too much memory, even making compilation impossible.
Own Id: OTP-3504- The (previously undocumented) function
gen_server:multi_call/4reported good nodes as bad, if one of the nodes was on an unreachable host.
Own Id: OTP-3587
Aux Id: Seq 4568, OTP-3588Improvements and new features
- The
win32regmodule has now been documented. At the same time, a few problems were fixed.
Own Id: OTP-1704- The construction
??Argfor an argument to a macro expands to a string containing the tokens of the argument, similar to the#argstringifying construction in C.
Own Id: OTP-3425- Calls using
gen_server,gen_fsmandgen_eventto a process on another node no longer hang indefinitely if the timeout isinfinityand the process doesn't exist. The exit reason in that case isnoproc(for local processes, this change was made already in OTP R5).
Own Id: OTP-3470
Aux Id: OTP-3074- Warnings for variables exported from a
case,iforreceiveare now only given if the variables are later used within a pattern.
Own Id: OTP-3475- The sets and dict modules have been updated. There are now the following modules:
dict(unorded dictionary),orddict(ordered dictionary),sets(unordered set), andordsets(ordered set). The API functions have been extended to allow more efficient updates of sets and dictionaries. Some API functions are now considered deprecated. See the documentation for each module.
Note that
dictmodule uses a new internal representation. Applications that bypassed the documented API functions and assumed that dictionaries were lists will no longer work.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-3519- Bug-fix in
digraph: one can no longer create loops in acyclic graphs. New functions indigraph:info/1,no_vertices/1,no_edges/1.
Own Id: OTP-3522- The new module
digraph_utilsimplements some algorithms based on depth-first traversal of directed graphs.
Own Id: OTP-3523- The function
gen_server:multi_call/4, which was previously undocumented, is now documented.
Own Id: OTP-3588
Aux Id: OTP-3587- Bug-fix in
digraph:get_path/3andget_cycle/2no longer occasionally duplicate the first vertex in the presence of a loop. New functions indigraph:get_short_path/3andget_short_cycle/2.
Own Id: OTP-3630- The new module
beam_libreads data from BEAM files.
Own Id: OTP-3637- The system event {out, ...} that gen_server generates now includes State. See the documentation for gen_server, System Events.
Own Id: OTP-3651- The gen_ family (mostly gen_server and gen_fsm) and rpc has been rewritten to use the new BIF erlang:monitor/2 as much as possible. This should improve performance and remove some possibilities of hanging gen_server calls. In particular, gen_server:multi_call/2..4 and rpc:multi_server_call/2,3 should now never hang, at least not when all nodes are of this release. See also the documentation for gen_server and rpc.
Own Id: OTP-3660Stdlib 1.8.1
Improvements and new features
lists:sort/2is stable again.
Own Id: OTP-3344- The command-completion feature of the shell has been improved. Pressing the tab key now also lists possible completions (but only if no new character was added to the completion).
Own Id: OTP-3354Stdlib 1.8
Known problems
- If Erlang is started with longnames (e.g.,
erl -name foo), thenslave:start/1on a nonexistent host exits instead of returning an error tuple.
Own Id: OTP-2635- Excessively large variable numbers in the matching functions in the
etsmodule can crash Erlang or block it for a long time, e.g.,ets:match(Table, '$123456789').
Own Id: OTP-3064- The shell allows patterns which do not have pattern syntax (for example function calls); they become patterns which always fail to match.
Own Id: OTP-3284Fixed errors and malfunctions
- When
c:c(File, Options)was used with options such that an intermediate file was produced instead of an object file (e.g., 'S'), it still tried to load an object file (which would be the old one, if one existed).
This has been changed. A warning message will be printed (Warning: No object file created - nothing loaded) and no object file will be loaded even if an (older) object file exists.
Own Id: OTP-3056
Aux Id: OTP-3054- Erlang shell line editing (e.g., M-B to back up over a word) didn't handle all Latin-1 characters correctly.
Own Id: OTP-3158ets:tab2list/1returned the list in the wrong order for a table of typeordered_set.
Own Id: OTP-3319Improvements and new features
- The new lint option
{warn_format, Verbosity}causes warnings to be given for malformed calls toio:formatand some similar functions.Verbosityis an integer which determines the amount of warnings to give (0 = no warnings).
Own Id: OTP-1387- Dets now has a write through caching mechanism as well as an auto save feature. Dets more seldom needs to repair files.
Own Id: OTP-1831
Aux Id: OTP-1526- 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
io:get_chars,lists:keymember/3,lists:keysearch/3,lists:keydelete/3andlists:keyreplace/4, resulting in an exit if an invalid argument is given.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-2689
Aux Id: OTP-2441- New functions
lists:sort(Fun, List)andlists:merge(Fun, List1, List2)can be used for sorting/merging with respect to any criterion;Fun(A,B)should return whetherAcomes beforeBin the ordering.
Own Id: OTP-2948- A new function
c:bt(Pid), available in the shell without module prefix, shows a stack backtrace for a process (i.e., callserlang:process_display(Pid, backtrace)).
Own Id: OTP-3122- The new function
c:q()(also defined in the moduleshell_defaultso that the module prefix need not be given in the shell) callsinit:stop, and thus provides a short command to stop Erlang in a controlled way.
Own Id: OTP-3123- The functions
behaviour_info/[0,1]have been removed from the modulesystools.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-3159
Aux Id: OTP-1965- The function
c:i()now gives two lines of information for each process, including: heap size, stack size, registered name.
Own Id: OTP-3160- The output functions in the
iomodule no longer return an error term in case of errors; they exit instead.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-3178- The new lint option
warn_unused_varscauses warnings to be given for variables which are not used (unless they begin with an underscore, in which case no warning is given).
Own Id: OTP-3181- Parenthesis-matching in the shell has been improved. A new command key ^] performs visible parenthesis blink, like the closing characters (i.e., ')', '}' or ']'), but it also inserts the proper matching character. The closing characters now beep if the matching opening character isn't of the right kind.
Own Id: OTP-3250- Enable the supervisor to handle other replies than {ok, Pid} when starting children.
Own Id: OTP-3251- The erl_internal:builtins/0 function has been removed.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-3300- 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 functionlists:subtract/2.
Own Id: OTP-3318- The following functions in the
listsmodule now have a faster implementation compared to previous releases:map/2,last/1,keysearch/3,keymember/3and all sorting functions. The functionsmember/2,reverse/2,keysearch/3andkeymember/3are now entirely implemented as BIFs.
Own Id: OTP-3334- Ets tables on remote nodes can no longer be accessed directly. Also, the format of the table identifiers returned by
ets:open/2have changed. Incorrectly written applications that assume that the table identifier is a tuple will no longer work.
Most functions in theetsmodule are now BIFs. The internal and undocumented BIFs that theetsmodule used to call have been removed. Applications that incorrectly used the those BIFs directly will no longer work.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-3337Stdlib 1.7
Fixed errors and malfunctions
- Erlang shell line editing (e.g., M-B to back up over a word) didn't handle all Latin-1 characters correctly.
Own Id: OTP-3158Stdlib 1.6.1
Improvements and new features
- When a module with behaviour
gen_server,gen_eventorgen_fsmwas compiled, warnings were given for absent call-back functions, except forcode_change. Now, a warning is given for absentcode_changeas well.
Own Id: OTP-3148
Aux Id: OTP-3072, OTP-3026Stdlib 1.6
Fixed errors and malfunctions
- The previously undocumented function
queue:to_list/1didn't work properly. Now, it returns the elements of the queue, the oldest first in the list.
Own Id: OTP-2701
Aux Id: Seq 1069- A tab in the Erlang shell (modulename completion) could block a big system (>1000 modules) for several seconds and consumed a huge amount of memory. The reason for this was that
appendwas used to create the list of all modules and this is very inefficient. This has now been corrected: 1)code:all_loadedno longer uses append. 2)appendand all other BIFs can no longer consume unlimited amounts of memory before a garbage collection occurs.
Own Id: OTP-2708erl_parse:abstract/1crashed when given terms such as[4|5].
Own Id: OTP-2836- The module
erl_id_transdidn't handle unary operators before numeric literals, or the Mnemosynequeryexpression.
Own Id: OTP-2838- C-nodes previously could get an rpc:call trying to execute process_info on the C-node. C-nodes are so called "hidden" nodes and should not get any rpc calls by accident. This is now corrected.
Own Id: OTP-2953erl_scan:string/[1,2]handled comments incorrectly.
Own Id: OTP-2986ets:match_object/2is made faster by removing areceive after 1and letting the internal BIF db_match_object decide if the current process should be rescheduled.
Own Id: OTP-2987
Aux Id: Seq 1500- ets:match_delete now works correctly for the duplicate_bag ets table type.
Own Id: OTP-3005
Aux Id: Seq 1512- The handling of the freelist in
detsis made more efficient. In the previous version of dets thedets:close/1could take several hours in the worst case because of computation which tried to combine the freelist. This is now corrected and the new version has significantly better performance in dets:open_file and dets:close while having the same or marginally worse performance on dets:delete. The time it takes to open or close a dets file is now always short (at the seconds level at worst , in the most cases much faster).
Own Id: OTP-3025erl_pp:form/[1,2]now format upper-case record names correctly; previously the necessary quoting was left out. This affected for example the toolscoverandcoast.
Own Id: OTP-3058, OTP-2952
Aux Id: OTP-2952- If the argument to the attribute
-include_libdidn't contain a '/', the compilation/preprocessing crashed, instead of giving a proper error message.
Own Id: OTP-3073erl_lint:is_guard_test/1did not accept floating-point literals. This caused execution usingerl_eval(for example in the shell) to behave incorrectly when floating-point literals occurred in guards.
Own Id: OTP-3091Improvements and new features
- The erl_tar:table/2 function now returns more information about each member in the tar file if given the
verboseoption. Tww new functions, erl_tar:t/1 and erl_tar:tt/2, prints the members of the tar file instead of returning them. Thett/1function simply prints the name of each member (like 'tar t'), whilett/2prints more information similar to 'tar tv'.
Own Id: OTP-2520- For consistency,
lists:seq(N,N,0)now returns[N]instead of giving an error.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-2613- The syntax of Erlang tokens has been extended to allow the use of the full ISO-8859-1 (Latin-1) character set. This is noticeable in the following ways: all the Latin-1 printable characters can be used and are shown without the escape backslash convention; atoms and variables can use all Latin-1 letters.
Own Id: OTP-2985- The result of
c:m(Module)contains a tuple{time, Time}which represents the date and time of compilation of the module. Previously, the time was in the local timezone of the compilation. Since there is no record of what that timezone was, the time information was unreliable, and has been changed to always be in GMT (if the underlying system supports it - in other words, whaterlang:universaltime/0returns).
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-3012- The
export_allcompilation option no longer produces one warning for each function defined in a module; it produces one single warning (sinceexport_allshouldn't be used in production code).
Own Id: OTP-3020- When compiling, warnings for functions which are not used are now given also for functions which call only themselves.
Own Id: OTP-3021
Aux Id: OTP-1007- Due to an oversight, the following improvement was left out of the documentation in previous releases:
The variables used in the matching functions in the
etsmodule are not restricted to '$0' to '$9' anymore.
Own Id: OTP-3063- The
gen_server:callnow uses the new BIFmonitor/2which makes it possible to monitor the death of processes. This makes the call safer and the feedback to the caller will be immediate if the serving process has died or dies when it services the call. Previously the only way to prevent a hanging here was to use theTimeoutargument to the call function. A potential incompability is that thegen_server:calland comparable functions in thegen_eventandgen_fsmmodules now can exit with another reason thantimeoutwhen the server has terminated its execution. The new reason isnoproc.
(*** POTENTIAL INCOMPATIBILITY ***)
Own Id: OTP-3074- A note on forward compatibility. Users are urged to refrain from using the following constructions: 1) numeric ASCII codes for characters; 2) strings spanning several lines; 3) the character constant "
$" to produce a space. These constructions are still legal, but will produce warnings in future releases, and at some point may be removed from the language. Instead, use: 1) character constant syntax; 2) the escape code "\n"; 3) the character constant "$\s".
Own Id: OTP-3083Stdlib 1.5.2
Fixed errors and malfunctions
ets:file2tabwhich usesdisk_lognow uses theread_onlyoption todisk_log:openwhen 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/1would 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
detscan now repair files even if parts of the segment array is truncated. The problem occured whenmnesiawas 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
detsinternal problem withsplit_to_binarywhich caused mnesia user problems is fixed.
Own Id: OTP-2156
Aux Id: seq 636- If the system was halted when
detsis in the middle of repairing a small file (i.e a file that is repaired in RAM), this could result in a corruptdetsfile. This is now corrected. The version of thedetsfile 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/Xdidn't work iferlwas started with long names (-name Name).
Own Id: OTP-2288
Aux Id: seq 746detsis now put under control of a supervisor when it is started. This corrects the earlier problem that causeddetsto be terminated when mnesia was terminated even though there could be other users ofdets.
Own Id: OTP-2296
Aux Id: seq 754ets:new/2could 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
detsfile 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-18101 Stdlib 1.3.2
1.1 Incompatibilities with Stdlib 1.3.1
- Because of the major updates to the
slavemodule 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 fromslaveon 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:startis enhanced to work on other platforms (e.g WIN32). Previously it was UNIX specific.
Own Id:OTP-1463
- The
timermodule 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
etstables created before the system was converted to a distributed system could not be accessed then the system became distributed. The representation of theetstable identifier is thus changed.
Own Id: OTP-1393
3 Stdlib 1.3
3.1 Improvements and new features
erl_evaldid crash on valid input like:
1> lists:sort(A=[1,2]).A correction conserning variable bindings is done.
Own Id: OTP-1295
dets:nextdid 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_notifyingen_event.
Own Id: OTP-1310
- The functions
add_sup_handler/3andswap_sup_handler/3are added to thegen_eventmodule. They are used to supervisegen_eventhandlers.
Own Id: OTP-1122
- It is possible to add several handlers using the same call-back module to a
gen_eventevent manager. Use the new{Module, Id}syntax for such event handlers.
gen_eventgenerates an error report when a handler crashes.
- Two new supervisor types
rest_for_oneandsimple_one_for_oneare added.
Own Id: OTP-1177
os:type/1and its documentation is corrected.
Own Id: OTP-1185
- The function
init_ack/1is added to theproc_libmodule.
erl_lintproduces warnings related to thebehaviourmodule 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:castandgen_server:abcastdid sometimes crash if the server did not exist.
Own Id:OTP-1343
- The
etsreference 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
detsmodule has been greatly enhanced. Previously thedetsmodule 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
filenamewhich 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
oswhich provides functions which enables various information from the host operating system to the Erlang programmer. The functioncmd/1is equivalent with theunix:cmd/1on 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 areversionandtype>which give information about the host operating system version and type.
4.2 Fixed Bugs and malfunctions
- The
etsman page updated (Name instead of Id).
Own Id: OTP-1001.
- The
etsmodule 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,4andproc_lib:init_ack/2for synchronous start ofproc_libprocesses.
- Added
regexp, regular expression functions for strings.
- It is possible to have anonymous supervisors.
5.2 Fixed Bugs and malfunctions
- Fixed bug in
timerthere 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:callfunction. Thehandle_call/2call-back function should return in a similar way as thehandle_event/2function.
- A
gen_eventworker should specifydynamicfor modules in the supervisor child specification.
5.4 Known bugs and problems
-