aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2018-06-25Prepare releaseErlang/OTP
2018-06-25Fix unsafe optimization when running beam_block the second timeBjörn Gustavsson
The compiler would crash when compiling code such as: serialize(#{tag := value, id := Id, domain := Domain}) -> [case Id of nil -> error(id({required, id})); _ -> <<10, 1:16/signed, Id:16/signed>> end, case Domain of nil -> error(id({required, domain})); _ -> <<8, 2:16/signed, Domain:32/signed>> end]. The crash would look like this: Function: serialize/1 t.erl: internal error in block2; crash reason: {badmatch,false} in function beam_utils:live_opt/4 (beam_utils.erl, line 861) in call from beam_utils:live_opt/1 (beam_utils.erl, line 285) in call from beam_block:function/2 (beam_block.erl, line 47) in call from beam_block:'-module/2-lc$^0/1-0-'/2 (beam_block.erl, line 33) in call from beam_block:'-module/2-lc$^0/1-0-'/2 (beam_block.erl, line 33) in call from beam_block:module/2 (beam_block.erl, line 33) in call from compile:block2/2 (compile.erl, line 1358) in call from compile:'-internal_comp/5-anonymous-1-'/3 (compile.erl, line 349) The reason for the crash is an assertion failure caused by a previous unsafe optimization. Here is the code before the unsafe optimization: . . . {bs_init2,{f,0},7,0,0,{field_flags,[]},{x,1}}. {bs_put_string,3,{string,[8,0,2]}}. {bs_put_integer,{f,0},{integer,32},1,{field_flags,[signed,big]},{y,1}}. {move,{x,1},{x,0}}. {test_heap,4,1}. . . . beam_block:move_allocate/1 moved up the test_heap/2 instruction past the move/2 instruction, adjusting the number of live registers at the same time: . . . {bs_init2,{f,0},7,0,0,{field_flags,[]},{x,1}}. %% Only x1 is live now. {bs_put_string,3,{string,[8,0,2]}}. {bs_put_integer,{f,0},{integer,32},1,{field_flags,[signed,big]},{y,1}}. {test_heap,4,2}. %Unsafe. x0 is dead. {move,{x,1},{x,0}}. . . . This optimization is unsafe because the bs_init2 instruction killed x0. The bug is in beam_utils:anno_defs/1, which adds annotations indicating the registers that are defined at the beginning of each block. The annotation before the move/2 instruction incorrectly indicated that x0 was live. https://bugs.erlang.org/browse/ERL-650 https://github.com/elixir-lang/elixir/issues/7782
2018-06-19Prepare releaseErlang/OTP
2018-06-18Merge remote-tracking branch 'origin/henrik/Update-copyright'Henrik Nord
* origin/henrik/Update-copyright: Update copyright year
2018-06-18Update copyright yearHenrik Nord
2018-06-18Merge branch 'ingela/ssl/doc-fix-21'Ingela Anderton Andin
* ingela/ssl/doc-fix-21: ssl: Document enhancements
2018-06-18ssl: Document enhancementsIngela Anderton Andin
2018-06-15Merge branch 'lukas/otp_mibs/deprecate/OTP-15141'Lukas Larsson
* lukas/otp_mibs/deprecate/OTP-15141: Update primary bootstrap Deprecate otp_mibs
2018-06-15Merge branch 'siri/logger-fix'Siri Hansen
* siri/logger-fix: [logger] Update documentation [logger] Adjust priority settings in test [logger] Unregister handler names before terminating [logger] Stress overload_kill tests in disk_log handler
2018-06-15[logger] Update documentationSiri Hansen
2018-06-15[logger] Adjust priority settings in testSiri Hansen
Now only setting high priority on every second burst sending process, to allow for handler process to be scheduled in every now and then.
2018-06-15[logger] Unregister handler names before terminatingSiri Hansen
2018-06-15[logger] Stress overload_kill tests in disk_log handlerSiri Hansen
2018-06-15Merge branch 'peppe/common_test/no_export_all_warning/OTP-14810'Peter Andersson
* peppe/common_test/no_export_all_warning/OTP-14810: No export_all warning when compiling test suites OTP-14810
2018-06-15Merge branch 'peppe/kernel/logger_updates'Peter Andersson
* peppe/kernel/logger_updates: [logger] Correct documentation [logger] Update handler documentation [logger] Fix test suite compilation warnings [logger] Fix failing tests [logger] Change overload_kill_restart_after value to infinity [logger] Change name of function sync/1 to filesync/1 [logger] Reset logger config after tests [logger] Don't delete log file of failing test cases [logger] Set up priority for processes generatig test bursts [logger] Stress overload_kill tests a bit more [logger] Remove some compiler warnings in test suites [logger] Sort keys when testing formatter template [logger] Skip test involving file access rights on windows [logger] Skip some overload protection tests when using dirty schedulers
2018-06-15Merge branch 'hans/crypto/EVP_DH_key/OTP-14864'Hans Nilsson
* hans/crypto/EVP_DH_key/OTP-14864: crypto: Remove EVP_PKEY from dh_compute_key_nif crypto: Try fix valgrind errors
2018-06-15Merge pull request #1838 from crownedgrouse/masterSiri Hansen
Included config files relative to sys.config directory OTP-15137
2018-06-14Included config files relative to sys.config dircrownedgrouse
Change the way included config files are searched in sys.config. Search first relative to sys.config directory, then relative to current working directory, for backward compatibility. This permit same result when using a sys.config file in a release or starting manually a node with -config. Credit to Siri Hansen for test case.
2018-06-14Merge branch 'ingela/ssl/21-enhanchment'Ingela Anderton Andin
* ingela/ssl/21-enhanchment: ssl: Add handle_continue/2 and document enhancements
2018-06-14No export_all warning when compiling test suitesPeter Andersson
OTP-14810
2018-06-14[logger] Correct documentationPeter Andersson
2018-06-14[logger] Update handler documentationPeter Andersson
2018-06-14[logger] Fix test suite compilation warningsPeter Andersson
2018-06-14crypto: Remove EVP_PKEY from dh_compute_key_nifHans Nilsson
According to valgrind, there is a memory leak. When fixing that there is a core-dump instead. Since generate_key is the part that is important for the quality of the key we keep the old compute_key part to avoid memory leakage.
2018-06-14crypto: Try fix valgrind errorsHans Nilsson
Re-structure dh_compute_key_nif and dh_generate_key_nif to see variable scoping and alloc/dealloc pairs better
2018-06-14ssl: Add handle_continue/2 and document enhancementsIngela Anderton Andin
* deprecation of ssl:ssl_accept/[1,2,3] * deprecation of ssl:cipher_suites/[0,1] * More consistent naming
2018-06-14Merge pull request #1837 from kostis/hipe-lcm-21-fixBjörn Gustavsson
Fix a crash in HiPE's lazy code motion pass
2018-06-14[logger] Fix failing testsPeter Andersson
2018-06-14Deprecate otp_mibsLukas Larsson
2018-06-14Merge branch 'maint'John Högberg
* maint: Updated OTP version Prepare release Add test case Parse #mc_new_type{}s before definitions_loop/2 erts: Fix race between ets table deletion and auto-unfix
2018-06-14Merge branch 'maint-20' into maintJohn Högberg
* maint-20: Updated OTP version Prepare release Add test case Parse #mc_new_type{}s before definitions_loop/2 erts: Fix race between ets table deletion and auto-unfix
2018-06-14Merge branch 'ingela/ssl/test-ecdh-check'Ingela Anderton Andin
* ingela/ssl/test-ecdh-check: ssl: Update interop conditions
2018-06-13[logger] Change overload_kill_restart_after value to infinityPeter Andersson
2018-06-13[logger] Change name of function sync/1 to filesync/1Peter Andersson
2018-06-13Explain why the AM becomes group leaderXavier Noria
2018-06-13Merge branch 'hans/ssh/eddh_experimental/OTP-15097'Hans Nilsson
* hans/ssh/eddh_experimental/OTP-15097: crypto: Remove comments
2018-06-13Prepare releaseErlang/OTP
2018-06-13ssl: Update interop conditionsIngela Anderton Andin
2018-06-13Merge branch 'raimo/stdlib/gen_statem-dev/OTP-14015'Raimo Niskanen
* raimo/stdlib/gen_statem-dev/OTP-14015: Show state changes in sys:trace
2018-06-13Merge branch 'rickard/hipe-doc'Rickard Green
* rickard/hipe-doc: Update information about HiPE
2018-06-12Merge branch 'anders/diameter/21.0/OTP-15110'Anders Svensson
* anders/diameter/21.0/OTP-15110: Make diameter_app_SUITE fail more usefully Simplify app-file generation Match in diameter_app_SUITE to identify an unexpected path Don't use deprecated ssl:ssl_accept/1-3 Don't use deprecated erlang:get_stacktrace/0
2018-06-12public: minor doc fixesHans Nilsson
2018-06-12public_key: Clearify pkix_verify_hostname documentationHans Nilsson
2018-06-12crypto: Remove commentsHans Nilsson
2018-06-12Show state changes in sys:traceRaimo Niskanen
2018-06-12[logger] Reset logger config after testsSiri Hansen
2018-06-12[logger] Don't delete log file of failing test casesSiri Hansen
2018-06-12[logger] Set up priority for processes generatig test burstsSiri Hansen
2018-06-12[logger] Stress overload_kill tests a bit moreSiri Hansen
2018-06-12[logger] Remove some compiler warnings in test suitesSiri Hansen