aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2015-01-14sys_core_fold: Correct optimization of 'case'Björn Gustavsson
The optimization of a 'case' statement could lead to incorrect code that would cause an exception at run-time. Here is an example to show how the optimization went wrong. Start with the following code: f({r,#{key:=Val},X}=S) -> case S of {r,_,_} -> setelement(3, Val, S) end. (The record operations have already been translated to the corresponding tuple operations.) The first step in case_opt/3 is to substitute S to obtain: f({r,#{key:=Val},X}=S) -> case {r,#{key:=Val},X} of {r,_,_} -> setelement(3, Val, S) end. After that substitution the 'case' can be simplified to: f({r,#{key:=Val},_}=S) -> case #{key:=Val} of NewVar -> setelement(3, Val, S) end. That is the result from case_opt/3. Now eval_case/2 notices that since there is only one clause left in the 'case', the 'case' can eliminated: f({r,#{key:=Val},_}=S) -> NewVar = #{key:=Val}, setelement(3, Val, S). Since the map construction may have a side effect, it was not eliminated, but assigned to a variable that is never used. The problem is that '#{key:=Val}' is fine as a pattern, but in a construction of a new map, the '=>' operator must be used. So the map construction will fail, generating an exception. As a conservative correction for a maintenance release, we will abort the 'case' optimization if the substitution into the 'case' expression is anything but data items (tuples, conses, or literals) or variables. Reported-by: Dmitry Aleksandrov
2015-01-13Merge branch 'dgud/debugger/save-state-mac/OTP-12378' into maintDan Gudmundsson
* dgud/debugger/save-state-mac/OTP-12378: debugger: Fix debugger save options on mac
2015-01-13Merge branch 'dgud/wx/connect-when-terminating/OTP-12374' into maintDan Gudmundsson
* dgud/wx/connect-when-terminating/OTP-12374: wx: Do not crash server when going down
2014-12-26Fix grammarDerek Brown
2014-12-22Merge branch 'mikpe/fix-eacces-spelling' into maintBruce Yinhe
* mikpe/fix-eacces-spelling: fix eacces spelling
2014-12-19debugger: Fix debugger save options on macDan Gudmundsson
wxFileDialog:getPaths(FD) always return the empty list on mac when using file dialog.
2014-12-19Merge branch 'hans/eldap/bad_return_close/OTP-12349' into maintHans Nilsson
* hans/eldap/bad_return_close/OTP-12349: eldap: Remove trailing white space. eldap: Test cases for a few return values (open, close) eldap: updated eldap:close in tests eldap: Makes close/1 return as documented.
2014-12-19Merge branch 'hans/eldap/test_improvents/OTP-12355' into maintHans Nilsson
* hans/eldap/test_improvents/OTP-12355: eldap: Corrects SSL over IPv6 test. eldap: Removes eldap_misc_SUITE that is now included in eldap_basic_SUITE. eldap: Add encode/decode tests. eldap: Merge eldap_connections_SUITE into eldab_basic_SUITE eldap: Adds ssl to connections test suite eldap: Updates basic test suite - Splits one large testcase into smaller ones. - Makes tests independent - Adds some tests.
2014-12-19wx: Do not crash server when going downDan Gudmundsson
If a connect request was made during the takedown of wx it would crash.
2014-12-18Merge branch 'haguenau/fix-endianness-speling' into maintBruce Yinhe
* haguenau/fix-endianness-speling: Replaced "Endianess" with "Endianness" everywhere
2014-12-17eldap: Remove trailing white space.Hans Nilsson
2014-12-17eldap: Test cases for a few return values (open, close)Hans Nilsson
2014-12-17eldap: updated eldap:close in testsHans Nilsson
2014-12-17eldap: Makes close/1 return as documented.Hans Nilsson
2014-12-17eldap: Corrects SSL over IPv6 test.Hans Nilsson
2014-12-17eldap: Removes eldap_misc_SUITE that is now included in eldap_basic_SUITE.Hans Nilsson
2014-12-17eldap: Add encode/decode tests.Hans Nilsson
2014-12-17eldap: Merge eldap_connections_SUITE into eldab_basic_SUITEHans Nilsson
2014-12-17 eldap: Adds ssl to connections test suiteHans Nilsson
2014-12-17eldap: Updates basic test suiteHans Nilsson
- Splits one large testcase into smaller ones. - Makes tests independent - Adds some tests.
2014-12-17ssh: Improve errorhandling in ssh_connection.erlIngela Anderton Andin
If a channel is closed by the peer while using a function with call semantics in ssh_connection.erl return {error, closed}. Document that the functions can return {error, timeout | closed} and not only ssh_request_status()
2014-12-17Merge branch 'marcus/revert-ssh-testcase2/OTP-12004' into maintMarcus Arendt
* marcus/revert-ssh-testcase2/OTP-12004: fix failed conflict resolution
2014-12-12Merge branch 'hans/eldap/doc_fixes/OTP-12354' into maintHans Nilsson
2014-12-12add missing release notesMarcus Arendt
2014-12-10fix failed conflict resolutionMarcus Arendt
2014-12-09Prepare releaseErlang/OTP
2014-12-09Merge remote-tracking branch 'upstream/maint' into maintHans Nilsson
2014-12-09ssh: Fix syntax error in .appupHans Nilsson
2014-12-09revert ssh testcaseMarcus Arendt
2014-12-09Merge branch 'dgud/debugger/still-invoked-gs-functions/OTP-12357' into maintDan Gudmundsson
* dgud/debugger/still-invoked-gs-functions/OTP-12357: debugger: Do not use the old removed gs functionality
2014-12-08eldap: Clarifies documentation for start_tls and searchHans Nilsson
2014-12-08ssh: Fix .app and .appupHans Nilsson
2014-12-08Merge branch 'rickard/appup-files/OTP-12358' into maintRickard Green
* rickard/appup-files/OTP-12358: Add .appup file
2014-12-08Add .appup fileRickard Green
2014-12-08Merge branch 'rickard/autoconf/OTP-12348' into maintRickard Green
* rickard/autoconf/OTP-12348: Update megaco.appup.src
2014-12-08Update megaco.appup.srcRickard Green
2014-12-08debugger: Do not use the old removed gs functionalityDan Gudmundsson
dbg_ui_trace module was invoked even though the module had been removed.
2014-12-05Revert "ssh: Corrected ret val from ssh_connection:subsystem/4."Marcus Arendt
This reverts commit d086394ebd3595d431835af80709977a6c1c7c89.
2014-12-03Merge branch 'rickard/autoconf/OTP-12348' into maintRickard Green
* rickard/autoconf/OTP-12348: Distribute autoconf helpers
2014-12-03Merge branch 'raimo/netns-opt-gen_udp/OTP-12314' into maintRaimo Niskanen
* raimo/netns-opt-gen_udp/OTP-12314: Text netns option at socket open Fix handling netns option in gen_udp
2014-12-03ssl: Correct appupIngela Anderton Andin
2014-12-02Distribute autoconf helpersRickard Green
Distribute aclocal.m4, install-sh, config.guess, and config.sub to applications at build time instead of having multiple identical copies committed in the repository.
2014-12-02fix eacces spellingMikael Pettersson
2014-12-02ssh: Add soft upgrade for ptty_allocIngela Anderton Andin
2014-12-02Replaced "Endianess" with "Endianness" everywhereDavid Haguenauer
2014-12-02Merge branch 'egil/fix-dialyzer-map-key-coalescing/OTP-12347' into maintBjörn-Egil Dahlberg
* egil/fix-dialyzer-map-key-coalescing/OTP-12347: dialyzer: Test recoalesced map keys compiler: Coalesce map keys in dialyzer mode
2014-12-02Merge branch 'anders/diameter/17.4_release/OTP-12343' into maintAnders Svensson
* anders/diameter/17.4_release/OTP-12343: vsn -> 1.8 Update appup for 17.4
2014-12-02Merge branch 'siri/ct_netconfc/subsystem-timeout/OTP-12334' into maintHenrik Nord
* siri/ct_netconfc/subsystem-timeout/OTP-12334: [ct_netconfc] Handle timeout failure in ssh
2014-12-02Merge branch 'siri/ct_telnet/unstable-tests/OTP-12329' into maintHenrik Nord
* siri/ct_telnet/unstable-tests/OTP-12329: [ct_telnet] Fix test case 'server_speaks' [ct_telnet] Improve debug printouts and logging [ct_telnet] Add timestamp to telnet_server debug printout [ct_telnet] Extend timeout in test from 1 to 2 sek [ct_telnet] Don't send extra newline after password
2014-12-02Merge branch 'hans/ssh/appup' into maintHans Nilsson
* hans/ssh/appup: ssh: Fixes wrong version in appup file