aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2017-11-15erts: Async auto-connect for monitor_nodeSverker Eriksson
Removed distribution_SUITE:applied_monitor_node as it seems to test apply of trapping BIF and monitor_node does not trap anymore.
2017-11-15erts: Introduce asynchronous auto-connectSverker Eriksson
2017-11-15erts: Refactor connection_id in ErtsDistExternalSverker Eriksson
Break out from 'flags' into new dedicated 'connection_id' just for simplicity. Also changed flags to low bits and that affected enif_binary_to_term.
2017-11-15erts: Make DFLAGS_NEW_FUN_TAGS mandatorySverker Eriksson
and remove ugly encoding fallback as {fun, ...} DFLAGS_NEW_FUN_TAGS has been supported by vm/erl_interface/jinterface since R13 or even older. Renamed test case obsolete_funs to term2bin_tuple_fallbacks and removed test for {fun,...} fallback and added missing test for bitstring fallback {Binary, Bits}.
2017-11-15erts: Refactoring in distribution_SUITESverker Eriksson
for set/get_internal_state calls.
2017-11-15erts: Change to #ifndef from #if !definedSverker Eriksson
2017-11-15erts: Remove some dead codeSverker Eriksson
2017-11-15erts: Remove obsolete code for latin1 in atom cacheSverker Eriksson
Distribution flag DFLAG_UTF8_ATOMS is supported since R16 and mandatory since 20.0.
2017-11-15erts TEST: Add missing ref to DistEntry from send contextSverker Eriksson
2017-11-15erts: Fix bug in DistEntry refc danceSverker Eriksson
to handle "lookup without refc++" correctly which was introduced in 4dcb2ae7810a507b701a30072b2f514cab7ebbdb. When decrementing refc to zero (in try_delete or prepare_try_delete) we must always wait thread progress to make sure no thread has done lookup without refc++ and is just about to do refc++ and thereby revive the DistEntry. That is, we wait for a potential other thread to either do refc++ or drop its pointer to the DistEntry. And if that other thread does refc++ (in erts_ref_dist_entry) it must also do the extra refc++ for the scheduled pending delete.
2017-11-15Merge PR-1605 from sverker/sverker/binary_to_term-used OTP-14780Sverker Eriksson
Add 'used' option for binary_to_term/2
2017-11-15Merge PR-1621 from margnus1/hipe-literal-tagSverker Eriksson
HiPE: Support for literal tag, tests and bugfixes
2017-11-15Merge branch 'maint'Sverker Eriksson
2017-11-15Merge branch 'sverker/test-cuddle' into maintSverker Eriksson
2017-11-13Merge pull request #1624 from bjorng/bjorn/add-beam-internal-docBjörn Gustavsson
Add internal documentation for the beam_makeops script OTP-14626
2017-11-13Document beam_makeopsBjörn Gustavsson
2017-11-13Refuse to load "literals" that can be confused with registersBjörn Gustavsson
The 's' operand overloads the tags for pids and ports to represent X and Y registers, respectively. At load time, refuse to load the module if the "literal" term is not a pid or port, as it would be interpreted as a register. This does not happen with normally compiled code, but it can happen if the compiler (or beam_asm) is abused like in the following example: make_bad() -> Pid = self(), Forms = [{attribute, 0, module, bad_s_operand}, {attribute, 0, export, [{test, 0}]}, {function, 0, test, 0, [{clause, 0, [], [], [{call,0,{atom,0,tuple_size},[{integer, 0, Pid}]}]}]}], {ok, Module, Bin} = compile:forms(Forms, [no_copt,no_postopt,report_errors]), code:load_binary(Module, "bad_s_operand.erl", Bin). With this commit applied, the following message will be printed when make_bad() is run: =ERROR REPORT==== 10-Nov-2017::14:47:59 === Loading of bad_s_operand.erl failed: badfile =ERROR REPORT==== 10-Nov-2017::14:47:59 === beam/beam_load.c(2396): Error loading function bad_s_operand:test/0: op bif1_body: bsd: the term '<0.60.0>' would be confused with a register
2017-11-10Merge branch 'maint'Ingela Anderton Andin
* maint: Updated OTP version Update release notes Update version numbers inets: Prepare for release inets: Add missing guard Avoid WindowBits=8 as per the manual Fix deflateParams on zlib 1.2.11 Ignore empty binaries in enif_inspect_iovec Emasculate writable binaries on entering an iovec Only apply EOS behaviors if there's pending data Conflicts: OTP_VERSION
2017-11-10Merge branch 'maint-20' into maintIngela Anderton Andin
* maint-20: Updated OTP version Update release notes Update version numbers inets: Prepare for release inets: Add missing guard Avoid WindowBits=8 as per the manual Fix deflateParams on zlib 1.2.11 Ignore empty binaries in enif_inspect_iovec Emasculate writable binaries on entering an iovec Only apply EOS behaviors if there's pending data Stop assuming that all schedulers are managed when updating msacc
2017-11-09erts: Fix race in distribution_SUITE:bad_dist_structSverker Eriksson
Symptom: random rpc net_adm:ping returned pang Use monitor_node to wait for failed connection before we try to connect again.
2017-11-09erts: Fix distribution_SUITE:bad_dist_ext_sizeSverker Eriksson
for "+hmqd off_heap"
2017-11-09Update release notesErlang/OTP
2017-11-09Update version numbersErlang/OTP
2017-11-09Merge branch 'john/erts/fix-gunzip-eos/OTP-14730/ERL-507' into maint-20Erlang/OTP
* john/erts/fix-gunzip-eos/OTP-14730/ERL-507: Only apply EOS behaviors if there's pending data
2017-11-09Merge branch 'john/erts/msacc-dirty-schedulers/OTP-14707' into maint-20Erlang/OTP
* john/erts/msacc-dirty-schedulers/OTP-14707: Stop assuming that all schedulers are managed when updating msacc
2017-11-09Merge branch 'john/erts/misc-iovec-issues/OTP-14745/OTP-14750' into maint-20Erlang/OTP
* john/erts/misc-iovec-issues/OTP-14745/OTP-14750: Ignore empty binaries in enif_inspect_iovec Emasculate writable binaries on entering an iovec
2017-11-09Fix deflateParams on zlib 1.2.11John Högberg
1.2.11 started bailing when avail_out==0 regardless of whether there's anything to flush or not, and there's no point in adapting the old method since it was vulnerable to bugs in other zlib versions which updated the deflate parameters even on failure. The api_deflateParams test has been expanded accordingly, and two white-box cases in zip_usage has been updated to make fewer assumptions about the output; the validity of the compressed data is what matters, not whether it's exactly the same as the test vector.
2017-11-07Merge branch 'sverker/systask-reqid-bug/OTP-14752' into maintSverker Eriksson
* sverker/systask-reqid-bug: erts: Fix bug in systask scheduling
2017-11-07Merge branch 'sverker/systask-reqid-bug'Sverker Eriksson
* sverker/systask-reqid-bug: erts: Fix bug in systask scheduling
2017-11-07Merge branch 'sverker/cleanup-hipe_bs_validate_unicode'Sverker Eriksson
* sverker/cleanup-hipe_bs_validate_unicode: erts: Remove obsolete hipe primop bs_validate_unicode
2017-11-07Merge branch 'maint'Sverker Eriksson
2017-11-07Ignore empty binaries in enif_inspect_iovecJohn Högberg
2017-11-07Emasculate writable binaries on entering an iovecJohn Högberg
The lack of this caused serious data corruption when a binary was altered after entering the queue. This went unnoticed because it was never used without erlang:iolist_to_iovec, which always emasculates binaries.
2017-11-07Merge branch 'hasse/erl_docgen/clause_i_anchors/OTP-14321'Hans Bolinder
* hasse/erl_docgen/clause_i_anchors/OTP-14321: erts: Correct a link in erlang(3) erts: Improve some links in erlang(3) erl_docgen: Insert an anchor for "anchor" attribute
2017-11-07Strengthen tests of definition of specific instructionsBjörn Gustavsson
Don't allow defining an specific operation more than once with the exact same operands. Don't allow a specific operation to be defined with different arities.
2017-11-06erts: Remove obsolete hipe primop bs_validate_unicodeSverker Eriksson
which was replaced by 'is_unicode' in 5369e34a892bfd8ab5aa98df330e3bbf19497b71 but kept for ABI compatibility in OTP-20.*.
2017-11-06erts: Fix bug in systask schedulingSverker Eriksson
when request id is an immediate. Ex: erlang:garbage_collect(P, [{async,Immediate}]). may crash the VM.
2017-11-06Remove redundant built-in macro $IS_PACKED()Björn Gustavsson
It can easily be implemented as $OPERAND_POSITION($Operand) == 0.
2017-11-06Warn when $REFRESH_GEN_DEST() is not used after a GCBjörn Gustavsson
It is easy to to forget to use $REFRESH_GEN_DEST() in an instruction that has a general destionation ('d'). Add a heuristic that should catch most if not all such problems.
2017-11-06Consistently use the "erts_gc_" prefix for functions that do GCBjörn Gustavsson
In beam_emu, use "erts_gc_" for any function that does garbage collection, as preparation for adding more sanity checks.
2017-11-06Add the built-in macro $IF() to handle conditionalsBjörn Gustavsson
Add an $IF() macro to conditionally expand macros. Use it like this: $IF(Expression, IfTrue, IfFalse) Expression is a Perl expression that can be evaulated at macro expansion time. If the expression evaluates to 0, the result will be IfFalse, otherwise IfTrue.
2017-11-06Rename the built-in macro ARG_SIZE() to OPERAND_SIZE()Björn Gustavsson
Although the terminology "arguments" is used in the comments for beam_makeops, the documentation in beam_makeops.md consistenly use the term "operand". Since the name of the macro is user-facing, it should be consistent with the documentation.
2017-11-06Clean up definition of built-in macrosBjörn Gustavsson
Make it easier to define new macros.
2017-11-05HiPE: Support literal tagsMagnus Lång
Literal tags are used by the VM as an alternative to reserving a large virtual memory space in order to be able to quickly identify which terms are literals. The use of literal tags harms performance, but is useful to support systems where allocating a large amount of virtual memory is not an option.
2017-11-05HiPE: Make is_divisible a primopMagnus Lång
Since gcunsafe values are live over is_divisible calls (although only the happy path, which never GCd), it should be a primop so there cannot be any GCs.
2017-11-05fix output formatting in hipe_bifs:show_heap/1Mikael Pettersson
When the code switches from printf() to erts_printf() the output becomes garbled. Fixed by fflush()ing stdout first. Fixed formatting of the "H E A P" banner for 64-bit systems.
2017-11-03erts: Fix lock checking in do_call_traceSverker Eriksson
which was lost in merge 3ec66701f91eba6a7a12a813b2283c2e733f62c1
2017-11-03Merge branch 'maint'Sverker Eriksson
2017-11-03Merge PR-1607 from sverker/hipe_bin_utf32_bug OTP-14740Sverker Eriksson
Fix hipe bug in binary <<X/utf32>> construction
2017-11-03Fix bug in hipe for <<X/utf32>>Sverker Eriksson
by introducing new primop 'is_unicode' with no exception (ab)use and no GC. Replaces bs_validate_unicode which is kept for backward compat for now.