aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-11-14Fix broken receive optimizationBjörn Gustavsson
When a ref is created before performing a receive that will only receive message containing that ref, there is a compiler optimization to avoid scanning messages that can't possible contain the newly created ref. Magnus Lång pointed out that the implementation of the optimization is flawed. Exceptions or recursive calls could cause the receive operation to scan the receive queue from a position beyond the expected message (that is, the message containing the ref would never be matched out). See the receive_opt_exception/1 and receive_opt_recursion/1 test cases in receive_SUITE. It turns out that we can simplify the implementation of the optimization while fixing the bug (suggested by Magnus Lång). We actually don't need the c_p->msg.mark field. It is enough to have c_p->msg.saved_pos; if it is non-zero, it is a valid position in the message qeueue. All we need to do is to ensure that we clear c_p->msg.saved_pos when a receive is exited normally or abnormally. We can clear c_p->msg.saved_pos in JOIN_MESSAGE(), since it is called both when leaving a receive because a message matched and because there was a timeout and the 'after' clause was executed. In addition, we need to clear c_p->msg.saved_pos when an exception is caught. https://bugs.erlang.org/browse/ERL-511
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-13Update primary bootstrapBjörn Gustavsson
2017-11-13Merge branch 'maint'Björn Gustavsson
* maint: Recognize 'deterministic' when given in a -compile() attribute Conflicts: lib/compiler/src/beam_asm.erl
2017-11-13Merge branch 'bjorn/compiler/fix-deterministic-attribute/ERL-498' into maintBjörn Gustavsson
* bjorn/compiler/fix-deterministic-attribute/ERL-498: Recognize 'deterministic' when given in a -compile() attribute OTP-14773
2017-11-13Merge branch 'maint'Ingela Anderton Andin
2017-11-13Merge branch 'ingela/ssl/doc-link-fix' into maintIngela Anderton Andin
* ingela/ssl/doc-link-fix: ssl: Fix broken link in doc
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-13ssl: Fix broken link in docIngela Anderton Andin
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-10Merge branch 'bjorn/cuddle-with-tests'Björn Gustavsson
* bjorn/cuddle-with-tests: Skip compile_SUITE:pre_load_check/1 when code is native-compiled
2017-11-10Merge branch 'maint'Ingela Anderton Andin
2017-11-10Merge branch 'ingela/snmp/cuddle' into maintIngela Anderton Andin
* ingela/snmp/cuddle: snmp: Correct netsnmp arglist and check for usable netsnmp
2017-11-10Merge branch 'maint'Ingela Anderton Andin
2017-11-10Merge branch 'ingela/ssl/engine-API/OTP-14448' into maintIngela Anderton Andin
* ingela/ssl/engine-API/OTP-14448: ssl: Add private key configuration for crypto engine
2017-11-10Merge branch 'maint'Hans Nilsson
2017-11-10Merge branch 'hans/ssh/hostkey_in_engine/OTP-14757' into maintHans Nilsson
2017-11-10ssh: Document engine_key_ref() returned from ssh_server_key:host_key/2Hans Nilsson
2017-11-10ssh: Update ssh_{server|client}_key doc to what it should have beenHans Nilsson
2017-11-10ssh: New test suite for engine-stored keysHans Nilsson
2017-11-10ssh: Update SSH for engine-stored host keysHans Nilsson
2017-11-10crypto: Doc privkey_to_pubkey/2Hans Nilsson
2017-11-10crypto: Extend engine_SUITE with tests of the pub key extraction from priv keysHans Nilsson
2017-11-10crypto: Add privkey_to_pubkey/2 to get the public key from a priv key in an ↵Hans Nilsson
Engine Only RSA and DSA so far.
2017-11-10Merge branch 'maint'Hans Nilsson
2017-11-10Merge branch 'hans/crypto/engine_pkey_load/OTP-14448' into maintHans Nilsson
2017-11-10crypto: Remove unused 'atom_bad_engine'Hans Nilsson
2017-11-10crypto: Remove 'relasenotes.xml' from doc/src/MakefileHans Nilsson
2017-11-10crypto: Extend engine_SUITE with tests of the pub/priv key fetchesHans Nilsson
2017-11-10crypto: Update the OTP test engine with pub/priv key storageHans Nilsson
2017-11-10crypto: Documentation for pkey engine loadingHans Nilsson
2017-11-10crypto: Define and export some types for engineHans Nilsson
2017-11-10crypto: Enable using pub/priv PKCS8 keys stored in an EngineHans Nilsson
2017-11-10Merge branch 'maint'Lars Thorsen
2017-11-10Merge branch 'lars/crypto/load-engine/OTP-14567' into maintLars Thorsen
* lars/crypto/load-engine/OTP-14567: [crypto] Add support for loading an alternative Engine
2017-11-10[crypto] Add support for loading an alternative EngineLars Thorsen
Add support to plug in alternative implementations for some or all of the cryptographic operations supported by the OpenSSL Engine API. When configured appropriately, OpenSSL calls the engine's implementation of these operations instead of its own.
2017-11-10Recognize 'deterministic' when given in a -compile() attributeBjörn Gustavsson
The compiler option 'deterministic' was only recognized when given as an option to the compiler, not when it was specified in a -compile() attribute in the source file. https://bugs.erlang.org/browse/ERL-498
2017-11-09Merge branch 'maint'Sverker Eriksson
2017-11-09Merge PR-1618 from sverker/sverker/hipe-doc-limitations OTP-14767Sverker Eriksson
Document HiPE limitations
2017-11-09Updated OTP versionOTP-20.1.5Erlang/OTP
2017-11-09Update release notesErlang/OTP
2017-11-09Update version numbersErlang/OTP
2017-11-09Merge branch 'ingela/inets/fix-location/OTP-14761' into maint-20Erlang/OTP
* ingela/inets/fix-location/OTP-14761: inets: Prepare for release inets: Add missing guard
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-09Merge branch 'john/erts/zlib-1.2.11-fixes/OTP-14751' into maint-20Erlang/OTP
* john/erts/zlib-1.2.11-fixes/OTP-14751: Avoid WindowBits=8 as per the manual Fix deflateParams on zlib 1.2.11
2017-11-09snmp: Correct netsnmp arglist and check for usable netsnmpIngela Anderton Andin