aboutsummaryrefslogtreecommitdiffstats
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 'essen/irregardless' into maintMarcus Arendt
* essen/irregardless: Fix "irregardless" -> "regardless"
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
2015-01-08Fix "irregardless" -> "regardless"Loïc Hoguin
2015-01-07Merge branch 'tombenner/doc_fixes' into maintMarcus Arendt
* tombenner/doc_fixes: Fix grammar and formatting issues Fix typo ("to use to use") Add a comma after "For example" when appropriate Use colons before <code> when appropriate Move periods inside parenthetical sentences Add an apostrophe to contractions of "let us"
2015-01-07Merge branch 'derek121/mnesia-doc-fixes' into maintMarcus Arendt
* derek121/mnesia-doc-fixes: Fix grammar
2014-12-28Fix grammar and formatting issuesTom Benner
2014-12-28Fix typo ("to use to use")Tom Benner
2014-12-28Add a comma after "For example" when appropriateTom Benner
2014-12-28Use colons before <code> when appropriateTom Benner
2014-12-28Move periods inside parenthetical sentencesTom Benner
2014-12-27Add an apostrophe to contractions of "let us"Tom Benner
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-17Merge branch 'ia/ssh/ssh-connection-protocol-timeout/OTP-12004' into maintIngela Anderton Andin
* ia/ssh/ssh-connection-protocol-timeout/OTP-12004: ssh: Improve errorhandling in ssh_connection.erl
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-12Merge branch 'marcus/fix-eldap-notes' into maintMarcus Arendt
* marcus/fix-eldap-notes: add missing release notes
2014-12-12add missing release notesMarcus Arendt
2014-12-10Merge branch 'rickard/atomic64/OTP-12351' into maintRickard Green
* rickard/atomic64/OTP-12351: Use the new 64-bit atomic ops API Introduce a 64-bit atomic ops API
2014-12-10Use the new 64-bit atomic ops APIRickard Green
2014-12-10Introduce a 64-bit atomic ops APIRickard Green
The 64-bit atomic ops API is implemented by * native word size atomic ops on 64-bit architectures, and * native double word size atomic ops on 32-bit architectures when available. When native double word size atomic is not available, the fallback using modification counters is used.
2014-12-10fix failed conflict resolutionMarcus Arendt
2014-12-09Updated OTP versionOTP-17.4Erlang/OTP
2014-12-09Prepare releaseErlang/OTP
2014-12-09Update preloaded modulesMarcus Arendt
2014-12-09Update primary bootstrapMarcus Arendt
2014-12-09Merge remote-tracking branch 'upstream/maint' into maintHans Nilsson
2014-12-09Merge branch 'hans/ssh/fix_app_appup' into maintHans Nilsson
* hans/ssh/fix_app_appup: ssh: Fix syntax error in .appup
2014-12-09ssh: Fix syntax error in .appupHans Nilsson
2014-12-09Merge branch 'marcus/revert-ssh-testcase/OTP-12004' into maintMarcus Arendt
* marcus/revert-ssh-testcase/OTP-12004: revert ssh testcase
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