Age | Commit message (Collapse) | Author |
|
|
|
Update to Unicode 10
OTP-14503
|
|
* hasse/stdlib/deprecated_warning/OTP-14378:
stdlib: Accept all nowarn_deprecated_function options
|
|
* maint-20:
Updated OTP version
Update release notes
Update version numbers
erts: Fix bug in quick alloc
Fix old length usage in string
stdlib: Fix bug in proc_lib
Support arbitrary crash report in proc_lib.
|
|
|
|
* siri/make/default-outdir/ERL-438/OTP-14489:
[ct_make] Do not use the interactive tool 'c' from ct_make
Use current dir as default outdir for c:c/1,2
[make] Do not use the interactive tool 'c' from make
|
|
* siri/make/default-outdir/ERL-438/OTP-14489:
[ct_make] Do not use the interactive tool 'c' from ct_make
Use current dir as default outdir for c:c/1,2
[make] Do not use the interactive tool 'c' from make
|
|
In OTP-20, c:c/1,2 started using the directory of the source file as
default output directory. For backwards compatibility reasons this is
now reversed so the current directory is used instead.
|
|
|
|
The check of bad nowarn_deprecated_function tags in -compile
attributes often made it impossible to compile modules with the
warnings_as_errors option in two consecutive releases.
|
|
Add a few more tests to the proc_lib_SUITE.
|
|
The `error_logger_format_depth` variable is `unlimited` by default.
This can cause errors when logging crash reports using sasl logger,
because `io_lib:format("~P"...` does not support `unlimited` as a
depth parameter.
Use formatter string "~p" for unlimited depth.
A way to reproduce the error:
Start erl with sasl logger:
erl -boot start_sasl -sasl errlog_type error -sasl sasl_error_logger tty
Report arbitrary error:
error_logger:error_report(crash_report, [fake_crash_report, foo]).
|
|
The ms_transform module, used by ets:fun2ms/1 and dbg:fun2ms,
evaluates constant arithmetic expressions. This is necessary since the
Erlang compiler, which normally evaluates constant expressions, does
not recognize the format generated by ms_transform.
|
|
* hasse/unicode_atoms/OTP-14285:
compiler: Handle (bad) Unicode parse transform module names
kernel: Improve handling of Unicode filenames
stdlib: Handle Unicode atoms in ms_transform
stdlib: Improve Unicode handling of the Erlang parser
stdlib: Handle unknown compiler options with Unicode
stdlib: Handle Unicode macro names
stdlib: Correct Unicode handling in escript
dialyzer: Improve handling of Unicode
parsetools: Improve handling of Unicode atoms
stdlib: Handle Unicode atoms when formatting stacktraces
stdlib: Add more checks of module names to the linter
stdlib: Handle Unicode atoms better in io_lib_format
stdlib: Handle Unicode atoms in c.erl
|
|
|
|
|
|
Unicode atoms are handled better by the Erlang code linter.
Module names are checked for character codes greater than 255. This
means that modules invoked after the linter can assume that module
names have only Latin-1 characters.
|
|
find and use source directive when searching for source file
|
|
erl_tar: Fix handling of date and time
|
|
Since aa0c4b0df7cdc, erl_tar would write the local time (instead of
the POSIX time) into the tar header for the archived files. When
extracting the tar file, the extracted file could be set to a future
time (depending on the time zone).
We could do a minimal fix, but this seems to be a good time
to rewrite the time handling to use the new features that
allow file info to be read and written in the POSIX time
format.
First reported here: https://github.com/erlang/rebar3/issues/1554
|
|
Return error tuple on unicode normalization functions
|
|
Prior to this patch, the normalization functions in the
unicode module would raise a function clause error for
non-utf8 binaries.
This patch changes it so it returns {error, SoFar, Invalid}
as characters_to_binary and characters_to_list does in
the unicode module.
Note string:next_codepoint/1 and string:next_grapheme had
to be changed accordingly and also return an error tuple.
|
|
The linter emits warnings about using '_' as type variable in
parameterized types.
|
|
|
|
The term returned by io_lib:limit_term(Term, Depth) should return
the same string if substituted for Term in
io_lib:format("~P", [Term, Depth]) or io_lib:format("~W", [Term, Depth]).
|
|
Warn for potentially unsafe use of get_stacktrace/0
|
|
Prior to this patch, the stacktrace of an error or
exit in a callback would always be discarded in crash
reports. For example, an exit(crashed) in handle_call/3
would emit:
=CRASH REPORT==== 10-May-2017::14:15:50 ===
crasher:
initial call: gen_server_SUITE:init/1
pid: <0.201.0>
registered_name: []
exception exit: crashed
in function gen_server:terminate/8 (src/gen_server.erl, line 828)
Note that the stacktrace is pointing to the gen_server
internal terminate implementation that calls exit/1.
This patch uses erlang:raise/3 so the stacktrace is not
lost, allowing proc_lib to show the class, reason
and stacktrace coming from the user implementation
(in this case gen_server_SUITE):
=CRASH REPORT==== 10-May-2017::14:16:44 ===
crasher:
initial call: gen_server_SUITE:init/1
pid: <0.197.0>
registered_name: []
exception exit: crashed
in function gen_server_SUITE:handle_call/3 (gen_server_SUITE.erl, line 1529)
This change is completely backwards compatible as
using erlang:raise/3 will still emit the same exit
reason to any linked process and monitor as before.
|
|
Add option hibernate_after to gen_server, gen_statem and gen_event.
Also added to the deprecated gen_fsm behaviour.
OTP14405
|
|
erlang:get_stacktrace/0 returns the stacktrace for the latest
exception. The problem is that the stacktrace is kept until the next
exception occurs. If the last exception was a 'function_clause' or a
'badarg', the arguments for the call are also kept forever. The
arguments can be terms of any size (potentially huge).
In a future release, we would like to only allow
erlang:get_stacktrace/0 from within a 'try' expression. That would
make it possible to clear the stacktrace when the 'try' expression is
exited.
The 'catch' expression has no natural end where the stacktrace could
be cleared. The stacktrace could be cleared at the end of the function
that the 'catch' occurs in, but that would cause problems in the
following scenario (from real life, but simplified):
try
...
catch _:_ ->
io:format(...),
io:format("~p\n", [erlang:get_stacktrace()])
end.
%% In io.erl.
format(Fmt, Args) ->
Res = case ... of
SomePattern ->
catch...
...;
SomeOtherPattern ->
%% Output the formatted string here
...
end,
clear_stacktrace(), %% Inserted by compiler.
Res.
The call to io:format() would always clear the stacktrace before
it could be retrieved.
That problem could be solved by tightning the scope in which the
stacktrace is kept, but the rules for how long erlang:get_stacktrace/0
would work would become complicated.
Therefore, the solution we suggest for a future major release of
OTP is that erlang:get_stacktrace/0 will return [] if it is called
outside the 'catch' part of a 'try' expression.
To help users prepare, introduce a warning when it is likely that
erlang:get_stacktrace/0 will always return an empty list, for example
in this code:
catch error(foo),
Stk = erlang:get_stacktrace()
or in this code:
try Expr
catch _:_ -> ok end,
Stk = erlang:get_stacktrace()
|
|
* sverker/ets-select-replace-const:
stdlib: Add examples for ets:select_replace docs
erts: Fix ets:select_replace with {const, NewTuple}
|
|
Enable ets:select_replace to do a generic single object
compare-and-swap operation of any ets-tuple using
a matchspec like this:
[{Old, [], [{const, New}]}]
The only exception when this does not work is if the key
contains maps or atoms looking like variables (like '$1').
|
|
|
|
* rand/arbitrary_normal_distributions:
Disable heavy test case
|
|
* raimo/rand-dev/OTP-14295:
Adjust timetrap
|
|
|
|
|
|
in case of active timers exists.
Added unit tests for hibernate_after functionality combined with gen_statem timers.
|
|
It was done because "hibernate_after" option already used in ssl for the same reason.
|
|
|
|
gen_event process's.
There is realized gen_server, gen_fsm, gen_event automatic hibernation functionality.
Added unit tests for realized functionality.
Added documentation for auto_hibernate_timeout option.
|
|
OTP-14531 Generic time-outs in gen_statem
Conflicts:
lib/stdlib/test/erl_internal_SUITE.erl
|
|
* hasse/stdlib/fix_qlc_bug/OTP-14296:
stdlib: Fix a test in sofs_SUITE
debugger: Improve handling of pids, ports, and refs
stdlib: Improve handling of pids, ports, and refs in qlc
stdlib: Improve the Erlang shell's handling of references
|
|
* hasse/unicode_atoms/OTP-14285:
stdlib: Add Unicode modifier t to control sequence a
stdlib: Add Unicode modifier t to control sequences w and W
|
|
|
|
The extended parser introduced in last commit is used in qlc for
solving an old bug: pids and refs could not be parsed by
string_to_handle(). The parser is also used for adjustments regarding
ETS identifiers (now references) in qlc_SUITE.
Notice that pids, references, ports, and external functions that
cannot be created in the currently running system cause syntax errors
(as before).
|
|
As of Erlang/OTP 20.0, the type of ETS tables, ets:tid(), is a
reference(). A request was put forward that the Erlang shell should be
able to handle references in its input.
This commit introduces an extended parser in module lib. It can parse
pids, ports, references, and external funs under the condition that
they can be created in the running system. The parser is meant to be
used internally in Erlang/OTP. The alternative, to extend erl_scan and
erl_parse, was deemed inferior as it would require the abstract format
be able to represent pids, ports, references, and funs, which would be
confusing as they are not expressions as such, but data types.
|
|
* rand/arbitrary_normal_distributions:
Show test case progress
|
|
* raimo/rand-dev/OTP-14295:
Select better test measure points
|
|
|
|
|