aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-11-20Fix max atom size overflow on 64-bits Erlang by lowering theBoshan Sun
MAX_ATOM_TABLE_SIZE Currently, the max atom size on 64-bits Erlang is ((UWORD_CONSTANT(1) << 32) = 4294967296 This number will cause the range of atom size to be displayed as [8192-0]. Also, the +t option for max atom size will be parsed as a long type, and assigned to a int variable erts_atom_table_size (erl_init.c), which will cause integer overflow if the number is larger than the maximum value a 4-bytes signed integer can hold ((1 << 31) - 1) = 2147483647 Therefore, during the comparison erts_atom_table_size < MIN_ATOM_TABLE_SIZE any number above 2147483647 will be come negative, and causing the condition to be true, which then errored out as bad atom table size. Hence, the actual max atom size is same as the max signed int value.
2017-11-20Fix integer overflow when set a large maximum value for atom tableBoshan Sun
When setting maximum atom table size using +t option, there will be a integer overflow for a large size. $ erl +t2147482625 ll_alloc: Cannot allocate 18446744073692774400 bytes of memory (of type "atom_tab"). The overflow is caused by the arithmetic operations on int type. When 2147482625 + 1024 it will become -2147483647 due to the signed integerger overflow. Then the result will be resized to Uint type, which is a unsigned long type, the negative int will first be expand to 64 bits long via sign extension, then change to unsigned type, which becomes 18446744073692774400. The fix is done by convert `limit` to Uint type before doing any arithmetic operation. This will expand variable to 64 bits long type via zero extension, then the following operation are all positive, therefore no overflow will happen. Note: here we assume the int `limit` passed in is always positive. If some future change cause the `limit` passed in maybe negative, then the current fix will also cause overflow.
2017-11-16Merge branch 'maint' of github.com:erlang/otp into maintHans Nilsson
2017-11-16Merge branch 'maint-18' into maintHans Nilsson
* maint-18: Updated OTP version Prepare release ssh: Unicode encoding fix ssh: testcases for space trailing Hello msg Remove unused test include file from test suites eldap: Repair Makefile ssh: Don't remove trailing WS in Hello msg Conflicts: OTP_VERSION erts/doc/src/notes.xml erts/vsn.mk lib/compiler/doc/src/notes.xml lib/compiler/vsn.mk lib/crypto/test/blowfish_SUITE.erl lib/eldap/doc/src/notes.xml lib/eldap/vsn.mk lib/inets/test/httpd_load.erl lib/inets/test/httpd_mod.erl lib/inets/test/old_httpd_SUITE.erl lib/ssh/doc/src/notes.xml lib/ssh/vsn.mk lib/stdlib/test/zip_SUITE.erl otp_versions.table
2017-11-16Merge branch 'rickard/node-mon-proc-exit-race/maint-20/OTP-14781' into maintRickard Green
* rickard/node-mon-proc-exit-race/maint-20/OTP-14781: Fix triggering of node monitors
2017-11-16Fix triggering of node monitorsRickard Green
2017-11-16Merge branch 'rickard/node-mon-proc-exit-race/OTP-14781' into maintRickard Green
* rickard/node-mon-proc-exit-race/OTP-14781: Fix triggering of node monitors
2017-11-16Merge branch 'ingela/ssl/code-enhance' into maintIngela Anderton Andin
* ingela/ssl/code-enhance: ssl: Align code of TLS/DTLS handshake handling ssl: Align code of TLS/DTLS record handling ssl: Align code of main modules implementing the gen_statem behaviour dtls: Add state spec
2017-11-16ssl: Align code of TLS/DTLS handshake handlingIngela Anderton Andin
2017-11-16ssl: Align code of TLS/DTLS record handlingIngela Anderton Andin
2017-11-16ssl: Align code of main modules implementing the gen_statem behaviourIngela Anderton Andin
2017-11-16dtls: Add state specIngela Anderton Andin
2017-11-15Fix triggering of node monitorsRickard Green
2017-11-15Merge branch 'hasse/edoc/fix_map_type/OTP-14777' into maintHans Bolinder
* hasse/edoc/fix_map_type/OTP-14777: edoc: The map type is denoted map()
2017-11-15Updated OTP versionOTP-18.3.4.6Erlang/OTP
2017-11-15Prepare releaseErlang/OTP
2017-11-15Merge branch 'hans/ssh/dont_remove_trailing_ws_18/OTP-14763' into maint-18Erlang/OTP
* hans/ssh/dont_remove_trailing_ws_18/OTP-14763: ssh: Unicode encoding fix ssh: testcases for space trailing Hello msg ssh: Don't remove trailing WS in Hello msg
2017-11-15Merge branch 'hans/fix_build_env/OTP-14765' into maint-18Erlang/OTP
* hans/fix_build_env/OTP-14765: Remove unused test include file from test suites eldap: Repair Makefile
2017-11-15Merge branch 'rickard/timer-sid-bug/OTP-14548' into maint-18Erlang/OTP
* rickard/timer-sid-bug/OTP-14548: Fix scheduler id field in timers
2017-11-15Merge branch ↵Erlang/OTP
'john/compiler/fail-labels-in-blocks-otp-18/ERIERL-48/OTP-14522' into maint-18 * john/compiler/fail-labels-in-blocks-otp-18/ERIERL-48/OTP-14522: compiler: Fix live regs update on allocate in validator Take fail labels into account when determining liveness in block ops
2017-11-15Merge branch 'sverker/r16/binary_to_atom-utf8-crash/ERL-474/OTP-14590' into ↵Erlang/OTP
maint-18 * sverker/r16/binary_to_atom-utf8-crash/ERL-474/OTP-14590: erts: Fix crash in binary_to_atom/term for invalid utf8
2017-11-15Merge branch 'sverker/big-bxor-bug/ERL-450/OTP-14514' into maint-18Erlang/OTP
* sverker/big-bxor-bug/ERL-450/OTP-14514: erts: Fix bug in bxor of a big negative number
2017-11-15Merge branch 'sverker/prealloc-race-bug/OTP-14491' into maint-18Erlang/OTP
* sverker/prealloc-race-bug/OTP-14491: erts: Fix bug in quick alloc
2017-11-15ssh: Unicode encoding fixHans Nilsson
Conflicts: lib/ssh/src/ssh_connection_handler.erl
2017-11-15Merge branch 'sverker/test-cuddle' into maintSverker Eriksson
2017-11-14edoc: The map type is denoted map()Hans Bolinder
The map type was erroneously displayed as "#{}", the empty map type.
2017-11-14Merge branch 'hasse/dialyzer/fix_crash_msg/OTP-14742' into maintHans Bolinder
* hasse/dialyzer/fix_crash_msg/OTP-14742: dialyzer: Display error messages without call stack
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 'ingela/ssl/doc-link-fix' into maintIngela Anderton Andin
* ingela/ssl/doc-link-fix: ssl: Fix broken link in doc
2017-11-13ssl: Fix broken link in docIngela Anderton Andin
2017-11-10dialyzer: Display error messages without call stackHans Bolinder
As of commit 12b379 many of the reasons displayed after "Analysis failed with error:" erroneously include a call stack. The bug is now corrected. The bug was pointed out in http://erlang.org/pipermail/erlang-questions/2017-October/093838.html.
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 'ingela/snmp/cuddle' into maintIngela Anderton Andin
* ingela/snmp/cuddle: snmp: Correct netsnmp arglist and check for usable netsnmp
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-10ssh: testcases for space trailing Hello msgHans 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 '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