This document describes the changes made to the STDLIB application.
Fixed a performance regression when reading files
opened with the
Own Id: OTP-15706 Aux Id: ERIERL-336
Fix a bug in the Erlang Pretty Printer: long atom
names in combination with
Own Id: OTP-15592 Aux Id: ERL-818
Fix bugs that could cause wrong results or bad
performance when formatting lists of characters using the
control sequences
Own Id: OTP-15639
Improved ETS documentation about safe table traversal and
the partially bound key optimization for
Own Id: OTP-15545 Aux Id: PR-2103, PR-2139
Optimize
Own Id: OTP-15572 Aux Id: PR-2121
Optimize functions
Own Id: OTP-15630
Optimize pretty printing of terms. The slower behaviour was introduced in Erlang/OTP 20.
Own Id: OTP-15573 Aux Id: ERIERL-306
Document
Own Id: OTP-15343 Aux Id: PR-1962
The
To avoid confusion,
Own Id: OTP-15378 Aux Id: ERL-696
Own Id: OTP-15428 Aux Id: ERL-777
When an external fun was used, warnings for unused variables could be suppressed.
Own Id: OTP-15437 Aux Id: ERL-762
Fix reduction count in lists:member/2
Own Id: OTP-15474 Aux Id: ERIERL-229
When specified, the
The
Own Id: OTP-15245 Aux Id: ERL-706
List subtraction (The
Own Id: OTP-15371
Own Id: OTP-15464
The specs of
Own Id: OTP-15252 Aux Id: ERL-667
Let
Own Id: OTP-15253 Aux Id: OTP-13229, ERL-55
The
Own Id: OTP-15304
Fix a bug that could cause a crash when formatting a
list of non-characters using the control sequences
Own Id: OTP-15159
When using an
exception that is valid but not allowed in a state enter
call, the reason has been changed from
Timer parsing has been improved. Many erroneous timeout tuples was not handled correctly.
The documentation has been updated, in particular the User's Guide and the pointer to it from the Reference Manual is much more obvious.
Own Id: OTP-14015
The type specifications for
Own Id: OTP-14019 Aux Id: ERL-550
File operations used to accept
Also environment variable
operations used to accept
Primitive environment
variable operations also used to accept the
Also
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-14543 Aux Id: ERL-370
Make
Own Id: OTP-14958 Aux Id: PR-1735
The control sequence modifiers
Own Id: OTP-14971 Aux Id: PR-1743
Fix a bug in the Erlang code linter: the check of
guard expressions no longer returns
Own Id: OTP-15035 Aux Id: ERL-613
A sys debug fun of type {Fun,State} should not be possible to install twice. This was, however, possible if the current State was 'undefined', which was mistaken for non-existing fun. This has been corrected.
Own Id: OTP-15049
Fix
Own Id: OTP-15101
The
Own Id: OTP-13019 Aux Id: PR-1490
The semantics of timeout parameter
The semantics of timeout parameter
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-13073 Aux Id: PR-1595
A new logging API is added to Erlang/OTP, see the
Calls to
Notice the following potential incompatibilities:
Kernel configuration parameters
In general, parameters for configuring error logger are overwritten by new parameters for configuring Logger.
The concept of SASL error logging is deprecated, meaning that by default the SASL application does not affect which log events are logged.
By default, supervisor reports and crash reports are logged by the default Logger handler started by Kernel, and end up at the same destination (terminal or file) as other standard log event from Erlang/OTP.
Progress reports are not logged by default, but can be
enabled by setting the primary log level to info, for
example with the Kernel configuration parameter
To obtain backwards
compatibility with the SASL error logging functionality
from earlier releases, set Kernel configuration parameter
Since Logger is new in Erlang/OTP 21.0, we do reserve the right to introduce changes to the Logger API and functionality in patches following this release. These changes might or might not be backwards compatible with the initial version.
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-13295
Add functions
Own Id: OTP-13413
Functions
These properties are useful when you
need to call for example
Own Id: OTP-13764 Aux Id: PR-1574
Added maps:iterator/0 and maps:next/1 to be used for iterating over the key-value associations in a map.
Own Id: OTP-14012
Changed the default behaviour of
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-14439
Added new uri_string module to stdlib for handling URIs (RFC 3986).
Own Id: OTP-14496
Update Unicode specification to version 10.0.
Own Id: OTP-14503
This is an incompatible change, but note that the use
of backslashes in wildcards would already work
differently on Windows and Unix. Existing calls to
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-14577
The supervisor now stores its child specifications in a map instead of a list. This causes a significant improvement when starting many children under a non-simple_one_for_one supervisor.
Own Id: OTP-14586
The
Note
that the functions
Own Id: OTP-14624 Aux Id: PR-1565
Add function
Own Id: OTP-14675 Aux Id: PR-102
uri_string module extended with functions for handling application/x-www-form-urlencoded query strings based on the HTML5 specification.
Own Id: OTP-14747
Add functions
Own Id: OTP-14764
The stack traces returned by the functions of the
Own Id: OTP-14826 Aux Id: PR 1540
Add options
Own Id: OTP-14834 Aux Id: PR 1608
Added
Own Id: OTP-14884
Improved URI normalization functions in the uri_string module.
Own Id: OTP-14910
The new functions
A modification of the
control sequences
Own Id: OTP-14983
Add functions
Own Id: OTP-14996 Aux Id: ERL-557, PR-1703
Improve performance of
Own Id: OTP-14998
External funs with literal values for module, name,
and arity (e.g.
Own Id: OTP-15003
sys:statistics(Pid,get) did not report 'out' messages from gen_server. This is now corrected.
Own Id: OTP-15047
A sys debug function can now have the format {Id,Fun,State} in addition to the old {Fun,State}. This allows installing multiple instances of a debug fun.
Own Id: OTP-15048
The
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-15072 Aux Id: PR 1786, OTP-15114
Function
Own Id: OTP-15078
In control sequences of the functions
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-15103 Aux Id: ERL-607
List subtraction (The
Own Id: OTP-15371
The
Own Id: OTP-13995
Correct
Own Id: OTP-14832 Aux Id: ERL-527
The contract of
Own Id: OTP-14860 Aux Id: PR 1670
Correct a few contracts.
Own Id: OTP-14889
Fix string:prefix/2 to handle an empty string as second argument.
Own Id: OTP-14942 Aux Id: PR-1702
Make
Own Id: OTP-14663
Fixed handling of windows UNC paths in module
Own Id: OTP-14693
Improve performance of the new string functionality when handling ASCII characters.
Own Id: OTP-14670
Added a clarification to the documentation of
Own Id: OTP-14798
Fix a bug in the Erlang shell where recursively defined records with typed fields could cause a loop.
Own Id: OTP-14488 Aux Id: PR-1489
Make edlin handle grapheme clusters instead of codepoints to improve the handling multi-codepoints characters.
Own Id: OTP-14542
There could be false warnings for
Own Id: OTP-14600 Aux Id: ERL-478
The Erlang code linter no longer checks that the
functions mentioned in
Own Id: OTP-14378
General Unicode improvements.
Own Id: OTP-14462
A bug in
Own Id: OTP-14482 Aux Id: PR-1488
Fix string:len/1 to be compatible with previous versions.
Own Id: OTP-14487 Aux Id: ERIERL-40
In OTP-20.0, the behavior of c, make, and ct_make was changed so that in some cases the beam files by default would be written to the directory where the source files were found. This is now changed back to the old behavior so beam files are by default written to current directory.
Own Id: OTP-14489 Aux Id: ERL-438
For many releases, it has been legal to override a BIF with a local function having the same name. However, calling a local function with the same name as guard BIF as filter in a list comprehension was not allowed.
Own Id: OTP-13690
A new (default) pseudo-random number generator
algorithm Xoroshiro116+ has been implemented in the
The old algorithm implementations had a number of flaws so they are all deprecated, but corrected versions of two of them have been added. See the documentation.
Own Id: OTP-14295 Aux Id: PR-1372
The Erlang shell,
Own Id: OTP-14296
Internal code change: Calls to
Own Id: OTP-14400
The
Own Id: OTP-14454 Aux Id: ERIERL-29
The state machine engine
The
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-14531
Improved unicode support for strings. Added normalization
functions in the
The old string API have been marked as obsolete. The return values have been changed for some error cases.
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-10289 Aux Id: OTP-10309
There are two new guard BIFs '
Own Id: OTP-13692
Making code_change, terminate and handle_info callbacks optional in the OTP behaviours.
Own Id: OTP-13801
The support for Dets files created with Erlang/OTP R7 and earlier is removed.
Own Id: OTP-13830
Replaced usage of deprecated symbolic
Own Id: OTP-13831 Aux Id: OTP-13735
The function
Own Id: OTP-14000
The EXIT signals received from processes using
Own Id: OTP-14001
Own Id: OTP-14035
Add information in doc about supervisor shutdown reason when maximum restart frequency is reached.
Own Id: OTP-14037 Aux Id: PR-1233
Added
Own Id: OTP-14038 Aux Id: PR-1235
Functions for detecting changed code has been added.
Own Id: OTP-14059
Each assert macro in
Own Id: OTP-14066
Own Id: OTP-14068
The Erlang code linter checks for badly formed type constraints.
Own Id: OTP-14070 Aux Id: PR-1214
By default, there will now be a warning when
Own Id: OTP-14071
When a
Own Id: OTP-14089
Optimized ETS operations by changing table identifier type from integer to reference. The reference enables a more direct mapping to the table with less potential lock contention and makes especially creation and deletion of tables scale much better.
The change of the opaque type for the ETS table identifiers may cause failure in code that make faulty assumptions about this opaque type.
The number of tables stored at one
Erlang node used to be limited. This is no
longer the case (except by memory usage). The previous
default limit was about 1400 tables and could be
increased by setting the environment variable
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-14094
Own Id: OTP-14102
Extend gen_event API to handle options as well.
Own Id: OTP-14123
Advice on how to tune the supervisor restart frequency (intensity and period) is added to System Documentation - Design Principles - Supervisor Behaviour.
Own Id: OTP-14168 Aux Id: PR-1289
gen_fsm is deprecated and is replaced by gen_statem, however for backwards compatibility reasons gen_fsm may continue to exist as an undocumented feature for quite some time.
Own Id: OTP-14183
The shell functions
New utility functions
Own Id: OTP-14190
Own Id: OTP-14226
Own Id: OTP-14245
Own Id: OTP-14278
Miscellaneous updates due to atoms containing arbitrary Unicode characters.
Own Id: OTP-14285
The Crypto application now supports generation of cryptographically strong random numbers (floats < 1.0 and integer arbitrary ranges) as a plugin to the 'rand' module.
Own Id: OTP-14317 Aux Id: PR-1372
Add new function
Own Id: OTP-14319 Aux Id: PR-1076
The Erlang code linter checks for bad
Own Id: OTP-14323
Two new functions has been implemented in the
Own Id: OTP-14328 Aux Id: PR-1382
Upgraded the OTP internal PCRE library from version 8.33
to version 8.40. This library is used for implementation
of the
Besides various bug fixes, the new version allows for
better stack protection. In order to utilize this
feature, the stack size of normal scheduler threads is
now by default set to 128 kilo words on all platforms.
The stack size of normal scheduler threads can be set
upon system start by passing the
See
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-14331 Aux Id: ERL-208
Added function
Own Id: OTP-14347 Aux Id: PR-1412
The format of debug information that is stored in BEAM
files (when
All tools included in OTP (dialyzer, debugger, cover,
and so on) will handle both the new format and the
previous format. Tools that retrieve the debug
information using
For more information, see the description of
Own Id: OTP-14369 Aux Id: PR-1367
Add option hibernate_after to gen_server, gen_statem and gen_event. Also added to the deprecated gen_fsm behaviour.
Own Id: OTP-14405
The size of crash reports created by
The crash report generated by
The new
function
Own Id: OTP-14417
An escript with only two lines would not work.
Own Id: OTP-14098
Characters (
Own Id: OTP-14103 Aux Id: ERL-313
The signatures of
Own Id: OTP-14131
Pretty-printing of maps is improved.
Own Id: OTP-14175 Aux Id: seq13277
If any of the following functions in the
A
Own Id: OTP-14189 Aux Id: ERL-348, ERL-349
Improve the Erlang shell's tab-completion of long names.
Own Id: OTP-14200 Aux Id: ERL-352
The reference manual for
Own Id: OTP-14248 Aux Id: ERL-367
Bug fixes, new features and improvements to gen_statem:
A new type init_result/1 has replaced the old init_result/0, so if you used that old type (that was never documented) you have to change your code, which may be regarded as a potential incompatibility.
Changing callback modes after code change did not work since the new callback mode was not recorded. This bug has been fixed.
The event types state_timeout and {call,From} could not be generated with a {next_event,EventType,EventContent} action since they did not pass the runtime type check. This bug has now been corrected.
State entry calls can now be repeated using (new) state callback returns {repeat_state,...}, {repeat_state_and_data,_} and repeat_state_and_data.
There have been lots of code cleanup in particular regarding timer handling. For example is async cancel_timer now used. Error handling has also been cleaned up.
To align with probable future changes to the rest of gen_*, terminate/3 has now got a fallback and code_change/4 is not mandatory.
Own Id: OTP-14114
Own Id: OTP-14215
When a simple_one_for_one supervisor is shutting down, and a child exits with an exit reason of the form {shutdown, Term}, an error report was earlier printed. This is now corrected.
Own Id: OTP-13907 Aux Id: PR-1158, ERL-163
Allow empty list as parameter of the fun used with
Own Id: OTP-13974
The new behaviour gen_statem has been improved with 3 new features: the possibility to use old style non-proxy timeouts for gen_statem:call/2,3, state entry code, and state timeouts. These are backwards compatible. Minor code and documentation improvements has been performed including a borderline semantics correction of timeout zero handling.
Own Id: OTP-13929 Aux Id: PR-1170, ERL-284
The
Own Id: OTP-13633
Correct the contracts for
Own Id: OTP-13721 Aux Id: PR-1113
Errors in type specification and Emacs template
generation for
Own Id: OTP-13746 Aux Id: ERL-172, ERL-187
gen_statem has been changed to set the callback mode for a server to what Module:callback_mode/0 returns. This facilitates e.g code downgrade since the callback mode now becomes a property of the currently active code, not of the server process.
Exception handling from Module:init/1 has also been improved.
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-13752
Correct a bug regarding typed records in the Erlang shell. The bug was introduced in OTP-19.0.
Own Id: OTP-13719 Aux Id: ERL-182
Fix a race bug affecting
Own Id: OTP-13260 Aux Id: seq13002
Don't search for non-existing Map keys twice
For
Own Id: OTP-13459
Avoid stray corner-case math errors on Solaris, e.g. an error is thrown on underflows in exp() and pow() when it shouldn't be.
Own Id: OTP-13531
Fix linting of map key variables
Map keys cannot be unbound and then used in parallel matching.
Example:
Own Id: OTP-13534 Aux Id: ERL-135
Fixed a bug in re on openbsd where sometimes re:run would return an incorrect result.
Own Id: OTP-13602
To avoid potential timer bottleneck on supervisor restart, timer server is no longer used when the supervisor is unable to restart a child.
Own Id: OTP-13618 Aux Id: PR-1001
The Erlang code preprocessor (
Own Id: OTP-13662 Aux Id: seq13136
The types of The Abstract Format in the
Own Id: OTP-10292
Undocumented syntax for function specifications,
Using the
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-11879
The '
Own Id: OTP-12502 Aux Id: OTP-12501
Background: In record fields with a type declaration
but without an initializer, the Erlang parser inserted
automatically the singleton type
-record(rec, {f1 :: float(), f2 = 42 :: integer(), f3 :: some_mod:some_typ()}).
was translated by the parser to:
-record(rec, {f1 :: float() | 'undefined', f2 = 42 :: integer(), f3 :: some_mod:some_typ() | 'undefined'}).
The rationale for this was that creation of a "dummy"
Problems: This seemingly innocent action has some unforeseen consequences.
For starters, there is no way for programmers to
declare that e.g. only floats make sense for the
It also means that dialyzer does not warn if e.g. an
Similarly, there is no way to extend dialyzer to warn
if it finds record constructions where
Last but not least, it is semantically problematic when the type of the field is an opaque type: creating a union of an opaque and a structured type is very problematic for analysis because it fundamentally breaks the opacity of the term at that point.
Change: To solve these problems the parser will not
automatically insert the
Consequences of this change: This change means that
dialyzer will issue a warning for all places where
records with uninitialized fields are created and those
fields have a declared type that is incompatible with
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-12719
Remove deprecated functions in the modules
Own Id: OTP-12861
The pre-processor can now expand the ?FUNCTION_NAME and ?FUNCTION_ARITY macros.
Own Id: OTP-13059
A new behaviour
The
The callback model(s) for
Own Id: OTP-13065 Aux Id: PR-960
Optimize binary:split/2 and binary:split/3 with native BIF implementation.
Own Id: OTP-13082
Background: The types of record fields have since R12B
been put in a separate form by
Change: No separate type form is created by
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-13148
Unsized fields of the type
Own Id: OTP-13152
The type
Own Id: OTP-13153
Let
Own Id: OTP-13229 Aux Id: ERL-55
Add
basedir returns suitable path(s) for 'user_cache', 'user_config', 'user_data', 'user_log', 'site_config' and 'site_data'. On linux and linux like systems the paths will respect the XDG environment variables.
Own Id: OTP-13392
There are new preprocessor directives
Own Id: OTP-13476
Optimize
Own Id: OTP-13487
Add
Own Id: OTP-13522 Aux Id: PR-1025
Own Id: OTP-13523
Obfuscate asserts to make Dialyzer shut up.
Own Id: OTP-13524 Aux Id: PR-1002
Supervisors now explicitly add their callback module in the return from sys:get_status/1,2. This is to simplify custom supervisor implementations. The Misc part of the return value from sys:get_status/1,2 for a supervisor is now:
[{data, [{"State", State}]},{supervisor,[{"Callback",Module}]}]
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-13619 Aux Id: PR-1000
Relax translation of initial calls in
Own Id: OTP-13623
The function
Own Id: OTP-13658
List subtraction (The
Own Id: OTP-15371
Fix evaluation in matching of bound map key variables in the interpreter.
Prior to this patch, the following code would not
evaluate:
Own Id: OTP-13218
Fix
Own Id: OTP-13228 Aux Id: ERL-32
The Erlang Code Linter no longer crashes if there is
a
Own Id: OTP-13230 Aux Id: ERL-62
The timestamp in the result returned by
Own Id: OTP-13239 Aux Id: OTP-11997
A rare race condition in
Own Id: OTP-13278
Improved maps:with/2 and maps:without/2 algorithms
The new implementation speeds up the execution significantly for all sizes of input.
Own Id: OTP-13376
Time warp safety improvements.
Introduced the options
Introduced the option
Own Id: OTP-13222 Aux Id: OTP-11997
In the shell Ctrl+W (delete word) will no longer consider "." as being part of a word.
Own Id: OTP-13281
The Erlang Pretty Printer uses
A bug concerning pretty printing of annotated type union elements in map pair types has been fixed.
Some minor issues regarding the documentation of types and specs have been corrected.
Own Id: OTP-13084
The shell command
Own Id: OTP-13145
The shell would crash if a bit syntax expression with
conflicting types were given (e.g. if a field type was
given as '
Own Id: OTP-13157
The
Own Id: OTP-13162
Add support for the Delete, Home and End keys in the Erlang shell.
Own Id: OTP-13032
Own Id: OTP-13063
In OTP 18.0,
Own Id: OTP-12946
Optimize zip:unzip/2 when uncompressing to memory.
Own Id: OTP-12950
The STDLIB reference manual is updated to show
correct information about the return value of
Own Id: OTP-12973
re:split2,3 and re:replace/3,4 now correctly handles
pre-compiled patterns that have been compiled using the
'
Own Id: OTP-12977
Export
Own Id: OTP-12990
A mechanism for limiting the amount of text that the built-in error logger events will produce has been introduced. It is useful for limiting both the size of log files and the CPU time used to produce them.
This mechanism is experimental in the sense that it may be changed if it turns out that it does not solve the problem it is supposed to solve. In that case, there may be backward incompatible improvements to this mechanism.
See the documentation for the config parameter
Own Id: OTP-12864
Fix handling of single dot in filename:join/2
The reference manual says that filename:join(A,B) is equivalent to filename:join([A,B]). In some rare cases this turns out not to be true. For example:
This has been corrected. A single dot is now only kept if it occurs at the very beginning or the very end of the resulting path.
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-12158
The undocumented option
Own Id: OTP-12183
erl_lint:icrt_export/4 has been rewritten to make the code really follow the scoping rules of Erlang, and not just in most situations by accident.
Own Id: OTP-12186
Add 'trim_all' option to binary:split/3
This option can be set to remove _ALL_ empty parts of the result of a call to binary:split/3.
Own Id: OTP-12301
Correct orddict(3) regarding evaluation order of
Own Id: OTP-12651 Aux Id: seq12832
Correct
Bad input to maps module function will now yield the following exceptions:
Own Id: OTP-12657
It is now possible to paste text in JCL mode (using Ctrl-Y) that has been copied in the previous shell session. Also a bug that caused the JCL mode to crash when pasting text has been fixed.
Own Id: OTP-12673
Add
Own Id: OTP-12752
Cache nowarn_bif_clash functions in erl_lint.
This patch stores nowarn_bif_clash in the lint record. By using erlc +'{eprof,lint_module}' when compiling the erlang parser, we noticed the time spent on nowarn_function/2 reduced from 30% to 0.01%.
Own Id: OTP-12754
Optimize the Erlang Code Linter by using the cached filename information.
Own Id: OTP-12772
If a child of a simple_one_for_one returns ignore from its start function no longer store the child for any restart type. It is not possible to restart or delete the child because the supervisor is a simple_one_for_one.
Own Id: OTP-12793
Make
Own Id: OTP-12814
There are many cases where user code needs to be able to distinguish between a socket that was closed normally and one that was aborted. Setting the option {show_econnreset, true} enables the user to receive ECONNRESET errors on both active and passive sockets.
Own Id: OTP-12841
Allow maps for supervisor flags and child specs
Earlier, supervisor flags and child specs were given as
tuples. While this is kept for backwards compatibility,
it is now also allowed to give these parameters as maps,
see
Own Id: OTP-11043
A new system message,
The new function
Own Id: OTP-11173 Aux Id: seq12353
Remove the
Own Id: OTP-11907
New BIF:
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-12151 Aux Id: seq12521
Add three new functions to
Own Id: OTP-12167
Introduce the
Own Id: OTP-12195
Support variables as Map keys in expressions and patterns
Erlang will accept any expression as keys in Map expressions and it will accept literals or bound variables as keys in Map patterns.
Own Id: OTP-12218
The last traces of Mnemosyne Rules have been removed.
Own Id: OTP-12257
Properly support maps in match_specs
Own Id: OTP-12270
New function
Own Id: OTP-12309
Own Id: OTP-12422 Aux Id: seq12774
The documentation of the Abstract Format (in the ERTS User's Guide) has been updated with types and specification. (Thanks to Anthony Ramine.)
The
explicit representation of parentheses used in types of
the abstract format has been removed. Instead the new
functions
Own Id: OTP-12492
Prevent zip:zip_open/[12] from leaking file descriptors if parent process dies.
Own Id: OTP-12566
Add a new random number generator, see
Own Id: OTP-12586 Aux Id: OTP-12501, OTP-12502
Own Id: OTP-12716
Add
Own Id: OTP-12737 Aux Id: seq12805
Add functions
Own Id: OTP-12742
Add
Own Id: OTP-12745
Change some internal data structures to Maps in order to speed up compilation time. Measured speed up is around 10%-15%.
Own Id: OTP-12774
Update
Own Id: OTP-12785
The assert macros in
Own Id: OTP-12808
Behaviour of character types \d, \w and \s has always been to not match characters with value above 255, not 128, i.e. they are limited to ISO-Latin-1 and not ASCII
Own Id: OTP-12521
c:m/1 now displays the module's MD5 sum.
Own Id: OTP-12500
Make ets:i/1 handle binary input from IO server.
Own Id: OTP-12550
The documentation of string:tokens/2 now explicitly specifies that adjacent separator characters do not give any empty strings in the resulting list of tokens.
Own Id: OTP-12036
Fix broken deprecation warnings in ssh application
Own Id: OTP-12187
Maps: Properly align union typed assoc values in documentation
Own Id: OTP-12190
Fix filelib:wildcard/2 when 'Cwd' ends with a dot
Own Id: OTP-12212
Allow
Own Id: OTP-12213
Fix edlin to correctly save text killed with ctrl-u. Prior to this fix, entering text into the Erlang shell and then killing it with ctrl-u followed by yanking it back with ctrl-y would result in the yanked text being the reverse of the original killed text.
Own Id: OTP-12224
If a callback function was terminated with exit/1, there would be no stack trace in the ERROR REPORT produced by gen_server. This has been corrected.
To keep the backwards compatibility, the actual exit reason for the process is not changed.
Own Id: OTP-12263 Aux Id: seq12733
Warnings produced by
Own Id: OTP-12264
Supports tar file creation on other media than file systems mounted on the local machine.
The
A chunked file reading option is added to
Own Id: OTP-12180 Aux Id: seq12715
I/O requests are optimized for long message queues in the calling process.
Own Id: OTP-12315
The type spec of the FormFunc argument to sys:handle_debug/4 was erroneously pointing to dbg_fun(). This is now corrected and the new type is format_fun().
Own Id: OTP-11800
Behaviors such as gen_fsm and gen_server should always invoke format_status/2 before printing the state to the logs.
Own Id: OTP-11967
The documentation of
Own Id: OTP-12024
Printing a term with io_lib:format and control sequence w, precision P and field width F, where F< P would fail in one of the two following ways:
1) If P < printed length of the term, an infinite loop would be entered, consuming all available memory.
2) If P >= printed length of the term, an exception would be raised.
These two problems are now corrected.
Own Id: OTP-12041
The documentation of
Own Id: OTP-12055
Expand shell functions in map expressions.
Own Id: OTP-12063
Add maps:with/2
Own Id: OTP-12137
OTP-11850 fixed filelib:wildcard/1 to work with broken symlinks. This correction, however, introduced problems since symlinks were no longer followed for functions like filelib:ensure_dir/1, filelib:is_dir/1, filelib:file_size/1, etc. This is now corrected.
Own Id: OTP-12054 Aux Id: seq12660
Own Id: OTP-11850 Aux Id: seq12571
When creating a tar file,
Own Id: OTP-11854
When redefining and exporting the type
Own Id: OTP-11872
Fix evaluation of map updates in the debugger and erl_eval
Reported-by: José Valim
Own Id: OTP-11922
The following native functions now bump an appropriate amount of reductions and yield when out of reductions:
Characteristics impact:
Own Id: OTP-11888
Add
Own Id: OTP-11951
The option dupnames did not work as intended in re. When looking for names with {capture, [Name, ...]}, re:run returned a random instance of the match for that name, instead of the leftmost matching instance, which was what the documentation stated. This is now corrected to adhere to the documentation. The option {capture,all_names} along with a re:inspect/2 function is also added to further help in using named subpatterns.
Own Id: OTP-11205
If option 'binary' was set for standard_input, then c:i() would hang if the output was more than one page long - i.e. then input after "(c)ontinue (q)uit -->" could not be read. This has been corrected. (Thanks to José Valim)
Own Id: OTP-11589
stdlib/lists: Add function droplast/1 This functions drops the last element of a non-empty list. lists:last/1 and lists:droplast/1 are the dual of hd/1 and tl/1 but for the end of a list. (Thanks to Hans Svensson)
Own Id: OTP-11677
Allow all auto imports to be suppressed at once. Introducing the no_auto_import attribute: -compile(no_auto_import). Useful for code generation tools that always use the qualified function names and want to avoid the auto imported functions clashing with local ones. (Thanks to José Valim.)
Own Id: OTP-11682
supervisor_bridge does no longer report normal termination of children. The reason is that in some cases, for instance when the restart strategy is simple_one_for_one, the log could be completely overloaded with reports about normally terminating processes. (Thanks to Artem Ocheredko)
Own Id: OTP-11685
The type annotations for alternative registries using the {via, Module, Name} syntax for sup_name() and sup_ref() in the supervisor module are now consistent with the documentation. Dialyzer should no longer complain about valid supervisor:start_link() and supervisor:start_child() calls. (Thanks to Caleb Helbling.)
Own Id: OTP-11707
Two Dets bugs have been fixed. When trying to open a
short file that is not a Dets file, the file was deleted
even with just read access. Calling
Own Id: OTP-11709
Fix race bug in
Own Id: OTP-11726
erl_eval now properly evaluates '=='/2 when it is used in guards. (Thanks to José Valim)
Own Id: OTP-11747
Calls to proplists:get_value/3 are replaced by the faster lists:keyfind/3 in io_lib_pretty. Elements in the list are always 2-tuples. (Thanks to Andrew Thompson)
Own Id: OTP-11752
A qlc bug where filters were erroneously optimized away has been fixed. Thanks to Sam Bobroff for reporting the bug.
Own Id: OTP-11758
A number of compiler errors where unusual or nonsensical code would crash the compiler have been reported by Ulf Norell and corrected by Anthony Ramine.
Own Id: OTP-11770
Since Erlang/OTP R16B the Erlang Core Linter
(
Own Id: OTP-11772
The functions
The potential incompatibility refers to:
(Thanks to James Fish and Steve Vinoski)
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-11817
Options to set match_limit and match_limit_recursion are added to re:run. The option report_errors is also added to get more information when re:run fails due to limits or compilation errors.
Own Id: OTP-10285
The pre-defined types
Instead the types
It is
allowed in Erlang/OTP 17.0 to locally re-define the types
New
types
A compiler option,
in an Erlang source file, warnings about deprecated types can be avoided in Erlang/OTP 17.0.
The option can also be given as a compiler flag:
Own Id: OTP-10342
Calls to erlang:open_port/2 with 'spawn' are updated to handle space in the command path.
Own Id: OTP-10842
Dialyzer's
Own Id: OTP-10908
Forbid unsized fields in patterns of binary generators and simplified v3_core's translation of bit string generators. (Thanks to Anthony Ramine.)
Own Id: OTP-11186
The version of the PCRE library Used by Erlang's re module is raised to 8.33 from 7.6. This means, among other things, better Unicode and Unicode Character Properties support. New options connected to PCRE 8.33 are also added to the re module (ucd, notempty_atstart, no_start_optimize). PCRE has extended the regular expression syntax between 7.6 and 8.33, why this imposes a potential incompatibility. Only very complicated regular expressions may be affected, but if you know you are using obscure features, please test run your regular expressions and verify that their behavior has not changed.
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-11204
Added dict:is_empty/1 and orddict:is_empty/1. (Thanks to Magnus Henoch.)
Own Id: OTP-11353
A call to either the
The
Characteristics impact: A call to the
Own Id: OTP-11388 Aux Id: OTP-11535, OTP-11648
Improve the documentation of the supervisor's
Own Id: OTP-11399
Own Id: OTP-11552
EEP43: New data type - Maps
With Maps you may for instance:
For information on how to use Maps please see Map Expressions in the
The current implementation is without the following features:
Note that Maps is experimental during OTP 17.0.
Own Id: OTP-11616
When tab completing the erlang shell now expands zero-arity functions all the way to closing parenthesis, unless there is another function with the same name and a different arity. (Thanks to Pierre Fenoll.)
Own Id: OTP-11684
The Erlang Code Preprocessor (
Thanks to Maruthavanan Subbarayan for reporting the bug, and to Richard Carlsson for providing a bug fix.
Own Id: OTP-11728
The Erlang Code Linter (
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-11771
The
Own Id: OTP-11807
Export zip option types to allow referal from other modules.
Thanks to Pierre Fenoll and Håkan Mattson
Own Id: OTP-11828
The module
Own Id: OTP-11840
Fix typo in gen_server.erl. Thanks to Brian L. Troutwine.
Own Id: OTP-11398
Spec for atan2 should be atan2(Y, X), not atan2(X, Y). Thanks to Ary Borenszweig.
Own Id: OTP-11465
Add XML marker for regexp syntax. Thanks to Håkan Mattson.
Own Id: OTP-11442
The functions
Own Id: OTP-11245
If the
Own Id: OTP-11254
The specifications of
Own Id: OTP-11261
Fixed type typo in gen_server.
Own Id: OTP-11200
Update type specs in filelib and io_prompt. Thanks to Jose Valim.
Own Id: OTP-11208
Fix typo in abcast() function comment. Thanks to Johannes Weissl.
Own Id: OTP-11219
Make edlin understand a few important control keys. Thanks to Stefan Zegenhagen.
Own Id: OTP-11251
Export the edge/0 type from the digraph module. Thanks to Alex Ronne Petersen.
Own Id: OTP-11266
Fix variable usage tracking in erl_lint and fixed unsafe variable tracking in try expressions. Thanks to Anthony Ramine.
Own Id: OTP-11268
The Erlang scanner no longer accepts floating point numbers in the input string.
Own Id: OTP-10990
When converting a faulty binary to a list with unicode:characters_to_list, the error return value could contain a faulty "rest", i.e. the io_list of characters that could not be converted was wrong. This happened only if input was a sub binary and conversion was from utf8. This is now corrected.
Own Id: OTP-11080
The type
The printing of invalid forms, e.g. record field types, has also been fixed. It has been broken since R16B.
(Thanks to Tomáš Janoušek.)
Own Id: OTP-11100
Fix receive support in erl_eval with a BEAM module. Thanks to Anthony Ramine.
Own Id: OTP-11137
Delete obsolete note about simple-one-for-one supervisor. Thanks to Magnus Henoch.
Own Id: OTP-10938
When selecting encoding of a script written in Erlang
(
Own Id: OTP-10951
The function
Own Id: OTP-10992
Integrate elliptic curve contribution from Andreas Schultz
In order to be able to support elliptic curve cipher suites in SSL/TLS, additions to handle elliptic curve infrastructure has been added to public_key and crypto.
This also has resulted in a rewrite of the crypto API to gain consistency and remove unnecessary overhead. All OTP applications using crypto has been updated to use the new API.
Impact: Elliptic curve cryptography (ECC) offers equivalent security with smaller key sizes than other public key algorithms. Smaller key sizes result in savings for power, memory, bandwidth, and computational cost that make ECC especially attractive for constrained environments.
Own Id: OTP-11009
Added sys:get_state/1,2 and sys:replace_state/2,3. Thanks to Steve Vinoski.
Own Id: OTP-11013
Optimizations to gen mechanism. Thanks to Loïc Hoguin.
Own Id: OTP-11025
Optimizations to gen.erl. Thanks to Loïc Hoguin.
Own Id: OTP-11035
Use erlang:demonitor(Ref, [flush]) where applicable. Thanks to Loïc Hoguin.
Own Id: OTP-11039
Erlang source files with non-ASCII characters are now encoded in UTF-8 (instead of latin1).
Own Id: OTP-11041 Aux Id: OTP-10907
Fix rest_for_one and one_for_all restarting a child not terminated. Thanks to James Fish.
Own Id: OTP-11042
Fix excessive CPU consumption of timer_server. Thanks to Aliaksey Kandratsenka.
Own Id: OTP-11053
Rename and document lists:zf/2 as lists:filtermap/2. Thanks to Anthony Ramine.
Own Id: OTP-11078
Fixed an inconsistent state in epp. Thanks to Anthony Ramine
Own Id: OTP-11079
c:ls(File) will now print File, similar to ls(1) in Unix. The error messages have also been improved. (Thanks to Bengt Kleberg.)
Own Id: OTP-11108
Support callback attributes in erl_pp. Thanks to Anthony Ramine.
Own Id: OTP-11140
Improve erl_lint performance. Thanks to José Valim.
Own Id: OTP-11143
Bugs related to Unicode have been fixed in the
Own Id: OTP-10622 Aux Id: kunagi-351 [262]
(Thanks to Samuel Rivas and Tuncer Ayaz.)
There is also an incompatible change to the
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-10812
The new STDLIB application variable
The control sequence modifier
Own Id: OTP-10755
Miscellaneous updates due to Unicode support.
Own Id: OTP-10820
Extend
Own Id: OTP-10836
The +pc flag to erl can be used to set the range of characters considered printable. This affects how the shell and io:format("~tp",...) functionality does heuristic string detection. More can be read in STDLIB users guide.
Own Id: OTP-10884
Wildcards such as "some/path/*" passed to
Own Id: OTP-6874 Aux Id: kunagi-190 [101]
Fixed error handling in proc_lib:start which could hang if the spawned process died in init.
Own Id: OTP-9803 Aux Id: kunagi-209 [120]
Allow ** in filelib:wildcard
Two adjacent * used as a single pattern will match all files and zero or more directories and subdirectories. (Thanks to José Valim)
Own Id: OTP-10431
Add the \gN and \g{N} syntax for back references in re:replace/3,4 to allow use with numeric replacement strings. (Thanks to Vance Shipley)
Own Id: OTP-10455
Export ets:match_pattern/0 type (Thanks to Joseph Wayne Norton)
Own Id: OTP-10472
Fix printing the empty binary at depth 1 with ~W (Thanks to Andrew Thompson)
Own Id: OTP-10504
The type
Own Id: OTP-10624 Aux Id: kunagi-352 [263]
Dets tables are no longer fixed while traversing with
a bound key (when only the objects with the right key are
matched). This optimization affects the functions
Own Id: OTP-10097
Support for Unicode has been implemented.
Own Id: OTP-10302
The linter now warns for opaque types that are not exported, as well as for under-specified opaque types.
Own Id: OTP-10436
The type
Own Id: OTP-10474
If a child process fails in its start function, then the
error reason was earlier only reported as an error report
from the error_handler, and supervisor:start_link would
only return
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-10490
Where necessary a comment stating encoding has been added to Erlang files. The comment is meant to be removed in Erlang/OTP R17B when UTF-8 becomes the default encoding.
Own Id: OTP-10630
The contracts and types of the modules
Own Id: OTP-10658
The Erlang shell now skips the rest of the line when it encounters an Erlang scanner error.
Own Id: OTP-10659
Clean up some specs in the proplists module. (Thanks to Kostis Sagonas.)
Own Id: OTP-10663
Some examples overflowing the width of PDF pages have been corrected.
Own Id: OTP-10665
Enable escript to accept emulator arguments when script file has no shebang. Thanks to Magnus Henoch
Own Id: OTP-10691
Fix bug in queue:out/1, queue:out_r/1 that makes it O(N^2) in worst case. Thanks to Aleksandr Erofeev.
Own Id: OTP-10722
There are new functions in the
Own Id: OTP-10742 Aux Id: OTP-10302
The functions in
Own Id: OTP-10745 Aux Id: OTP-10302
The new functions
Own Id: OTP-10749 Aux Id: OTP-10302
Increased potential concurrency in ETS for
Own Id: OTP-10787
Minor test updates
Own Id: OTP-10591
Fixed bug where if given an invalid drive letter on windows ensure dir would go into an infinite loop.
Own Id: OTP-10104
Calls to gen_server:enter_loop/4 where ServerName has a global scope and no timeout is given now works correctly.
Thanks to Sam Bobroff for reporting the issue.
Own Id: OTP-10130
fix escript/primary archive reloading
If the mtime of an escript/primary archive file changes after being added to the code path, correctly reload the archive and update the cache. (Thanks to Tuncer Ayaz)
Own Id: OTP-10151
Fix bug that in some cases could cause corrupted binaries
in ETS tables with
Own Id: OTP-10182
Fix filename:nativename/1 on Win32
Don't choke on paths given as binary argument on Win32. Thanks to Jan Klötzke
Own Id: OTP-10188
Fix bug in
Own Id: OTP-10190
Fix bug where zip archives wrongly have a first disk number set to 1
Own Id: OTP-10223
The message printed by the Erlang shell as an
explanation of the
Own Id: OTP-10054
References to
Own Id: OTP-6454 Aux Id: seq10407
Leave control back to gen_server during supervisor's restart loop
When an attempt to restart a child failed, supervisor would earlier keep the execution flow and try to restart the child over and over again until it either succeeded or the restart frequency limit was reached. If none of these happened, supervisor would hang forever in this loop.
This commit adds a timer of 0 ms where the control is left back to the gen_server which implements the supervisor. This way any incoming request to the supervisor will be handled - which could help breaking the infinite loop - e.g. shutdown request for the supervisor or for the problematic child.
This introduces some incompatibilities in stdlib due to new return values from supervisor:
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-9549
If a temporary child's start function returned 'ignore', then the supervisor would keep it's child specification. This has been corrected. Child specifications for non-existing temporary children shall never be kept.
Own Id: OTP-9782 Aux Id: seq11964
Use universal time as base in error logger
Previous conversion used the deprecated calendar:local_time_to_universal_time/1
Own Id: OTP-9854
Calling a guard test (such as is_list/1) from the top-level in a guard, would cause a compiler crash if there was a local definition with the same name. Corrected to reject the program with an error message.
Own Id: OTP-9866
Fix the type spec from the doc of binary:part/3 (Thanks to Ricardo Catalinas Jiménez)
Own Id: OTP-9920
Correct spelling of registered (Thanks to Richard Carlsson)
Own Id: OTP-9925
Put gb_trees documentation into alphabetical order (Thanks to Aidan Hobson Sayers)
Own Id: OTP-9929
Fix bug in ETS with
Own Id: OTP-9932
Add plugin support for alternative name lookup This patch introduces a new way of locating a behaviour instance: {via, Module, Name}. (Thanks to Ulf Wiger)
Own Id: OTP-9945
The function
Own Id: OTP-9953
When an escript ends now all printout to standard output and standard error gets out on the terminal. This bug has been corrected by changing the behaviour of erlang:halt/0,1, which should fix the same problem for other escript-like applications, i.e that data stored in the output port driver buffers got lost when printing on a TTY and exiting through erlang:halt/0,1.
The BIF:s erlang:halt/0,1 has gotten improved semantics and there is a new BIF erlang:halt/2 to accomplish something like the old semantics. See the documentation.
Now erlang:halt/0 and erlang:halt/1 with an integer argument will close all ports and allow all pending async threads operations to finish before exiting the emulator. Previously erlang:halt/0 and erlang:halt(0) would just wait for pending async threads operations but not close ports. And erlang:halt/1 with a non-zero integer argument would not even wait for pending async threads operations.
To roughly the old behaviour, to not wait for ports and async threads operations when you exit the emulator, you use erlang:halt/2 with an integer first argument and an option list containing {flush,false} as the second argument. Note that now is flushing not dependant of the exit code, and you can not only flush async threads operations which we deemed as a strange behaviour anyway.
Also, erlang:halt/1,2 has gotten a new feature: If the first argument is the atom 'abort' the emulator is aborted producing a core dump, if the operating system so allows.
Own Id: OTP-9985
Add escript win32 alternative invocation. escript can now be started as both "escript.exe" and "escript" (Thanks to Pierre Rouleau)
Own Id: OTP-9997
Improved algorithm in module
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-8713
Calls to
The reason for not doing this earlier is that setting
a global lock masked out a bug concerning the restart of
supervised children. The bug has now been fixed by a
modification of
A minor race conditions in
The undocumented function
Own Id: OTP-9212 Aux Id: seq7117, OTP-4174
If a child of a supervisor terminates with reason {shutdown,Term} it is now handled by the supervisor as if the reason was 'shutdown'.
For children with restart type 'permanent', this implies no change. For children with restart type 'transient', the child will no longer be restarted and no supervisor report will be written. For children with restart type 'temporary', no supervisor report will be written.
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-9222
Minor improvement of documentation regarding supervisor restart strategy for temporary and transient child processes.
Own Id: OTP-9381
A Dets table with sufficiently large buckets could not always be repaired. This bug has been fixed.
The format of Dets files has been modified. When downgrading tables created with the new system will be repaired. Otherwise the modification should not be noticeable.
Own Id: OTP-9607
A few contracts in the
Own Id: OTP-9616
Add '-callback' attributes in stdlib's behaviours
Replace the behaviour_info(callbacks) export in stdlib's behaviours with -callback' attributes for all the callbacks. Update the documentation with information on the callback attribute Automatically generate 'behaviour_info' function from '-callback' attributes
'behaviour_info(callbacks)' is a special function that is defined in a module which describes a behaviour and returns a list of its callbacks.
This function is now automatically generated using the '-callback' specs. An error is returned by lint if user defines both '-callback' attributes and the behaviour_info/1 function. If no type info is needed for a callback use a generic spec for it. Add '-callback' attribute to language syntax
Behaviours may define specs for their callbacks using the familiar spec syntax, replacing the '-spec' keyword with '-callback'. Simple lint checks are performed to ensure that no callbacks are defined twice and all types referred are declared.
These attributes can be then used by tools to provide documentation to the behaviour or find discrepancies in the callback definitions in the callback module.
Add callback specs into 'application' module in kernel Add callback specs to tftp module following internet documentation Add callback specs to inets_service module following possibly deprecated comments
Own Id: OTP-9621
If a Dets table had been properly closed but the space management data could not been read, it was not possible to repair the file. This bug has been fixed.
Own Id: OTP-9622
The Unicode noncharacter code points 16#FFFE and 16#FFFE
were not allowed to be encoded or decoded using the
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-9624
Make epp search directory of current file first when including another file This completes a partial fix in R11 that only worked for include_lib(). (Thanks to Richard Carlsson)
Own Id: OTP-9645
ms_transform: Fix incorrect `variable shadowed' warnings
This patch removes incorrect passing of variable bindings from one function clause to another. (Thanks to Haitao Li)
Own Id: OTP-9646
Explicitly kill dynamic children in supervisors
According to the supervisor's documentation: "Important note on simple-one-for-one supervisors: The dynamically created child processes of a simple-one-for-one supervisor are not explicitly killed, regardless of shutdown strategy, but are expected to terminate when the supervisor does (that is, when an exit signal from the parent process is received)."
All is fine as long as we stop simple_one_for_one supervisor manually. Dynamic children catch the exit signal from the supervisor and leave. But, if this happens when we stop an application, after the top supervisor has stopped, the application master kills all remaining processes associated to this application. So, dynamic children that trap exit signals can be killed during their cleanup (here we mean inside terminate/2). This is unpredictable and highly time-dependent.
In this commit, supervisor module is patched to explicitly terminate dynamic children accordingly to the shutdown strategy.
NOTE: Order in which dynamic children are stopped is not defined. In fact, this is "almost" done at the same time.
Stack errors when dynamic children are stopped
Because a simple_one_for_one supervisor can have many workers, we stack errors during its shutdown to report only one message for each encountered error type. Instead of reporting the child's pid, we use the number of concerned children. (Thanks to Christopher Faulet)
Own Id: OTP-9647
Allow an infinite timeout to shutdown worker processes
Now, in child specification, the shutdown value can also be set to infinity for worker children. This restriction was removed because this is not always possible to predict the shutdown time for a worker. This is highly application-dependent. Add a warning to docs about workers' shutdown strategy (Thanks to Christopher Faulet)
Own Id: OTP-9648
A badarg would sometimes occur in supervisor when printing error reports and the child pid was undefined. This has been corrected.
Own Id: OTP-9669
Fix re:split spec not to accept option 'global'(Thanks to Shunichi Shinohara)
Own Id: OTP-9691
Fix a few tests that used to fail on the HiPE platform.
Own Id: OTP-9637
Variables are now now allowed in '
The representation of '
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-9643
Tuple funs (a two-element tuple with a module name and a
function) are now officially deprecated and will be
removed in R16. Use '
Own Id: OTP-9649
The deprecated '
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-9737
Own Id: OTP-9752
erl_tar:extract failed when executed inside a directory with some parent directory to which the user has no read access. This has been corrected.
Own Id: OTP-9368
A bug in
Own Id: OTP-9412
The contract of
Own Id: OTP-9413 Aux Id: seq11873
A crash in io_lib:fread/2 when end of input data was encountered while trying to match literal characters, which should return {more,_,_,_} but instead crashed, has been corrected. Reported by Klas Johansson.
A similar peculiarity for io:fread when encountering end of file before any field data has also been corrected.
Own Id: OTP-9439
The contract of
Own Id: OTP-9450
Fix minor typo in gen_fsm documentation (Thanks to Haitao Li)
Own Id: OTP-9456
The contracts of
Own Id: OTP-9471 Aux Id: seq11887, OTP-9472
A bug in
Own Id: OTP-9472 Aux Id: seq11887, OTP-9471
Fix trivial documentation errors(Thanks to Matthias Lang)
Own Id: OTP-9498
Add a proplist() type
Recently I was adding specs to an API and found that there is no canonical proplist() type defined. (Thanks to Ryan Zezeski)
Own Id: OTP-9499
fix supervisors restarting temporary children
In the current implementation of supervisors, temporary children should never be restarted. However, when a temporary child is restarted as part of a one_for_all or rest_for_one strategy where the failing process is not the temporary child, the supervisor still tries to restart it.
Because the supervisor doesn't keep some of the MFA information of temporary children, this causes the supervisor to hit its restart limit and crash.
This patch fixes the behaviour by inserting a clause in terminate_children/2-3 (private function) that will omit temporary children when building a list of killed processes, to avoid having the supervisor trying to restart them again.
Only supervisors in need of restarting children used the list, so the change should be of no impact for the functions that called terminate_children/2-3 only to kill all children.
The documentation has been modified to make this behaviour more explicit. (Thanks to Fred Hebert)
Own Id: OTP-9502
fix broken edoc annotations (Thanks to Richard Carlsson)
Own Id: OTP-9516
XML files have been corrected.
Own Id: OTP-9550 Aux Id: OTP-9541
Handle rare race in the crypto key server functionality
Own Id: OTP-9586
Types and specifications have been added.
Own Id: OTP-9356
The contracts of the
Own Id: OTP-9418
Contracts in STDLIB and Kernel have been improved and type errors have been corrected.
Own Id: OTP-9485
Types for several BIFs have been extended/corrected. Also
the types for types for
Own Id: OTP-9496
The default value
Own Id: OTP-9147
Update index file atomically
Since the log_mf_h index file might be read by other processes than the error handler (e.g. by the rb tool), this file should be updated atomically. This will avoid hitting the time gap between opening the file in write mode (and thus emptying the file) and the actual update with the new contents. To do this, a temporary file is written, and the file:rename/1 used to replace the real index file.
Own Id: OTP-9148
Fixed various typos across the documentation (Thanks to Tuncer Ayaz)
Own Id: OTP-9154
Supervisors should not save child-specs for temporary processes when they terminate as they should not be restarted. Saving the temporary child spec will result in that you can not start a new temporary process with the same child spec as an already terminated temporary process. Since R14B02 you can not restart a temporary temporary process as arguments are no longer saved, it has however always been semantically incorrect to restart a temporary process. Thanks to Filipe David Manana for reporting this and suggesting a solution.
Own Id: OTP-9167 Aux Id: OTP-9064
Various small documentation fixes (Thanks to Bernard Duggan)
Own Id: OTP-9172
Fix format_status bug for unregistered gen_event processes
Port the gen_fsm code for format_status to gen_event in order to prevent a lists:concat([...,pid()]) crash when calling sys:get_status/1 on an unregistered gen_event process.
Refactor format_status header code from gen_* behaviours to module gen.
Extend the format_status tests in gen_event_SUITE to cover format_status bugs with anonymous gen_event processes. (Thanks To Geoff Cant)
Own Id: OTP-9218
List of pids changed to 'set' in supervisor for dynamic temporary children. Accessing the list would not scale well when adding/deleting many children. (Thanks to Evgeniy Khramtsov)
Own Id: OTP-9242
Change pool module to attempt to attach to nodes that are already running
The pool module prints out an error message and takes no further action for nodes that are already running. This patch changes that behavior so that if the return from slave:start/3 is {already_running, Node} then an attempt to attach to the node is still made. This makes sense because the node has been specified by the user in the .hosts.erlang file indicating a wish for the node to be part of the pool and a manual attach can be successfully made after the pool is started.(Thanks to Kelly McLaughlin)
Own Id: OTP-9244
unicode: document 16#FFFE and 16#FFFF (non chars)(Thanks to Tuncer Ayaz)
Own Id: OTP-9256
re: remove gratuitous "it " in manpage (Thanks to Tuncer Ayaz)
Own Id: OTP-9307
A bug in erl_eval(3) has been fixed.
Own Id: OTP-9322
Add
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-9169
Allow supervisor:terminate_child(SupRef,Pid) for simple_one_for_one supervisors
supervisor:terminate_child/2 was earlier not allowed if the supervisor used restart strategy simple_one_for_one. This is now changed so that children of this type of supervisors can be terminated by specifying the child's Pid.
(Thanks to Vance Shipley.)
Own Id: OTP-9201
Types and specifications have been added.
Own Id: OTP-9267
Erlang types and specifications are used for documentation.
Own Id: OTP-9271
Allow Dets tablenames to be arbitrary terms.
Own Id: OTP-9282
A specification that could cause problems for Dialyzer has been fixed. An opaque type in erl_eval has been turned in to a ordinary type. This is a temporary fix.
Own Id: OTP-9333
Two bugs in io:format for ~F.~Ps has been corrected. When length(S) >= abs(F) > P, the precision P was incorrectly ignored. When F == P > length(S) the result was incorrectly left adjusted. Bug found by Ali Yakout who also provided a fix.
Own Id: OTP-8989 Aux Id: seq11741
Fix exception generation in the io module
Some functions did not generate correct badarg exception on a badarg exception.
Own Id: OTP-9045
Fixes to the dict and orddict module documentation
Fixed grammar and one inconsistency (Key - Value instead of key/value, since everywhere else the former is used). (thanks to Filipe David Manana)
Own Id: OTP-9083
Add ISO week number calculation functions to the calendar module in stdlib
This new feature adds the missing week number function to the calendar module of the stdlib application. The implementation conforms to the ISO 8601 standard. The new feature has been implemented tested and documented (thanks to Imre Horvath).
Own Id: OTP-9087
Implement the 'MAY' clauses from RFC4648 regarding the pad character to make mime_decode() and mime_decode_to_string() functions more tolerant of badly padded base64. The RFC is quoted below for easy reference.
"RFC4648 Section 3.3 with reference to MIME decoding: Furthermore, such specifications MAY ignore the pad character, "=", treating it as non-alphabet data, if it is present before the end of the encoded data. If more than the allowed number of pad characters is found at the end of the string (e.g., a base 64 string terminated with "==="), the excess pad characters MAY also be ignored."
Own Id: OTP-9020
Supervisors will no longer save start parameters for temporary processes as they will not be restarted. In the case of simple_one_for_one workers such as ssl-connection processes this will substantial reduce the memory footprint of the supervisor.
Own Id: OTP-9064
When running escript it is now possible to add the -n flag and the escript will be compiled using +native.
Own Id: OTP-9076
Several type specifications for standard libraries were wrong in the R14B01 release. This is now corrected. The corrections concern types in re,io,filename and the module erlang itself.
Own Id: OTP-9008
When several clients accessed a Dets table
simultaneously, one of them calling
Own Id: OTP-8856
When several clients accessed a Dets table simultaneously, inserted or updated objects were sometimes lost due to the Dets file being truncated. (Thanks to John Hughes.)
Own Id: OTP-8898
When several clients accessed a Dets table
simultaneously, modifications of the Dets server's
internal state were sometimes thrown away. The symptoms
are diverse: error with reason
Own Id: OTP-8899
If a Dets table was closed after calling
Own Id: OTP-8903
Cover did not collect coverage data for files such as
Yecc parses containing include directives. The bug has
been fixed by modifying
Own Id: OTP-8911
If a Dets table with fewer slots than keys was opened and then closed after just a lookup, the contents were no longer well-formed. This bug has been fixed. (Thanks to Matthew Evans.)
Own Id: OTP-8923
In a supervisor, when it terminates a child, if that child happens to have exited fractionally early, with normal, the supervisor reports this as an error. This should not be reported as an error.
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-8938 Aux Id: seq11615
The documentation filelib:wildcard/1,2 now describes the character set syntax for wildcards.
Own Id: OTP-8879 Aux Id: seq11683
Buffer overflows have been prevented in
Own Id: OTP-8892
Using a float for the number of copies for
Own Id: OTP-8915
New ETS option
Own Id: OTP-8922 Aux Id: seq11658
The default maximum number of slots of a Dets table has been changed as to be equal to the maximum number of slots. (Thanks to Richard Carlsson.)
Own Id: OTP-8959
reference() has been substituted for ref() in the documentation.
Own Id: OTP-8733
The ms_transform now warns if the fun head shadows surrounding variables (just like the warnings you would get for an ordinary fun in the same context).
Own Id: OTP-6759
ets:select_reverse/{1,2,3} are now documented.
Own Id: OTP-7863
Large parts of the
Most notable improvement is a reader optimized rwlock
implementation which dramatically improve the performance
of read-lock/read-unlock operations on multi processor
systems by avoiding ping-ponging of the rwlock cache
lines. The reader optimized rwlock implementation is used
by miscellaneous rwlocks in the runtime system that are
known to be read-locked frequently, and can be enabled on
ETS tables by passing the
There is also a new implementation of rwlocks that is not optimized for readers. Both implementations interleaves readers and writers during contention as opposed to, e.g., the NPTL (Linux) pthread rwlock implementation which use either a reader or writer preferred strategy. The reader/writer preferred strategy is problematic since it starves threads doing the non-preferred operation.
The new rwlock implementations in general performs better in ERTS than common pthread implementations. However, in some extremely heavily contended cases this is not the case. Such heavy contention can more or less only appear on ETS tables. This when multiple processes do very large amounts of write locked operations simultaneously on the same table. Such use of ETS is bad regardless of rwlock implementation, will never scale, and is something we strongly advise against.
The new rwlock implementations depend on atomic operations. If no native atomic implementation is found, a fallback solution will be used. Using the fallback implies a performance degradation. That is, it is more important now than before to build OTP with a native atomic implementation.
The
The
The changed API of the
Note: When building for x86, the
Own Id: OTP-8544
Some Built In Functions (BIFs) from the module erlang was never made autoimported for backward compatibility reasons. As local functions now override autoimports, new autoimports is no longer a problem, why the following BIFs are finally made autoimported: monitor/2, monitor/3, demonitor/2, demonitor/3, error/1, error/2, integer_to_list/2, list_to_integer/2.
Own Id: OTP-8763
The Erlang code preprocessor (
Own Id: OTP-8470
The abstract type 'fun' could not be printed by the
Erlang pretty printer (
Own Id: OTP-8473
The function
Own Id: OTP-8567
The documentation of
Own Id: OTP-8628 Aux Id: seq11576
The shell's line editing has been improved to more resemble the behaviour of readline and other shells. (Thanks to Dave Peticolas)
Own Id: OTP-8635
The Erlang code preprocessor (
Own Id: OTP-8665 Aux Id: OTP-7810
The module binary from EEP31 (and EEP9) is implemented.
Own Id: OTP-8217
The erlang pretty printer (
Own Id: OTP-8501
The Erlang code preprocessor (
Own Id: OTP-8503
Added function
Added functions to create and extract escripts. See
The undocumented function
Record fields has been annotated with type info. Source files as been adapted to fit within 80 chars and trailing whitespace has been removed.
Own Id: OTP-8521
The Erlang parser no longer duplicates the singleton
type
Own Id: OTP-8522
A regular expression with many levels of parenthesis could cause a buffer overflow. That has been corrected. (Thanks to Michael Santos.)
Own Id: OTP-8539
When defining macros the closing right parenthesis before the dot is now mandatory.
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-8562
Some properties of a compiled re pattern are defined to allow for guard tests.
Own Id: OTP-8577
Local and imported functions now override the auto-imported BIFs when the names clash. The pre R14 behaviour was that auto-imported BIFs would override local functions. To avoid that old programs change behaviour, the following will generate an error:
Doing a call without explicit module name to a local function having a name clashing with the name of an auto-imported BIF that was present (and auto-imported) before OTP R14A
Explicitly importing a function having a name clashing with the name of an autoimported BIF that was present (and autoimported) before OTP R14A
Using any form of the old compiler directive
If the BIF was added or auto-imported in OTP R14A or later, overriding it with an import or a local function will only result in a warning,
To resolve clashes, you
can either use the explicit module name
The
change makes it possible to add auto-imported BIFs
without breaking or silently changing old code in the
future. However some current code ingeniously utilizing
the old behaviour or the
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-8579
The undocumented, unsupport, and deprecated function
Own Id: OTP-8584
A bug in re that could cause certain regular expression matches never to terminate is corrected. (Thanks to Michael Santos and Gordon Guthrie.)
Own Id: OTP-8589
Nested records can now be accessed without parenthesis. See the Reference Manual for examples. (Thanks to YAMASHINA Hio and Tuncer Ayaz.)
Own Id: OTP-8597
Own Id: OTP-8623
The beam_lib:cmp/2 function now compares BEAM files in stricter way. The BEAM files will be considered different if there are any changes except in the compilation information ("CInf") chunk. beam_lib:cmp/2 used to ignore differences in the debug information (significant for Dialyzer) and other chunks that did not directly change the run-time behavior.
Own Id: OTP-8625
When a gen_server, gen_fsm process, or gen_event terminates abnormally, sometimes the text representation of the process state can occupy many lines of the error log, depending on the definition of the state term. A mechanism to trim out parts of the state from the log has been added (using a format_status/2 callback). See the documentation.
Own Id: OTP-8630
Calling
Own Id: OTP-8656
The Erlang scanner has been augmented with two new
tokens:
Own Id: OTP-8657
Expressions evaluating to integers can now be used in types and function specifications where hitherto only integers were allowed ("Erlang_Integer").
Own Id: OTP-8664
The compiler optimizes record operations better.
Own Id: OTP-8668
The recently added BIFs erlang:min/2, erlang:max/2 and erlang:port_command/3 are now auto-imported (as they were originally intended to be). Due to the recent compiler change (OTP-8579), the only impact on old code defining it's own min/2, max/2 or port_command/3 functions will be a warning, the local functions will still be used. The warning can be removed by using -compile({no_auto_import,[min/2,max/2,port_command/3]}). in the source file.
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-8669 Aux Id: OTP-8579
Now, binary_to_term/2 is auto-imported. This will cause a compile warning if and only if a module has got a local function with that name.
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-8671
The predefined builtin type tid() has been removed. Instead, ets:tid() should be used.
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-8687
Because of a race condition, using filelib:ensure_dir/1 from multiple processes to create the same path or parts of the same directory structure, filelib:ensure_dir/1 could return a meaningless {error,eexist}. That race condition has been eliminated, and {error,eexist} will now be returned only if there exists a regular file, device file, or some other non-directory file with the same name. (Thanks to Tuncer Ayaz.)
Own Id: OTP-8389
A number of bugs concerning re and unicode are corrected:
re:compile no longer loses unicode option, which also fixes bug in re:split.
re:replace now handles unicode charlist replacement argument
re:replace now handles unicode RE charlist argument correctly
re:replace now handles binary unicode output correctly when nothing is replaced.
Most code, testcases and error isolation done by Rory Byrne.
Own Id: OTP-8394
The loading of native code was not properly atomic in the SMP emulator, which could cause crashes. Also a per-MFA information table for the native code has now been protected with a lock since it turns that it could be accessed concurrently in the SMP emulator. (Thanks to Mikael Pettersson.)
Own Id: OTP-8397
user.erl (used in oldshell) is updated to handle unicode in prompt strings (io:get_line/{1,2}). io_lib is also updated to format prompts with the 't' modifier (i.e. ~ts instead of ~s).
Own Id: OTP-8418 Aux Id: OTP-8393
The re module: A regular expression with an option change at the start of a pattern that had top-level alternatives could cause overwriting and/or a crash. (Thanks to Michael Santos.)
Own Id: OTP-8438
The ability for the gen_server and gen_fsm callback modules to format their own state for display under the sys:get_status/1,2 calls has been restored and documented. (Thanks to Steve Vinoski.)
Own Id: OTP-8324
c:nc/{1,2} used to assume that the beam file was created
in the same directory as the source code and failed to
load the code if it was not. Corrected to look for the
beam file in the current directory or in the directory
specified by the
Own Id: OTP-8337
The documentation is now possible to build in an open source environment after a number of bugs are fixed and some features are added in the documentation build process.
- The arity calculation is updated.
- The module prefix used in the function names for bif's are removed in the generated links so the links will look like "http://www.erlang.org/doc/man/erlang.html#append_element-2" instead of "http://www.erlang.org/doc/man/erlang.html#erlang:append_element-2".
- Enhanced the menu positioning in the html documentation when a new page is loaded.
- A number of corrections in the generation of man pages (thanks to Sergei Golovan)
- The legal notice is taken from the xml book file so OTP's build process can be used for non OTP applications.
Own Id: OTP-8343
Shell tab completion now works for quoted module and function names. (Thanks to Ulf Wiger.)
Own Id: OTP-8383
Explicit top directories in archive files are now optional.
For example, if an archive (app-vsn.ez) just contains an app-vsn/ebin/mod.beam file, the file info for the app-vsn and app-vsn/ebin directories are faked using the file info from the archive file as origin. The virtual direcories can also be listed. For short, the top directories are virtual if they does not exist.
Own Id: OTP-8387
Macros overloading has been implemented. (Thanks to Christopher Faulet.)
Own Id: OTP-8388
The new function
Own Id: OTP-8393
Improved handling of typed records in escripts
Own Id: OTP-8434
Added supervisor:count_children/1 to count the number of children being managed without the memory impact of which_children/1. (Thanks to Jay Nelson.)
Own Id: OTP-8436
The documentation is now built with open source tools (xsltproc and fop) that exists on most platforms. One visible change is that the frames are removed.
Own Id: OTP-8201
[escript] The restriction that the first line in escripts
must begin with
[escript] Some command line options to the escript executable has now been documented. For example you can run an escript in the debugger by just adding a command line option.
[escript] The documentation of the escript header syntax
has been clarified. For example the header is optional.
This means that it is possible to directly "execute"
Own Id: OTP-8215
Optimized array:from_orddict/1, it is now faster and uses less memory if the orddict was sparse.
Changed array:reset/2, it will now never expand the array which it could before for non fixed arrays. See the documentation.
Own Id: OTP-8216
The Erlang Pretty Printer (
Own Id: OTP-8227
The extension ".xrl" used for Leex input files is now recognized by the compiler.
Own Id: OTP-8232
Some clarifications have been made in the documentation
regarding
Own Id: OTP-8255 Aux Id: seq11419
The -on_load() directive can be used to run a function when a module is loaded. It is documented in the section about code loading in the Reference Manual.
Own Id: OTP-8295
An erroneous type spec for
Own Id: OTP-8068 Aux Id: seq11323, seq11314
The linter used to crash on invalid
Own Id: OTP-8051
Bugs in
Own Id: OTP-8066
When trying to insert objects with
Own Id: OTP-8070
Running erlc in a very deep directory (with a path length
of more 256 or more characters) would cause the emulator
to crash in a call to
Own Id: OTP-8124
A few minor bugs have been fixed in the Erlang Code
Preprocessor (
Own Id: OTP-8130
A bug in The Erlang Meta Interpreter (
Own Id: OTP-8133
Option
Own Id: OTP-8113
When
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-8129
The Erlang Meta Interpreter (
Own Id: OTP-8139
The Erlang Pretty Printer (
Own Id: OTP-8150
The text of tokens returned by the Erlang scanner
(
Own Id: OTP-7965
The documentation for
Own Id: OTP-7984
Two types in the
Own Id: OTP-8029 Aux Id: seq11296
Own Id: OTP-8033
Interpreted escripts are now tail recursive.
The function erl_eval:expr/5 has been introduced.
Own Id: OTP-7933
Own Id: OTP-7979
Random now supports seed with arity one,
Own Id: OTP-8019
The
Own Id: OTP-8024
The documentation of
Own Id: OTP-7895
The Erlang scanner no longer returns the text of
tokens when the start location is a pair of a line and
column unless the new option
There are new
functions to access the attributes of tokens:
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-7892 Aux Id: OTP-7810
Several glitches and performance issues in the Unicode and I/O-system implementation of R13A have been corrected.
Own Id: OTP-7896 Aux Id: OTP-7648 OTP-7887
The type spec of filelib:wildcard/2 has been corrected.
Own Id: OTP-7915
New functions:
Own Id: OTP-7947
The function
Own Id: OTP-7948
Fixed a minor race conditions in
A process started by
Own Id: OTP-7669
The Erlang preprocessor used wrong line number when stringifying macro arguments. (Thanks to John Hughes.)
Own Id: OTP-7702
A bug in the
Own Id: OTP-7714
A new option,
Own Id: OTP-6674
The functions
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-7230
The order of objects visited in select for ordered_set is now documented.
Own Id: OTP-7339
It is now possible to debug code in escripts and archives.
Own Id: OTP-7626
Support for Unicode is implemented as described in EEP10. Formatting and reading of unicode data both from terminals and files is supported by the io and io_lib modules. Files can be opened in modes with automatic translation to and from different unicode formats. The module 'unicode' contains functions for conversion between external and internal unicode formats and the re module has support for unicode data. There is also language syntax for specifying string and character data beyond the ISO-latin-1 range.
The interactive shell will support input and output of unicode characters when the terminal and operating system supports it.
Please see the EEP and the io/io_lib manual pages as well as the stdlib users guide for details.
I/O-protocol incompatibilities:
The io_protocol between io_Server and client is updated to handle protocol data in unicode formats. The updated protocol is now documented. The specification resides in the stdlib users manual, which is a new part of the manual.
io module incompatibilities:
The io:put_chars, io:get_chars and io:get_line all handle and return unicode data. In the case where binaries can be provided (as to io:put_chars), they shall be encoded in UTF-8. When binaries are returned (as by io:get_line/get_chars when the io_server is set in binary mode) the returned data is also always encoded as UTF-8. The file module however still returns byte-oriented data, why file:read can be used instead of io:get_chars to read binary data in ISO-latin-1.
io_lib module incompatibilities:
io_lib:format can, given new format directives (i.e "~ts" and "~tc"), return lists containing integers larger than 255.
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-7648 Aux Id: OTP-7580 OTP-7514 OTP-7494 OTP-7443 OTP-7181 EEP10 EEP11
The function
Own Id: OTP-7653 Aux Id: OTP-7603
Preprocessor directives are now allowed in escripts. This means that for example macros may be used in escripts.
Own Id: OTP-7662
When a process started with
Own Id: OTP-7740 Aux Id: seq10847
A new BIF,
Own Id: OTP-7752
Own Id: OTP-7797
The Erlang scanner has been augmented as to return
white spaces, comments, and exact location of tokens. The
functions
Own Id: OTP-7810
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-7819
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-7824
The argument passed to
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-7827
The copyright notices have been updated.
Own Id: OTP-7851
A few missing match spec functions was added to dbg:fun2ms; exception_trace/0 and trace/2,3.
There is a new function queue:member/2.
A bug in io_lib:fread that made it accidentally concatenate fields separated by newline has been corrected. Reported and analyzed by Matthew Palmer to erlang-patches.
Own Id: OTP-7865
A bug in the
Own Id: OTP-7552
The characters 16#C0 and 16#E0 ("A" and "a" with grave
accent), were not properly converted by the
Own Id: OTP-7589
The function
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-7603
The documentation for
Own Id: OTP-7604 Aux Id: seq11063
The split function is now added to the re library. Exceptions and errors from both run, replace and split are made more consistent.
Own Id: OTP-7514 Aux Id: OTP-7494
Processes spawned using
Also, if
The reason for the change is that keeping the initial fun (or a fun in an argument list), would prevent upgrading the code for the module. A secondary reason is that keeping the fun and function arguments could waste a significant amount of memory.
The drawback with the change is that the crash reports
will provide less precise information about the initial
call (only
Own Id: OTP-7531 Aux Id: seq11036
There is now experimental support for loading of code
from archive files. See the documentation of
The error handling of
An
An
An
The internal module
Own Id: OTP-7548 Aux Id: otp-6622
Enabled explicit control of which types of files that should be compressed in a ZIP archive.
Own Id: OTP-7549 Aux Id: otp-6622
In the job control mode, the "s" and "r" commands now take an optional argument to specify which shell to start. (Thanks to Robert Virding.)
Own Id: OTP-7617
A bug in the calendar module could cause calendar:local_time_to_universal_time_dst/1 to return duplicate identical values for local times in timezones without DST. Multiple values should only be returned when a local time is within the hour occurring twice due to shift from DST to non-DST, and certainly only in timezones with DST. The correct behaviour is now implemented.
Own Id: OTP-7344 Aux Id: seq10960
The documentation of
Own Id: OTP-7413
The soft upper limit of 60 on the number of non-white
characters on a line, which was introduced in R12B-0 for
the control sequences
Own Id: OTP-7421 Aux Id: OTP-6708
Some debug code has been removed from Dets.
Own Id: OTP-7424
The documentation of
Own Id: OTP-7445
Corrections of digraph(3). (Thanks to Vlad Dumitrescu.)
Own Id: OTP-7492
For the process that an escript runs in, the
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-7517
The documentation of
Own Id: OTP-7489
The re module is extended with repetitive matches (global option) and replacement function.
Own Id: OTP-7494 Aux Id: OTP-7181
The Erlang shell now displays a nicer error message when evaluating an undefined command. (Thanks to Richard Carlsson.)
Own Id: OTP-7495
zip:unzip to/from binary with empty directories did not work. (Thanks to Martin Dvorak.)
Own Id: OTP-7248
The documentation of the control sequence
Own Id: OTP-7324 Aux Id: OTP-7084
zip:unzip was not supporting a flavour of the zip format found in jar-files.
Own Id: OTP-7382 Aux Id: seq10970
An experimental module "re" is added to the emulator which interfaces a publicly available regular expression library for Perl-like regular expressions (PCRE). The interface is purely experimental and *will* be subject to change.
The implementation is for reference and testing in connection to the relevant EEP.
Own Id: OTP-7181
When inserting many small objects, Dets sometimes crashed when reaching the maximum number of slots. (Thanks to Daniel Goertzen.)
Own Id: OTP-7146
Processes linked to the Erlang shell did not get an exit signal when the evaluator process was killed. This bug, introduced in R12B-0, has been fixed.
Own Id: OTP-7184 Aux Id: OTP-6554
Invalid arguments to
Own Id: OTP-7226
For certain terminals, io:columns/0 could return 0 instead of enotsup. That is now corrected.
Own Id: OTP-7229 Aux Id: seq10886
When evaluating the
Own Id: OTP-7232
Own Id: OTP-7234
The
New functions:
Own Id: OTP-7064
The functions
Own Id: OTP-7084
Updated the documentation for
Own Id: OTP-7186
A new BIF ets:update_element/3. To update individual elements within an ets-tuple, without having to read, update and write back the entire tuple.
Own Id: OTP-7200
Own Id: OTP-7231 Aux Id: OTP-6671
Own Id: OTP-7238
Own Id: OTP-7244
Ets:select/3 in combination with ets:repair_continuation/2 and ordered_set data tables could result in function_clause although used as intended. This is now corrected. Thanks to Paul Mineiro for finding and isolating the bug!
Own Id: OTP-7025
The compiler warning for the deprecated function
The warning for the removed functions in the
Own Id: OTP-7034 Aux Id: seq10825
In
Own Id: OTP-7078 Aux Id: OTP-4962
Documentation bugfixes and clarifications.
(Thanks to Joern (opendev@gmail.com), Matthias Lang, and Richard Carlsson.)Own Id: OTP-7079
Duplicated objects were sometimes not deleted from the list of answers when a QLC table was traversed using a match specification. (Thanks to Dmitri Girenko.)
Own Id: OTP-7114
The documentation has been updated so as to reflect
the last updates of the Erlang shell as well as the minor
modifications of the control sequence
Superfluous empty lines have been removed from code examples and from Erlang shell examples.
Own Id: OTP-6944 Aux Id: OTP-6554, OTP-6911
Own Id: OTP-7009
It is now possible to hibernate a gen_server/gen_event/gen_fsm. In gen_server and gen_fsm, hibernation is triggered by returning the atom 'hibernate' instead of a timeout value. In the gen_event case hibernation is triggered by a event handler returning a tuple with an extra element containing the atom 'hibernate'.
Own Id: OTP-7026 Aux Id: seq10817
Some undocumented debug functionality has been added to Dets.
Own Id: OTP-7066
The functions
Own Id: OTP-7081
The compiler could generate suboptimal code for record updates if the record update code consisted of multiple source code lines.
Own Id: OTP-7101
Bugs have been fixed in
A few minor optimizations have been implemented as well.
Own Id: OTP-6673
A bug concerning the use of parameterized modules from the shell has been fixed.
Own Id: OTP-6785
A bug regarding the size expression of the bit syntax
has been fixed in the
Own Id: OTP-6787
The log_mf_h event handler didn't close the index file when it was done reading it causing a file descriptor leak.
Own Id: OTP-6800
Definitions for the
Own Id: OTP-6870
file:write_file/3, file:write/2 and file:read/2 could crash (contrary to documentation) for odd enough file system problems, e.g write to full file system. This bug has now been corrected.
In this process the file module has been rewritten to produce better error codes. Posix error codes now originate from the OS file system calls or are generated only for very similar causes (for example 'enomem' is generated if a memory allocation fails, and 'einval' is generated if the file handle in Erlang is a file handle but currently invalid).
More Erlang-ish error codes are now generated. For
example
The possibility to write
a single byte using
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-6967 Aux Id: OTP-6597 OTP-6291
A bug concerning the evaluation of the
Own Id: OTP-6977
The behaviour of the internal functions gen:call/3,4 has been changed slightly in the rare case that when the caller was linked to the called server, and the server crashed during the call; its exit signal was consumed by the gen:call/3,4 code and converted to an exit exception. This exit signal is no longer consumed.
To even notice this change, 1) the calling process has to be linked to the called server.
2) the call must not be remote by name that is it must be local or remote by pid, local by name or global by name.
3) the calling process has to have set
4) the server has to crash during the call.
5) the calling process has to be sensitive to getting
previously consumed
The old behaviour was once the only way for a client
to notice if the server died, but has since
The affected user APIs are:
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-3954 Aux Id: Seq 4538
When an exception occurs the Erlang shell now displays
the class, the reason, and the stacktrace in a clearer
way (rather than dumping the raw EXIT tuples as before).
The new shell
command
Own Id: OTP-6554 Aux Id: OTP-6289
The function
Own Id: OTP-6671
The control sequence
Own Id: OTP-6708
The new module
Own Id: OTP-6733
Functions that have long been deprecated have now been
removed from the following modules:
The undocumented function
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-6845
Minor documentation corrections for file:pread/2 and file:pread/3.
Own Id: OTP-6853
Contract directives for modules in Kernel and STDLIB.
Own Id: OTP-6895
The
The
The
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-6906
The Erlang pretty printer
Own Id: OTP-6911
The documentation for ets:safe_fixtable/2, ets:foldl/3, and ets:foldr/3 is now clearer about what will happen if objects are inserted during table traversals.
Own Id: OTP-6928 Aux Id: seq10779
It is now possible to extract files in tar files directly into binaries. It is also possible to add files to tar files directly from binaries.
Own Id: OTP-6943
The functions
Own Id: OTP-6953
The new
Own Id: OTP-6964
The allowed syntax for -type() and -spec() was updated.
Own Id: OTP-6861 Aux Id: OTP-6834
The compiler will for forward compatibility ignore the -type() and -spec() attributes that will be introduced in the R12B release.
Own Id: OTP-6834
The log_mf_h event handler didn't close the index file when it was done reading it causing a file descriptor leak.
Own Id: OTP-6800
The dict:size/1 and orddict:size/1 functions have been documented.
Own Id: OTP-6818
Bugs have been fixed in Dets concerning comparison (==) and matching (=:=).
The STDLIB manual pages have been updated as to more carefully state when terms are matched and when they are compared.
Own Id: OTP-4738 Aux Id: OTP-4685
The shell has been updated to fix the following flaws: Shell process exit left you with an unresponsive initial shell if not using oldshell. Starting a restricted shell with a nonexisting callback module resulted in a shell where no commands could be used, not even init:stop/0. Fun's could not be used as parameters to local shell functions (in shell_default or user_default) when restricted_shell was active.
Own Id: OTP-6537
A bug in QLC's parse transform has been fixed.
Own Id: OTP-6590
A bug concerning
Own Id: OTP-6606
When calling
Own Id: OTP-6659
Functions of the
Own Id: OTP-6711
The
These changes affect the Erlang shell when running in
restricted mode: the callback function
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-6714 Aux Id: seq10374
The new compiler option
Own Id: OTP-6585
For scripts written using
Own Id: OTP-6593
Minor Makefile changes.
Own Id: OTP-6689 Aux Id: OTP-6742
The MD5 calculation of a BEAM file done by
Own Id: OTP-6459
When sorting terms using the
The directory supplied with the
Own Id: OTP-6526
Bugs regarding
Own Id: OTP-6539
When sorting the operands of a join operation, QLC
called
Own Id: OTP-6562 Aux Id: seq10606
The functions
The function
The function
Own Id: OTP-6443
Added base64 as a module to stdlib, encoding and decoding
Own Id: OTP-6470
Added the functions to_upper/1 and to_lower/1 to the string module. These provide case conversion for ISO/IEC 8859-1 characters (Latin1) and strings.
Own Id: OTP-6472
The callback function
Own Id: OTP-6497 Aux Id: seq10555
There is a new
Own Id: OTP-6505
The
Own Id: OTP-6517
The control sequences
Own Id: OTP-6495
Added the option {cwd, Dir} to make zip-archives with relative pathnames without having to do (a global) file:set_cwd.
Own Id: OTP-6491 Aux Id: seq10551
The
This limitation has now been properly documented and the
behavior of the
(Thanks to Fredrik Linder)
Own Id: OTP-6345
The control sequence
The indentation takes more care not to exceed the right margin, if possible.
If the maximum depth is
reached while printing a tuple,
Own Id: OTP-6354
The Erlang shell command
Own Id: OTP-6390
The functions
Bugs have been
fixed in QLC:
Own Id: OTP-6359
A bug in
Own Id: OTP-6321 Aux Id: seq10497
The control sequences
Own Id: OTP-6230
Own Id: OTP-6271
The Erlang code preprocessor crashed if the predefined macros ?MODULE or ?MODULE_STRING were used before the module declaration. This bug has been fixed.
Own Id: OTP-6277
Support for faster join of two tables has been added
to the
Several other changes have also been included:
The new
The new
The
The new option
There is a new callback
QLC analyzes each and every QLC expression when trying to find constants for the lookup function. Hitherto only QLC expressions with exactly one generator were analyzed.
Note that only filters with guard
syntax placed immediately after the generator are
analyzed. The restriction to guard filters is an
incompatible change. See
In a similar way several match specifications for traversal of QLC tables can be utilized for different generators of one single QLC expression.
A bug has been fixed: when caching answers to a sufficiently complex query it could happen that some answers were not returned.
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-6038
The Erlang pretty printer (
Own Id: OTP-6227 Aux Id: OTP-5924
The Erlang shell now tries to garbage collect large binaries. Under certain circumstances such binaries could otherwise linger on for an indefinite amount of time.
Own Id: OTP-6239
To help Dialyzer find more bugs, many functions in the Kernel and STDLIB applications now only accept arguments of the type that is documented.
For instance, the functions
Also, the
Dialyzer will find most cases where those functions are passed arguments of the wrong type.
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-6295
The functions
Documentation of
The fact that the control sequence character
Own Id: OTP-6140
The shell command rr() sometimes failed to read record definitions from file(s). This problem has been fixed.
Own Id: OTP-6166 Aux Id: OTP-5878
The nonlocal function handler in
Own Id: OTP-6169 Aux Id: seq10374
ets:rename/1 could deadlock, or crash the SMP emulator when the table wasn't a named table.
ets:next/2, and ets:prev/2 could return erroneous results on the SMP emulator.
Own Id: OTP-6198 Aux Id: seq10392, seq10415
When closing a Dets table the space management data was sometimes saved in such a way that opening the table could not be done without repairing the file. This bug has been fixed.
Own Id: OTP-6206
A bugfix in QLC: two of the call-back functions used
for implementing QLC tables,
Several other minor bugs have been also been fixed.
Own Id: OTP-5195
The STDLIB modules
Own Id: OTP-5535
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-5639
Referencing a so far undeclared record from the default value of some record declaration is from now on considered an error by the linter. It is also an error if the default value of a record declaration uses or binds a variable.
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-5878
When a file
Own Id: OTP-5944
Corrected
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-5960 Aux Id: seq10240
The shell now handles records better when used in calls
on the form
Own Id: OTP-5990 Aux Id: OTP-5876
The functions
For the sake of consistency,
The
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-6019
Correction in documentation for
Own Id: OTP-6072
When sorting terms using the
Own Id: OTP-6088
Improvements of the linter:
The
The new compiler option
The new compiler option
The Erlang code preprocessor
Own Id: OTP-5362
The formatting option
Own Id: OTP-5403
The control sequences
Own Id: OTP-5485
The linter emits warnings for functions exported more
than once in
Own Id: OTP-5494
A manual for STDLIB has been added,
Own Id: OTP-5530
Added the
Own Id: OTP-5786
Simple-one-for-one supervisors now store the pids of
child processes using
Own Id: OTP-5898
When given the new option '
The Erlang shell always applies strict record tests.
Own Id: OTP-5915 Aux Id: OTP-5714
The Erlang pretty printer (
Own Id: OTP-5924
The
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-5985
The function
Own Id: OTP-6023
Added an example of how to reconstruct source code from
debug info (abstract code) to
Own Id: OTP-6073
The new compiler option
Own Id: OTP-6105
Own Id: OTP-5405 Aux Id: OTP-4101
Warnings are output whenever so far undeclared records are referenced from some default value of a record declaration. In STDLIB 1.14 (R11B) such forward references will cause a compilation error.
Own Id: OTP-5878
The linter's check of the
Own Id: OTP-5917
The Erlang pretty printer did not handle
Own Id: OTP-5926
Corrected documentation for
Added documentation for
Tried to clarify some other type declarations and
function descriptions in
Corrected documentation for
Fixed broken links in
Own Id: OTP-5931
Type checks have been added to functions in
Own Id: OTP-5939
The new STDLIB module
Own Id: OTP-5876 Aux Id: OTP-5435
The compiler will now warn that the
Own Id: OTP-5976
When calling
Own Id: OTP-5854
More detail on
Own Id: OTP-5789
The new function
Own Id: OTP-5813
The new function
Own Id: OTP-5846 Aux Id: seq10163
The function
Own Id: OTP-5848 Aux Id: seq10164
A couple of type errors have been fixed in
Own Id: OTP-5739
The pre-processor used to complain that the macro
definition '
Own Id: OTP-5777
The linter, QLC and the module
Own Id: OTP-5644
The manual pages for most of the Kernel and some of the STDLIB modules have been updated, in particular regarding type definitions.
The documentation of the return value for
The documentation for
Own Id: OTP-5360
Replaced some tuple funs with the new
The high-order functions in the lists module no longer
accept bad funs under any circumstances.
'
Unused, broken compatibility code in the
Eliminated 5 discrepancies found by Dialyzer in the Appmon application.
Own Id: OTP-5633
The
The
Own Id: OTP-5645 Aux Id: seq9984
Very minor corrections in
Own Id: OTP-5589
The
Added a note to the documentation of the
Added more information about the '
Own Id: OTP-5555
The new
The new type test
Own Id: OTP-5584
Also,
Own Id: OTP-5523 Aux Id: seq9824
Further improvements of encrypted debug info: New option
Own Id: OTP-5541 Aux Id: seq9837
When opening a Dets table read only an attempt was sometimes made to re-hash the table resulting in an error message. This problem has been fixed.
Own Id: OTP-5487 Aux Id: OTP-4989
It is now possible to encrypt the debug information in
Beam files, to help keep the source code secret. See the
documentation for
The
Own Id: OTP-5460 Aux Id: seq9787
Closing a Dets table kept in RAM would cause a crash if the file could not be written. This problem has been fixed by returning an error tuple.
Own Id: OTP-5402
Own Id: OTP-5412
The Erlang shell failed if the compiler was not in the code path. This problem has been fixed, but in order to evaluate records the compiler is still needed.
Own Id: OTP-5435
Corrected the example in the documentation for
Own Id: OTP-5452 Aux Id: seq9770, seq9789
The possibility to start the Erlang shell in parallel
with the rest of the system was reintroduced for
backwards compatibility in STDLIB 1.13.1. The flag to be
used for this is now called
Own Id: OTP-5406 Aux Id: OTP-5218
The compiler will now produce warnings when using the
deprecated functions in the
Own Id: OTP-5425
The function
Own Id: OTP-5432
Corrected two minor bugs found by the Dialyzer:
Calling a parameterized module from a restricted shell
(i.e. if
And a somewhat more serious one also found by
Dialyzer:
Cleaned up and removed redundant code found by
Dialyzer in
Own Id: OTP-5462
Bugs in the Erlang shell have been fixed.
Own Id: OTP-5327
Some dead code reported by Dialyzer was eliminated.
A bug in
Own Id: OTP-5329
The linter could output invalid warnings about bit patterns in record initializations. This problem has been fixed.
Own Id: OTP-5338
Own Id: OTP-5341
A BIF
Own Id: OTP-5376 Aux Id: OTP-5257
The
Own Id: OTP-5276
The restricted shell will now indicate if the return value from a user predicate is on an incorrect form.
Own Id: OTP-5335
Bugs concerning unused and shadowed variables have been fixed in the linter.
Own Id: OTP-5091
A bug in the evaluator that caused the shell to choke on bit syntax expressions has been fixed.
Own Id: OTP-5237
Own Id: OTP-5263
Bugs in the handling of the bit syntax have been fixed in the Erlang shell.
Own Id: OTP-5269
The documentation was also updated to explicitly
document functions that were only referred to as
'aliases' of a documented function. Also, a list of all
functions common to the
*** POTENTIAL INCOMPATIBILITY ***
Own Id: OTP-5277
Debug messages have been removed from the QLC module.
Own Id: OTP-5283
The size of continuations returned from
Own Id: OTP-5232
The
Own Id: OTP-5248 Aux Id: OTP-5210
The Pman 'trace shell' functionality was broken as has now been fixed. Furthermore, Pman could not correctly find the pid of the active shell if more than one shell process was running on the node. This has also been corrected.
Own Id: OTP-5191
When the undocumented feature "parameterized modules" was used, the ?MODULE macro did not work correctly.
Own Id: OTP-5224
You can now start Erlang with the
erl -sname this_node -rsh other_node@other_host
Own Id: OTP-5210
The man page for the
Own Id: OTP-5213
The top level group leader used to be listed as job #1 in the job list in JCL mode. Since there is no shell associated with this process that can be connected to, it will no longer be listed.
Own Id: OTP-5214
The possibility to start the Erlang shell in parallel with the rest of the system has been reintroduced for backwards compatibility. Note that this old behaviour is error prone and should not be used unless for some reason necessary.
Own Id: OTP-5218 Aux Id: seq9534
The
Own Id: OTP-5226