aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-01-18Merge branch 'egil/improve-map-cerl-prettypr/OTP-13238' into maintBjörn-Egil Dahlberg
* egil/improve-map-cerl-prettypr/OTP-13238: compiler, hipe: Fix pretty printing of Core Maps hipe: Fix map pretty printing of pairs dialyzer: Update Maps tests
2016-01-18Merge branch 'maint'Hans Bolinder
* maint: edoc: Assign correct names to list arguments
2016-01-18Merge branch 'hb/edoc/fix_argument_names/OTP-13234' into maintHans Bolinder
* hb/edoc/fix_argument_names/OTP-13234: edoc: Assign correct names to list arguments
2016-01-18edoc: Assign correct names to list argumentsHans Bolinder
Bug reported by Josemic. See also ERL-63.
2016-01-15Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Correct handling of parameters of opaque types
2016-01-15Merge branch 'hb/dialyzer/fix_opaque_type_parms/OTP-13237' into maintHans Bolinder
* hb/dialyzer/fix_opaque_type_parms/OTP-13237: dialyzer: Correct handling of parameters of opaque types
2016-01-15dialyzer: Correct handling of parameters of opaque typesHans Bolinder
Correction of commit d57f5e.
2016-01-14crypto: Fix bug for multiple blocks for AES-ECBAndrew Bennett
2016-01-14Merge branch 'maint'Sverker Eriksson
2016-01-14Merge branch 'sverk/trace-doc-typo' into maintSverker Eriksson
* sverk/trace-doc-typo: erts: Correct faulty doc for erlang:trace/3
2016-01-14erts: Correct faulty doc for erlang:trace/3Sverker Eriksson
The entire MFA tuple is replaced with 0, not just Arity.
2016-01-14compiler, hipe: Fix pretty printing of Core MapsBjörn-Egil Dahlberg
Literal maps could cause dialyzer to crash when pretty printing the results. Reported-by: Chris McGrath <[email protected]>
2016-01-14hipe: Fix map pretty printing of pairsBjörn-Egil Dahlberg
In commit f667931e2905797ffab63e224e56eaf07f77178a the core format changed for map pairs. Let dialyzer and hipe pretty printing of maps also adhere to those changes. An Erlang map update, M#{foo := 1, bar => 2} will now be printed as: ~{ 'foo' := 1, 'bar' => 2 | M }~
2016-01-14dialyzer: Update Maps testsBjörn-Egil Dahlberg
2016-01-14Merge branch 'maint'Rickard Green
* maint: Do not allow aux work on dirty schedulers
2016-01-14Merge branch 'vinoski/dirty-sched-no-aux-work/OTP-13236' into maintRickard Green
* vinoski/dirty-sched-no-aux-work/OTP-13236: Do not allow aux work on dirty schedulers
2016-01-13erts: Optimize erlang:check_process_codeSverker Eriksson
by ignoring literals. erts_internal:check_process_code will be called again anyway (with option {copy_literals, true}) before the module is actually purged. No need to check literals twice.
2016-01-13erts: Refactor check_process_code/3Sverker Eriksson
Move impl from erlang to erts_internal. Cut and paste.
2016-01-13erts: Make copy_literals more fail safeSverker Eriksson
* Same process must do enable-disable. * System process will force it and never get 'aborted'
2016-01-13erts: Move copy_literals/2 from erlang to erts_internalSverker Eriksson
as it's not a public interface.
2016-01-13erts: Make erlang:purge_module/1 safeSverker Eriksson
Problem: erlang:purge_module/1 is not safe in the sense that very bad things may happen if the code to be purged is still referred to by live processes. Introduce erts_internal:purge_module which is the same as the old erlang:purge_module BIF (except it returns false if no such old module). Implement erlang:purge_module in Erlang and let it invoke erts_code_purger for safe purging where all clogging processes first are killed.
2016-01-13Merge branch 'sverk/fvisibility-hidden/OTP-13227'Sverker Eriksson
* sverk/fvisibility-hidden/OTP-13227: erts: Allow -fvisibility=hidden for NIFs and drivers erts: Cleanup erl_driver.h for windows erts: Refactor ERL_NIF_INIT macro
2016-01-13erts: Refactor code:purge/1 and code:soft_purge/1Sverker Eriksson
by moving code from code_server to erts_code_purger. This is more or less a copy-paste from code_server.erl to erts_code_purger.erl. All the inner mechanics of code:purge/1 and code:soft_purge/1 are unchanged.
2016-01-13erts: Introduce erts_code_purgerSverker Eriksson
as a system process with preloaded code.
2016-01-13Merge branch 'maint'Björn Gustavsson
* maint: Fix crash when attempting to update a fun as if it were a map
2016-01-13Merge branch 'bjorn/compiler/map-bug/OTP-13231' into maintBjörn Gustavsson
* bjorn/compiler/map-bug/OTP-13231: Fix crash when attempting to update a fun as if it were a map
2016-01-13Merge branch 'hb/stdlib/fix_dets_file_name/OTP-13229'Hans Bolinder
* hb/stdlib/fix_dets_file_name/OTP-13229: stdlib: Let dets:open_file() crash when given raw file name
2016-01-13stdlib: Let dets:open_file() crash when given raw file nameHans Bolinder
See also ERL-55.
2016-01-13Merge branch 'maint'Hans Bolinder
* maint: stdlib: Fix linter crash due to missing -module declaration Conflicts: lib/stdlib/test/erl_lint_SUITE.erl
2016-01-13Merge branch 'hb/stdlib/fix_linter_no_module/OTP-13230' into maintHans Bolinder
* hb/stdlib/fix_linter_no_module/OTP-13230: stdlib: Fix linter crash due to missing -module declaration
2016-01-13stdlib: Fix linter crash due to missing -module declarationHans Bolinder
The Erlang Code Linter no longer crashes if there is a -deprecated() attribute but no -module() declaration. See also ERL-62 at bugs.erlang.org.
2016-01-13Merge branch 'maint'Hans Bolinder
* maint: stdlib: fix erl_eval not using non-local function handler
2016-01-13Merge branch 'hb/stdlib/fix_erl_eval/OTP-13228' into maintHans Bolinder
* hb/stdlib/fix_erl_eval/OTP-13228: stdlib: fix erl_eval not using non-local function handler
2016-01-13stdlib: fix erl_eval not using non-local function handlerHans Bolinder
See also ERL-32 at bugs.erlang.org. Thanks to Ben Paxton.
2016-01-12Fix crash when attempting to update a fun as if it were a mapBjörn Gustavsson
The following example would cause an internal consistency failure in the compiler: f() -> ok. update() -> (fun f/0)#{u => 42}. The reason is that internally, v3_core will (incorrectly) rewrite update/0 to code similar to this: update() -> if is_map(fun f/0) -> maps:update(u, 42, fun f/0) end. Since funs are not allowed to be created in guards, incorrect and unsafe code would be generated. It is easy to fix the bug. There already is a is_valid_map_src/1 function in v3_core that tests whether the argument for the map update operation can possibly be a valid map. A fun is represented as a variable with a special name in Core Erlang, so it would not be recognized as unsafe. All we'll need to do to fix the bug is to look closer at variables to ensure they don't represent funs. That will ensure that the code is rewritten in the correct way: update() -> error({badmap,fun f/0}) end. Reported-by: Thomas Arts
2016-01-11erts: Workaround memset bug in test caseSverker Eriksson
memset seen to fail with values larger than 255 on (armata) 32-bit ARM Debian with EGLIBC 2.13-38+rpi2+deb7u8 and gcc 4.6.3-14+rpi1.
2016-01-11Merge branch 'maint'Henrik Nord
Conflicts: OTP_VERSION
2016-01-11Merge branch 'maint-18' into maintHenrik Nord
2016-01-11Merge branch 'maint'Björn Gustavsson
* maint: Eliminate crash in v3_codegen
2016-01-11Eliminate crash in v3_codegenBjörn Gustavsson
The following code would crash v3_codegen: order(From) -> catch if From#{[] => sufficient} -> saint end. Before explaining the crash, first some background on the stack frame and the Y registers. Certain instructions, most notably the 'call' instructions, clobber all X registers. Before any such instruction, all X registers that have values that will be used after the call must be saved to Y registers (i.e. to the stack frame). adjust_stack/4 will be called when X registers must be saved. There is also another situation when X registers must be saved, namely within a 'catch' if we are about to execute any instruction that may cause an exception. Examples of such instructions are some guard BIFs (such as length/1) and construction of binaries or maps. Within a 'catch', X registers must be be saved because if an exception is thrown and catched all X registers will be destroyed. The same adjust_stack/4 function will be called for those instructions, but only if they occur within a 'catch'. There is actually one more complication. If there is code in a guard within a catch, the X registers should not be saved, because the code in a guard never clobbers any X registers that were alive before the guard code was entered. v3_codegen is written with the implicit assumption that code in guards never cause anything to be saved to Y registers. The code for building maps and binaries would incorrectly save X registers within a guard inside a 'catch'. For construction of binaries, that would mean that a useless but harmelss 'move' instruction was generated. But for construction of maps, the saving of the Y register would not be harmless. There would be a crash when attempting to merge #sr{} records. #sr{} records keeps track of the contents of X and Y registers. When two separate code paths are joined (e.g. at the end of 'case' statement), the register descriptors must be reconciled. Basically, the register descriptors for both paths must be identical. The #sr{} record for one path must not claim that {y,0} contains a certain value, while another path claims that {y,0} is dead. Thus, the crash occurs in sr_merge/2 when failing to reconcile the Y registers. To fix this bug this bug we will introduce a new function called maybe_adjust_stack/5. It will save X registers on the stack only if the code is inside a catch but not inside a guard. We will change all existing code to use this new function when appropriate. Reported-by: Thomas Arts
2016-01-08erts: Allow -fvisibility=hidden for NIFs and driversSverker Eriksson
as is strongly recommended by gcc man page. We use __attribute__ ((visibility("default"))) to make sure the init functions are properly exported.
2016-01-08erts: Cleanup erl_driver.h for windowsSverker Eriksson
The comment is misleading and no need to "export" static windows drivers. DRIVER_INIT for dynamic windows drivers is defined in erl_win_dyn_driver.h
2016-01-08erts: Refactor ERL_NIF_INIT macroSverker Eriksson
2016-01-08Updated OTP versionOTP-18.2.2Erlang/OTP
2016-01-08Update release notesErlang/OTP
2016-01-08Merge branch 'hans/ssh/keyboard_interactive0/OTP-13255' into maint-18Erlang/OTP
* hans/ssh/keyboard_interactive0/OTP-13255: ssh: update vsn.mk to 4.2.1 ssh: handle secondary ssh_msg_userauth_info_request message ssh: testcase for abnormal keyboard-interactive authentication
2016-01-08ssh: update vsn.mk to 4.2.1Hans Nilsson
2016-01-08ssh: handle secondary ssh_msg_userauth_info_request messageHans Nilsson
2016-01-08ssh: testcase for abnormal keyboard-interactive authenticationHans Nilsson
2016-01-08Merge branch 'maint'Björn Gustavsson
* maint: beam_bool: Fix unsafe optimization