summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* erts: Move new hipe ref and sdesc lists to loader stateSverker Eriksson2016-10-1412-90/+115
|
* erts: Use hipe_free_moduleSverker Eriksson2016-10-144-16/+10
|
* erts: Fill freed EXEC memory with illegal instructions on DEBUGSverker Eriksson2016-10-141-1/+9
| | | | | to get a nice SIGILL crash. For x86 and x86_64 only.
* erts: Check hipe stack in check_process_codeMagnus Lång2016-10-145-3/+116
| | | | | | This is part of commit 1bd508921dd93086b05e7d0038b816b36c421d86. I did not include the fun-checking as we have a new purge strategy for funs in OTP 20. That remains to be solved some other way for hipe.
* Add a loader state for HiPE code loadingMagnus Lång2016-10-1414-75/+387
| | | | | | | | | | | | | | | | | | | Just like the BEAM loader state (as returned by erlang:prepare_loading/2), the HiPE loader state is contained in a magic binary. Eventually, we will separate HiPE loading into a prepare and a finalise phase, like the BEAM loader, where the prepare phase will be implemented by hipe_unified_loader and the finalise phase be implemented in C by hipe_load.c and beam_load.c, making prepare side-effect free and finalise atomic. The finalise phase will be exposed through the erlang:finish_loading/1 API, just like the BEAM loader, as this will allow HiPE and BEAM modules to be mixed in the same atomic "commit". The usage of a loader state makes it easier to keep track of all resources allocated during loading, and will not only make it easy to prevent leaks when hipe_unified_loader crashes, but also paves the way for proper, leak-free, unloading of HiPE modules.
* erts: Remove unused hipe_bifs:code_sizeSverker Eriksson2016-10-104-94/+2
| | | | and hipe_bifs:update_code_size
* erts: Improve hipe load/upgrade/purge machinerySverker Eriksson2016-10-1030-734/+1005
| | | | | | | | | | | | | | | | | | | | A step toward better integration of hipe load and purge Highlights: * code_server no longer needs to call hipe_unified_loader:post_beam_load/1 Instead new internal function hipe_redirect_to_module() is called by loading BIFs to patch native call sites if needed. * hipe_purge_module() is called by erts_internal:purge_module/2 to purge any native code. * struct hipe_mfa_info redesigned and only used for exported functions that are called from or implemented by native code. A list of native call sites (struct hipe_ref) are kept for each hipe_mfa_info. * struct hipe_sdesc used by hipe_find_mfa_from_ra() to build native stack traces.
* hipe_unified_loader: Refactor rename all Addresses to FunDefsSverker Eriksson2016-10-101-60/+60
| | | | as they are lists of #fundef records
* erts: Refactor module_start_stagingSverker Eriksson2016-10-101-8/+9
| | | | with a copy_module() function.
* erts: Refactor hipe_sdesc.summary into bit fieldsSverker Eriksson2016-10-106-9/+21
|
* erts: Refactor rename struct hipe_sdescSverker Eriksson2016-10-1010-67/+67
|
* erts: Refactor rename structs hipe_mfa and hipe_refSverker Eriksson2016-10-101-22/+22
|
* Merge branch 'maint'Björn Gustavsson2016-10-072-10/+44
|\ | | | | | | | | * maint: beam_bsm: Eliminate unsafe optimization
| * Merge branch 'bjorn/compiler/beam_bsm/ERL-268/OTP-13947' into maintBjörn Gustavsson2016-10-072-11/+46
| |\ | | | | | | | | | | | | * bjorn/compiler/beam_bsm/ERL-268/OTP-13947: beam_bsm: Eliminate unsafe optimization
| | * beam_bsm: Eliminate unsafe optimizationBjörn Gustavsson2016-10-062-11/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge branch 'maint'Ingela Anderton Andin2016-10-071-2/+5
|\ \ \ | |/ /
| * | Merge branch 'ingela/inets/httpc/ERL-253' into maintIngela Anderton Andin2016-10-071-2/+5
| |\ \ | | | | | | | | | | | | | | | | * ingela/inets/httpc/ERL-253: inets: httpc improve error handling
| | * | inets: httpc improve error handlingIngela Anderton Andin2016-09-191-2/+5
| | | | | | | | | | | | | | | | Handler process should exit normal if manager process has been terminated
* | | | Merge branch 'maint'Ingela Anderton Andin2016-10-076-98/+58
|\ \ \ \ | |/ / /
| * | | Merge branch 'kostis/inets-reference-record-types/PR-1188' into maintIngela Anderton Andin2016-10-076-98/+58
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * kostis/inets-reference-record-types/PR-1188: Replace ref() with reference() in inets files
| | * | | Replace ref() with reference() in inets filesKostis Sagonas2016-10-046-98/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge branch 'maint'Ingela Anderton Andin2016-10-072-3/+3
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch 'ingela/ssl/cipher-type-spec' into maintIngela Anderton Andin2016-10-072-3/+3
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * ingela/ssl/cipher-type-spec: ssl: Adjust cipher type to conform to implementation
| | * | | | ssl: Adjust cipher type to conform to implementationIngela Anderton Andin2016-10-052-3/+3
| | | | | |
* | | | | | Merge branch 'maint'Dan Gudmundsson2016-10-0788-394/+587
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: New file erlang-edoc.el to support EDoc in erlang-mode Allow reusing mnesia select continuations Fix guard test for chardata
| * | | | | Merge branch 'dgud/wx/fix-unicode-chardata/ERL-270/OTP-13934' into maintDan Gudmundsson2016-10-0782-391/+393
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dgud/wx/fix-unicode-chardata/ERL-270/OTP-13934: Fix guard test for chardata
| | * | | | | Fix guard test for chardataDan Gudmundsson2016-10-0582-391/+393
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously only accepted lists tough a call is made to unicode:characters_to_binary/1, and the functions where specified to handle chardata.
| * | | | | | Merge branch 'dgud/mnesia/dirty_select_cont/PR-1184/OTP-13944' into maintDan Gudmundsson2016-10-072-3/+15
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dgud/mnesia/dirty_select_cont/PR-1184/OTP-13944: Allow reusing mnesia select continuations
| | * | | | | | Allow reusing mnesia select continuationsDániel Szoboszlay2016-10-062-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | Merge branch 'dgud/tools/emacs/edoc-support/PR-1195/OTP-13945' into maintDan Gudmundsson2016-10-074-0/+179
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dgud/tools/emacs/edoc-support/PR-1195/OTP-13945: New file erlang-edoc.el to support EDoc in erlang-mode
| | * | | | | | | New file erlang-edoc.el to support EDoc in erlang-modeLeo Liu2016-10-064-0/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - EDoc markup font-locking and tag completion - EDoc comment indentation
* | | | | | | | | Merge branch 'maint'Hans Bolinder2016-10-071-6/+9
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Update per review comments. Fix reference to automatic `undefined` field declared types.
| * | | | | | | | Merge branch 'rohrer/doc/undefined_fields/PR-1189' into maintHans Bolinder2016-10-071-6/+9
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rohrer/doc/undefined_fields/PR-1189: Update per review comments. Fix reference to automatic `undefined` field declared types.
| | * | | | | | | | Update per review comments.Doug Rohrer2016-10-051-3/+3
| | | | | | | | | |
| | * | | | | | | | Fix reference to automatic `undefined` field declared types.Doug Rohrer2016-10-041-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | | | Merge branch 'maint'Ingela Anderton Andin2016-10-064-1/+29
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: OTP_VERSION
| * | | | | | | | | Merge branch 'maint-19' into maintIngela Anderton Andin2016-10-065-2/+30
| |\ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|_|/ | |/| | | | | | | |
| | * | | | | | | | Updated OTP versionOTP-19.1.2Erlang/OTP2016-10-062-1/+2
| | | | | | | | | |
| | * | | | | | | | Update release notesErlang/OTP2016-10-061-0/+18
| | | | | | | | | |
| | * | | | | | | | Merge branch 'ingela/ssh/channel_exit_handling/OTP-13932' into maint-19Erlang/OTP2016-10-063-2/+11
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ingela/ssh/channel_exit_handling/OTP-13932: ssh: Prepare release ssh: Handle gen_server:call/3 exits properly
| | | * | | | | | | | ssh: Prepare releaseIngela Anderton Andin2016-10-052-1/+5
| | | | | | | | | | |
| | | * | | | | | | | ssh: Handle gen_server:call/3 exits properlyIngela Anderton Andin2016-10-051-1/+6
| | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | | | Merge branch 'maint'Hans Bolinder2016-10-053-13/+68
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: parsetools: Correct counting of newlines
| * | | | | | | | | Merge branch 'hasse/parsetools/fix_leex_counting/ERL-263/OTP-13916' into maintHans Bolinder2016-10-053-13/+68
| |\ \ \ \ \ \ \ \ \ | | |_|_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | * hasse/parsetools/fix_leex_counting/ERL-263/OTP-13916: parsetools: Correct counting of newlines
| | * | | | | | | | parsetools: Correct counting of newlinesHans Bolinder2016-09-293-13/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | | | Merge branch 'maint'Dan Gudmundsson2016-10-0590-11891/+12242
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: wx: add wxWindowDragAcceptFiles wx: Add simple dropfiles support
| * | | | | | | | | Merge branch 'dgud/wx/drop-files/OTP-13933' into maintDan Gudmundsson2016-10-0590-11891/+12242
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dgud/wx/drop-files/OTP-13933: wx: add wxWindowDragAcceptFiles wx: Add simple dropfiles support
| | * | | | | | | | | wx: add wxWindowDragAcceptFilesDan Gudmundsson2016-09-2983-11675/+11870
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable window to handle drop file events.
| | * | | | | | | | | wx: Add simple dropfiles supportDan Gudmundsson2016-09-2812-226/+382
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added wxDropFiles event
* | | | | | | | | | | Merge branch 'maint'Björn Gustavsson2016-10-0523-25/+33
|\ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Update primary bootstrap beam_block: Avoid unsafe inclusion of get_map_elements in blocks