aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib
AgeCommit message (Collapse)Author
2017-03-03Merge branch 'raimo/kernel/gen_statem-progress/OTP-14114' into maintRaimo Niskanen
* raimo/kernel/gen_statem-progress/OTP-14114: Make code_change/4 optional Implement fallback for terminate/3 Clarify code_change and callback mode change Stop pampering with stacktraces Clean up timer handling Remove event timer optimization Clean up timer handling Reduce number of loop variables hence code mass Optimize by using async cancel_timer Bugfix: callback mode not cached after code change Implement repeat_state and repeat_state_and_data Correct type checking function for action {next_event,,} Change arity of type to init_result/1
2017-03-02Merge branch 'siri/sys/get_modules/ERL-367/OTP-14248' into maintSiri Hansen
* siri/sys/get_modules/ERL-367/OTP-14248: Correct documentation of get_modules message
2017-03-01Merge pull request #1358 from bjorng/bjorn/stdlib/fix-zip-bugs/OTP-14189Björn Gustavsson
zip: Fix bugs ERL-348 and ERL-349 OTP-14246
2017-03-01Correct documentation of get_modules messageSiri Hansen
2017-02-28zip: Eliminate leak of open file after crashBjörn Gustavsson
Make sure that zip:extract() and zip:create() closes the zip file if there is an error. ERL-349
2017-02-28zip: Don't crash when a zip file has an Unix extra headerBjörn Gustavsson
There is unfinished code in the zip module to handle the extra field in the central-directory header for each file. The code to extract an Unix extra subfield is incorrect and always causes a bad_unix_extra_field error. A further flaw in the code is that it expects that there is only a single subfield. Correcting the code for extracting extra subfields will not do any good, because the extracted data is ignored. In fact, not even the file times extracted from DOS file times are used for some reason. Therefore, don't correct the unfinished code. Remove it completely. (If needed, extending zip to use file times and to use the information in the extra field should be done in a major release, not in a maintenance release.) ERL-348
2017-02-27stdlib: Add maps to term traversalHans Bolinder
2017-02-24Merge pull request #1350 from bjorng/bjorn/stdlib/safe-relative-path/OTP-14215Björn Gustavsson
filename: Add safe_relative_path/1 OTP-14215
2017-02-23Make code_change/4 optionalRaimo Niskanen
2017-02-23Implement fallback for terminate/3Raimo Niskanen
2017-02-23Clarify code_change and callback mode changeRaimo Niskanen
2017-02-22Stop pampering with stacktracesRaimo Niskanen
2017-02-22Clean up timer handlingRaimo Niskanen
2017-02-21stdlib: Improve pretty-printing of terms with mapsHans Bolinder
As of committing this branch maps:fold/3 calls maps:to_list/1, which means that the time and memory needed for printing maps is not always proportional to the size of the generated deep list of characters.
2017-02-21filename: Add safe_relative_path/1Björn Gustavsson
Add safe_relative_path/1 to guard against directory traversal attacks. It either returns a shorter path without any ".." or "." components, or 'unsafe' if an ".." component would climb up above the root of the relative path. Here are a few examples: safe_relative_path("a/b/..") => "a" safe_relative_path("a/..") => "" safe_relative_path("a/../..") => unsafe safe_relative_path("/absolute/path") => unsafe The returned path can be used directly or combined with an absolute path using filename:join/2.
2017-02-08stdlib: Improve Erlang shell's tab-completion of long namesHans Bolinder
2017-02-07Remove event timer optimizationRaimo Niskanen
Handle the event timer more like other timers and do not optimize the odd case of combining an event timeout with inserting custom events, wich by definition cancels the event timeout.
2017-02-07Clean up timer handlingRaimo Niskanen
2017-02-03Reduce number of loop variables hence code massRaimo Niskanen
2017-02-02Optimize by using async cancel_timerRaimo Niskanen
2017-02-01Bugfix: callback mode not cached after code changeRaimo Niskanen
Fix lots of internal state updates just before termination that could cause crash reports confused about timers.
2017-01-30Implement repeat_state and repeat_state_and_dataRaimo Niskanen
2017-01-23Correct type checking function for action {next_event,,}Raimo Niskanen
2017-01-20Change arity of type to init_result/1Raimo Niskanen
2017-01-17Merge branch 'egil/cuddle-tests' into maintBjörn-Egil Dahlberg
* egil/cuddle-tests: stdlib: Increase timetrap for rand_SUITE common_test: Increase timetrap for cth_hooks_SUITE compiler: Increase timetrap timeouts for lc_SUITE
2017-01-10stdlib: Correct signatures of functions in erl_parseHans Bolinder
The signatures of erl_parse:anno_to_term/1 and erl_parse:anno_from_term/1 are corrected. Using these function no longer results in false Dialyzer warnings.
2017-01-10Merge branch 'hasse/stdlib/char_as_integer/ERL-313/OTP-14103' into maintHans Bolinder
* hasse/stdlib/char_as_integer/ERL-313/OTP-14103: stdlib: Allow characters in types and constant patterns
2016-12-21stdlib: Allow characters in types and constant patternsHans Bolinder
Characters ($char) can be used in constant pattern expressions. They can also be used in types and contracts.
2016-12-19Merge branch 'rickard/stacktrace-bugs' into maintRickard Green
OTP-14055 * rickard/stacktrace-bugs: Remove faulty release note for these fixes New test cases testing stacktrace from apply on erlang:error() Fix stactrace for apply on error/[1,2], exit/1, or throw/1 Fix stack-trace generated by a traced process
2016-12-19Fix stactrace for apply on error/[1,2], exit/1, or throw/1Rickard Green
2016-12-16Merge pull request #1275 from pjhades/fix/escriptBjörn Gustavsson
Allow escripts with only two lines OTP-14098
2016-12-13Allow escripts with only two linesJing Peng
The current implementation assumes that escripts all have at least three lines. But according to the escript documentation, comments on the second line and emulator flags on the third line are all optional. Thus escripts with only two lines -- shebang on the first line and code on the second line -- will not run. This commit fixes the problem by rearranging the escript header parsing logic, and recognize the escript body on the second line if the header only contains a line of shebang.
2016-12-09Prepare releaseErlang/OTP
2016-12-07Update copyright-yearErlang/OTP
2016-11-22stdlib: Correct types of the abstract formatHans Bolinder
The types in erl_parse.yrl are more in harmony with the description in The Abstract Format (in ERTS User's Guide).
2016-11-17Correct tar_SUITE:unicode/1Björn Gustavsson
Make sure that we always test the "+fnu" option on all systems. It seems that it was not tested in our daily builds, since they are run non-interactively. Make sure that we sort the list of names in do_unicode/1. Otherwise the test would only work in "+fnl" mode because the list would only contain one element.
2016-11-11stdlib: Increase timetrap for rand_SUITEBjörn-Egil Dahlberg
* valgrind needs a lot of time
2016-11-08Merge branch 'raimo/gen_statem-improvements/OTP-13929' into maintRaimo Niskanen
* raimo/gen_statem-improvements/OTP-13929: Log terminate to sys debug Optimize event timeout Rework timeout handling Clarify the chapter 'Postponing Events' (ERL-284) Fix doc and type for state enter calls
2016-11-08fix typo on doc of mapsJxck
typo
2016-11-04stdlib: Increase timeouts in ets_SUITEBjörn-Egil Dahlberg
* valgrind needs lots of time
2016-11-04stdlib: Increase timeouts in rand_SUITEBjörn-Egil Dahlberg
* valgrind needs lots of time
2016-11-04stdlib: Increase timeouts in base64_SUITEBjörn-Egil Dahlberg
* valgrind needs lots of time
2016-10-26stdlib: Correct shell_default(3)Hans Bolinder
2016-10-26Log terminate to sys debugRaimo Niskanen
2016-10-26Optimize event timeoutRaimo Niskanen
Do not start an event timer unless there are no enqueued events.
2016-10-26Rework timeout handlingRaimo Niskanen
Handling of timers and timeouts has been cleaned up and generalized. Semantic change regarding state timeout zero: Previously if one state caused a state timeout zero and managed to stay in the same state to insert additional timeout zero(s) in the next state callback invocation, then there would be only one timeout zero event. The mindset was that the machine was faster then the timeout zero. This has changed with the mindset that all state callback invocations should be independent, so now the machine will get one state timeout zero event per started state timeout zero. Note that just using zero timeouts is fairly esoteric...
2016-10-24Fix doc and type for state enter callsRaimo Niskanen
2016-10-19Merge branch 'gomoripeti/stdlib/ms_fix/PR-1203/OTP-13974' into maintHans Bolinder
* gomoripeti/stdlib/ms_fix/PR-1203/OTP-13974: dbg:fun2ms: allow empty list as head
2016-10-19Merge branch 'raimo/gen_statem-improvements/OTP-13929' into maintRaimo Niskanen
* raimo/gen_statem-improvements/OTP-13929: Fix race condition in cancel_timer/1 Use parameterized types Implement state timeouts Improve docs and types Change state entry events into state enter calls Improve docs Improve docs Implement state entry events Implement call/3 dirty_timeout
2016-10-14Fix race condition in cancel_timer/1Raimo Niskanen