aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-10-06Allow reusing mnesia select continuationsDániel Szoboszlay
A continuation returned by mnesia:select/[14] should be reusable in different, non-transactional activities. Aborting with wrong_transaction doesn't make sense in a dirty context.
2016-10-06beam_bsm: Eliminate unsafe optimizationBjörn Gustavsson
The following code causes a compiler failure: first_after(Data, Offset) -> case byte_size(Data) > Offset of false -> {First, Rest} = {ok, ok}, ok; true -> <<_:Offset/binary, Rest/binary>> = Data, %% 'Rest' saved in y(0) before the call. {First, _} = match_first(Data, Rest), %% When beam_bsm sees the code, the following line %% which uses y(0) has been optimized away. {First, Rest} = {First, Rest}, First end. match_first(_, <<First:1/binary, Rest/binary>>) -> {First, Rest}. Here is the error message from beam_validator: t: function first_after/2+15: Internal consistency check failed - please report this bug. Instruction: {call,2,{f,7}} Error: {multiple_match_contexts,[{x,1},0]}: Basically, what happens is that at time of code generation, the variable 'Rest' is needed after the call to match_first/2 and is therefore saved in y(0). When beam_bsm (a late optimization pass) sees the code, the use of y(0) following the call to match_first/2 has been optimized away. beam_bsm therefore assumes that the delayed sub-binary creation is safe. (Actually, it is safe, but beam_validator does not realize it.) The bug was caused by two separate commits: e199e2471a reduced the number of special cases to handle in BEAM optimization passed by breaking apart the tail-recursive call instructions (call_only and call_last) into separate instructions. Unfortunately, the special handling for tail calls was lost, which resulted in worse code (i.e. the delayed sub-binary creation optimization could not be applied). e1aa422290 tried to compensate, but did so in a way that was not always safe. Teaching beam_validator that this kind of code is safe would be expensive. Instead, we will undo the damage caused by the two commits. Re-introduce the special handling of tail-recursive calls in beam_bsm that was lost in the first commit. (Effectively) revert the change in the second commit. ERL-268
2016-10-05Update per review comments.Doug Rohrer
2016-10-05Fix guard test for chardataDan Gudmundsson
Previously only accepted lists tough a call is made to unicode:characters_to_binary/1, and the functions where specified to handle chardata.
2016-10-05Merge branch 'hasse/parsetools/fix_leex_counting/ERL-263/OTP-13916' into maintHans Bolinder
* hasse/parsetools/fix_leex_counting/ERL-263/OTP-13916: parsetools: Correct counting of newlines
2016-10-05Merge branch 'dgud/wx/drop-files/OTP-13933' into maintDan Gudmundsson
* dgud/wx/drop-files/OTP-13933: wx: add wxWindowDragAcceptFiles wx: Add simple dropfiles support
2016-10-05ssh: Prepare releaseIngela Anderton Andin
2016-10-05ssh: Handle gen_server:call/3 exits properlyIngela Anderton Andin
Handle all possible exit values that should be interpreted as {error, closed}. Failing to do so could lead to unexpected crashes for users of the ssh application.
2016-10-05crypto: Return source line number from failed load/upgradeSverker Eriksson
Renamed the init function as the return semantics are changed.
2016-10-05Update primary bootstrapBjörn Gustavsson
2016-10-05Merge branch 'bjorn/compiler/beam_block/ERL-266/OTP-13931' into maintBjörn Gustavsson
* bjorn/compiler/beam_block/ERL-266/OTP-13931: beam_block: Avoid unsafe inclusion of get_map_elements in blocks
2016-10-05beam_block: Avoid unsafe inclusion of get_map_elements in blocksBjörn Gustavsson
c2035ebb8b restricted the get_map_elements instruction so that it could only occur at the beginning of a block. It turns out that including it anywhere in a block is unsafe. Therefore, never put get_map_elements instruction in blocks. (Also remove the beam_utils:join_even/2 function since it is no longer used.) ERL-266
2016-10-05Merge branch 'dgud/emacs/do-not-require-final-newline/PR-1130' into maintDan Gudmundsson
* dgud/emacs/do-not-require-final-newline/PR-1130: erlang-mode: do not configure require-final-newline
2016-10-05ssl: Adjust cipher type to conform to implementationIngela Anderton Andin
2016-10-05Merge branch 'cypherfox/edoc/add_doc/PR-1175' into maintHans Bolinder
* cypherfox/edoc/add_doc/PR-1175: add info for param and returns tags
2016-10-05Merge branch 'hizel/howto/win32-include-path-fix/PR-1187' into maintLukas Larsson
* hizel/howto/win32-include-path-fix/PR-1187: Fix build environment script in HOWTO INSTALL-WIN32
2016-10-04Fix reference to automatic `undefined` field declared types.Doug Rohrer
In 8ce35b287fb50a6845fccf6a13c672aae303dc91 automatic insertion of `undefined` for record fields without initializers was removed, but this was not noted in the documentation. Add a warning about this change using similar verbiage as the original docs.
2016-10-04Replace ref() with reference() in inets filesKostis Sagonas
This supersedes PR #1185 (submitted by @KrzysiekJ) that changed all occurrences of ref() with reference() in inets files. However, there is little point in having these types only in comments. So, these types are now exposed as type declarations for the record fields they appear. While at it, uncommented more commented out type declarations and declared types for records defined in the affected modules and header files. Some type-unfriendly and obsolete code related to supporting code ungrades with a really old OTP release was also removed.
2016-10-04Improve docs and typesRaimo Niskanen
2016-10-04erts: Print error code from failed NIF load/upgrade/reloadSverker Eriksson
in Text part of error tuple, like {error, {load, "Library load-call unsuccessful (606)}}
2016-10-04Merge branch 'RoadRunnr/crypto/no-rc4/PR-1169/OTP-13896' into maintRaimo Niskanen
* RoadRunnr/crypto/no-rc4/PR-1169/OTP-13896: disable RC4 in SSL when crypto doesn't support it Fix compilation when OpenSSL doesn't support RC4 Conflicts: lib/crypto/c_src/crypto.c
2016-10-04Merge branch 'legoscia/crypto/no-rc2/PR-1163/OTP-13895' into maintRaimo Niskanen
* legoscia/crypto/no-rc2/PR-1163/OTP-13895: Fix compilation when OpenSSL doesn't support RC2
2016-10-04Merge branch 'ingela/ssl/tests/ssl_packet_0_or_raw' into maintIngela Anderton Andin
* ingela/ssl/tests/ssl_packet_0_or_raw: ssl: Correct tests tcp stream handling
2016-10-04ssl: Correct tests tcp stream handlingIngela Anderton Andin
Data collection function active_once_raw/4 did not handle streamed data correctly (it assumed the stream was "packet oriented"), which could result in that the test case perceived that it did not receive all data even though it did.
2016-10-04Fix build environment script in HOWTO INSTALL-WIN32Ildar Khizbulin
2016-10-04erts: Do tracer liveness check on current tracerLukas Larsson
This fixes a fault introduced in 19.0 where an invalid tracer would block setting of a new tracer on a process.
2016-10-04add info for param and returns tagsLutz Behnke
2016-10-03Merge branch 'lukas/erts/bin_to_term_doc_example/PR-1181' into maintLukas Larsson
* lukas/erts/bin_to_term_doc_example/PR-1181: erts: Add examples to binary_to_term and term_to_binary
2016-10-03Merge branch 'ingela/ssl/anonymous/OTP-13926' into maintIngela Anderton Andin
* ingela/ssl/anonymous/OTP-13926: ssl: Correct anonymous suite handling
2016-10-03Merge branch 'lukas/erts/fix_errno_name/OTP-13927' into maintLukas Larsson
* lukas/erts/fix_errno_name/OTP-13927: erts: Rename __errno in order to avoid conflict on openbsd
2016-09-30ssl: Correct anonymous suite handlingIngela Anderton Andin
Test suite did not take TLS-version in to account. Also some anonymous suites where included incorrectly in some TLS versions.
2016-09-30Change state entry events into state enter callsRaimo Niskanen
2016-09-29Merge branch 'rickard/macosx-config-mess/OTP-13904' into maintRickard Green
* rickard/macosx-config-mess/OTP-13904: Try to handle not yet available functionality in MacOSX SDK Check deployment target in configure on MacOSX Fix posix_memalign configure test
2016-09-29Merge branch 'maint-19' into maintIngela Anderton Andin
2016-09-29Merge branch 'siri/doc-add_pathsa-order/ERL-267/OTP-13920' into maintSiri Hansen
* siri/doc-add_pathsa-order/ERL-267/OTP-13920: Document the order of directories added with code:add_pathsa/1
2016-09-29wx: add wxWindowDragAcceptFilesDan Gudmundsson
Enable window to handle drop file events.
2016-09-29parsetools: Correct counting of newlinesHans Bolinder
See https://bugs.erlang.org/browse/ERL-263 The fix in commit c9bc5c94 of PR-431 (https://github.com/erlang/otp/pull/431) introduced new problems.
2016-09-29Merge branch 'hasse/parsetools/fix_leex_unicode/OTP-13919' into maintHans Bolinder
* hasse/parsetools/fix_leex_unicode/OTP-13919: parsetools: Correct handling of Unicode in Leex
2016-09-28Document the order of directories added with code:add_pathsa/1Siri Hansen
code:add_pathsa/1 reverts the list of directories when adding it at the beginning of the code path. The command line option '-pa' behaves in the same way. This is now documented.
2016-09-28Try to handle not yet available functionality in MacOSX SDKRickard Green
2016-09-28Merge branch ↵Siri Hansen
'legoscia/dynamic-child-shutdown-tuple/ERL-163/PR-1158/OTP-13907' into maint * legoscia/dynamic-child-shutdown-tuple/ERL-163/PR-1158/OTP-13907: Don't report error for shutdown exit tuple
2016-09-28wx: Add simple dropfiles supportDan Gudmundsson
Added wxDropFiles event
2016-09-28Merge branch 'hans/ssh/update_vsn.mk' into maintHans Nilsson
2016-09-28ssh: Update vsn.mkHans Nilsson
2016-09-28Merge branch 'isvilen/ssh_REPL_exit_status/PR-1173/OTP-13905' into maintHans Nilsson
2016-09-28Merge branch 'lucafavatella/erts/fix-typo-fp/PR-1177' into maintBjörn-Egil Dahlberg
* lucafavatella/erts/fix-typo-fp/PR-1177: Fix typo in configuration description
2016-09-28Merge remote-tracking branch 'github/pr/1183' into maintIngela Anderton Andin
* github/pr/1183: Fix typos in public_key_app.xml
2016-09-28Merge branch 'ahmedshafeeq/inets-httpc-RFC-7231/PR-1172/OTP-13902' into maintIngela Anderton Andin
* ahmedshafeeq/inets-httpc-RFC-7231/PR-1172/OTP-13902: Update test case docs with RFC-7231 Update behavior of httpc:request to match RFC-7231
2016-09-28Updated OTP versionOTP-19.1.1Erlang/OTP
2016-09-28Update release notesErlang/OTP