aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2014-03-06Merge branch 'nox/compiler/beam_bool-not_boolean_expr'Björn Gustavsson
* nox/compiler/beam_bool-not_boolean_expr: Compile BIF calls and operator expressions to Core the same way Do not try to optimize non-boolean guards
2014-03-06Merge branch 'nox/compiler/core_lint-call-guard'Björn Gustavsson
* nox/compiler/core_lint-call-guard: Properly lint calls in Core Erlang guards
2014-03-06Merge branch 'kostis/hipe_bifs-types'Björn Gustavsson
* kostis/hipe_bifs-types: Add types for new HiPE BIFs
2014-03-06Merge branch 'hb/stdlib/fix_dets/OTP-11709'Hans Bolinder
* hb/stdlib/fix_dets/OTP-11709: stdlib: Fix a Dets bug where files were deleted stdlib: Fix a Dets bug with leaking file descriptors
2014-03-05Merge branch 'hb/stdlib/spec_fixes/OTP-11399'Hans Bolinder
* hb/stdlib/spec_fixes/OTP-11399: stdlib: Improve the doc of the supervisor's via reference
2014-03-05stdlib: Fix a Dets bug where files were deletedHans Bolinder
Instead of deleting the small file when opening it with dets:open_file/2 an error message is returned, mimicking the behaviour when the file is bigger. open_file/1 has been modified to return the same error message when the file is small as when the file is bigger. Thanks to Hakan Mattson for reporting this bug.
2014-03-05stdlib: Fix a Dets bug with leaking file descriptorsHans Bolinder
Thanks to Hakan Mattson for reporting this bug.
2014-03-05Merge branch 'nox/compiler/beam_bool-bad-protected'Björn Gustavsson
* nox/compiler/beam_bool-bad-protected: Properly detect nonboolean protected expressions in beam_bool
2014-03-05Merge branch 'nox/compiler/live_opt-wait_timeout-nil'Björn Gustavsson
* nox/compiler/live_opt-wait_timeout-nil: Handle nil as a wait_timeout argument in beam_utils:live_opt/4
2014-03-05Merge branch 'nox/compiler/sys_core_fold-erlang-is_function-2'Björn Gustavsson
* nox/compiler/sys_core_fold-erlang-is_function-2: Do not mark all calls to erlang:is_function/2 as safe
2014-03-05Merge branch 'nox/compiler/lint-shortcircuit-ops'Björn Gustavsson
* nox/compiler/lint-shortcircuit-ops: Properly lint shortcircuiting operators
2014-03-05Merge branch 'hb/dialyzer/deprecate_types/OTP-10342'Hans Bolinder
* hb/dialyzer/deprecate_types/OTP-10342: Introduce compiler option 'nowarn_deprecated_type' Improve message about deprecated built-in types
2014-03-05Compile BIF calls and operator expressions to Core the same wayAnthony Ramine
Previously, erlang:'or'(X, Y) and X or Y were not compiled to the same Core code.
2014-03-05Do not try to optimize non-boolean guardsAnthony Ramine
Expressions such as erlang:'or'(bar, true) can make beam_bool crash if it tries to optimize them, as this code is not quite really written by users, no attempt to rewrite them more efficiently should be done, for simplicity's sake. Reported-by: Ulf Norell
2014-03-05stdlib: Improve the doc of the supervisor's via referenceHans Bolinder
Most of the updates have already been made in 'Fix alternative registry type annotations in supervisor', a5412706f4185fddbac29216a49affd1e9f11da0. Thanks to MaximMinin.
2014-03-05Add types for new HiPE BIFsKostis Sagonas
Commit 81c7db0e247a6ee1b7a5c2764aa9575d7f6fb88a broke apart hipe_bif:make_fe/3 into two BIFs but forgot to properly update the type information about HiPE BIFs in erl_bif_types.erl. This commit fixes this by taking out the types of hipe_bifs:make_fe/3 and adding types for the new BIFs hipe_bifs:get_fe/2 and hipe_bifs:hipe_bifs_set_native_address_in_fe/2.
2014-03-04Properly lint calls in Core Erlang guardsAnthony Ramine
Not all calls to the erlang module are legal guards in Core Erlang.
2014-03-04Merge branch 'nox/maps-support-cover/OTP-11764'Björn-Egil Dahlberg
* nox/maps-support-cover/OTP-11764: Support maps in cover Conflicts: lib/tools/src/cover.erl
2014-03-04Merge branch 'ia/ssl/option-check'Ingela Anderton Andin
* ia/ssl/option-check: ssl: Add exception for inet and inet6 to proplist check
2014-03-04ssl: Add exception for inet and inet6 to proplist checkIngela Anderton Andin
2014-03-04Merge branch 'nox/maps-fix-beam_bool-put_map'Björn-Egil Dahlberg
* nox/maps-fix-beam_bool-put_map: Properly collect labels in put_map instructions in beam_bool
2014-03-04Merge branch 'nox/maps-expand-update'Björn-Egil Dahlberg
* nox/maps-expand-update: Fix expansion of map update arguments
2014-03-04Merge branch 'nox/compiler/v3_core-mismatched-apply'Björn Gustavsson
* nox/compiler/v3_core-mismatched-apply: Do not emit blatantly illformed Core Erlang apply expressions
2014-03-04Merge branch 'nox/compiler/sys_core_fold-erlang-is_record-3'Björn Gustavsson
* nox/compiler/sys_core_fold-erlang-is_record-3: Do not mark all calls to erlang:is_record/3 as safe
2014-03-04Merge branch 'bjorn/hipe/fix-race-condition'Björn Gustavsson
* bjorn/hipe/fix-race-condition: Delay patching of closures to eliminate a race condition hipe: Break apart hipe_bif:make_fe/3 into two BIFs
2014-03-04Merge branch 'hb/stdlib/qlc_fix/OTP-11758'Hans Bolinder
* hb/stdlib/qlc_fix/OTP-11758: Fix a qlc bug where filters were erroneously optimized away
2014-03-04Introduce compiler option 'nowarn_deprecated_type'Hans Bolinder
The deprecation of the built-in types dict/0 and so on had as side-effect that it was impossible to switch to dict:dict/2 and so on without getting warnings either in the the previous release (R16B) or the current one (17.0). By including the attribute -compile(nowarn_deprecated_type). in an Erlang source file warnings about deprecated types can be avoided in 17.0. The option can also be given as a compiler flag: erlc +nowarn_deprecated_type file.erl
2014-03-04Improve message about deprecated built-in typesHans Bolinder
2014-03-04Merge branch 'ia/ssl/proplist-input-check/OTP-11760'Ingela Anderton Andin
* ia/ssl/proplist-input-check/OTP-11760: ssl: Add input sanity check
2014-03-04ssl: Add input sanity checkIngela Anderton Andin
Avoid puzzling behavior due to options being disregarded if they are not key value tuples.
2014-03-04Handle nil as a wait_timeout argument in beam_utils:live_opt/4Anthony Ramine
Reported-by: Ulf Norell
2014-03-04Properly detect nonboolean protected expressions in beam_boolAnthony Ramine
Silly code such as the following could make the compiler crash: f() when erlang:float(self()); true -> ok. Reported-by: Ulf Norell
2014-03-03Properly collect labels in put_map instructions in beam_boolAnthony Ramine
Reported-by: Ulf Norell
2014-03-03ssl: Improved documentation of the cacertfile optionIngela Anderton Andin
2014-03-03Fix a qlc bug where filters were erroneously optimized awayHans Bolinder
Thanks to Sam Bobroff for reporting the bug.
2014-03-03Do not mark all calls to erlang:is_function/2 as safeAnthony Ramine
Calls to erlang:is_function/2 where the second is not a literal nonnegative integer can crash at runtime and thus can't be marked as safe.
2014-03-02Do not mark all calls to erlang:is_record/3 as safeAnthony Ramine
Calls to erlang:is_record/3 where the second and third arguments are not respectively a literal atom and a literal integer can't be transformed to guards and thus are not safe. Reported-by: Ulf Norell
2014-03-01Do not emit blatantly illformed Core Erlang apply expressionsAnthony Ramine
(fun f/1)() should be compiled to let X = 'f'/1 in apply X () to let the compiler properly generate code that will fail with badarity at runtime. Reported-by: Ulf Norell
2014-03-01Properly lint shortcircuiting operatorsAnthony Ramine
Shortcircuiting operators are not real functions and can't be used as such with erlang:'andalso'(...) and erlang:'orelse'(...). Reported-by: Ulf Norell
2014-03-01Fix expansion of map update argumentsAnthony Ramine
Reported-by: José Valim
2014-02-28compiler: Fix error message printout on compile errorBjörn-Egil Dahlberg
Use correct stack in printout.
2014-02-28Delay patching of closures to eliminate a race conditionBjörn Gustavsson
The loader of native code tries to avoid race condition by bringing down the system to a single scheduler. Unfortunately, that will not completely avoid race conditions beacuse other processes may still run while the code is being loaded. Therefore, we must still make sure that native code has been fully fixed up before it can be executed. Under unlucky circumstances, it was possible for the global name register process to call a fun in native code before the native code for the fun had been fully fixed up. The run-time system would crash when running the not-fully-fixed-up code. Here is a way to make the bug 100% reproducible. First add this function to the 'global' module: silly_looper(List) -> lists:foreach(fun(E) -> put(any_atom, E) end, List), silly_looper(List). Then insert the following code at the beginning of the init/1 function in the 'global' module: spawn_link(fun() -> silly_looper(lists:seq(1, 100)) end), The run-time system will crash during start up when the native code for the 'global' module is being loaded. What will happen is that lists:foreach/2 (which runs in native code) will call the native code for the fun in silly_looper/1 before the reference to 'any_atom' has been changed from a 0 to the proper tagged atom value. The put/2 BIF will exit when attempting to calculate the hash value for the illegal value 0 (it is not properly tagged). To eliminate this race condition, we must delay patching the native code addresses for a fun into the fun entry until the native code has been fully fixed up. We will use the new BIFs introduced in the previous commit. While we are at it, we will also make sure that we erase any temporary variables in the process dictionary used by the hipe_unified_loader module.
2014-02-28hipe: Break apart hipe_bif:make_fe/3 into two BIFsBjörn Gustavsson
This commit is a preparation for eliminating a race condition loading the native code for modules whose BEAM code has already been loaded. Here we introduce two new BIFs so that looking up a fun entry is separate from setting the native address in the fun entry.
2014-02-26ssh: Add appup file correctionsHans Nilsson
2014-02-25Merge branch 'ia/ssl/fix-warnings'Ingela Anderton Andin
* ia/ssl/fix-warnings: ssl: Fix compiler warnings ssl: Fix appup regexps and instructions
2014-02-25ssl: Fix compiler warningsIngela Anderton Andin
2014-02-25ssl: Fix appup regexps and instructionsIngela Anderton Andin
2014-02-25eldap: Prepare for releaseHans Nilsson
2014-02-25ssh: Prepare for releaseHans Nilsson
2014-02-25inets: Prepare for releaseHans Nilsson