aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
AgeCommit message (Collapse)Author
2018-02-13Merge branch 'maint-20' into maintSverker Eriksson
* maint-20: Updated OTP version Update release notes Update version numbers erts: Add system_flags(erts_alloc,"+M?sbct *") erts: Add age order first fit allocator strategies erts: Refactor erl_ao_firstfit_alloc erts: Add migration options "acnl" and "acfml" kernel: Add os:cmd/2 with max_size option erts: Add more stats for mbcs_pool erts: Fix alloc_SUITE:migration stdlib: Make ets_SUITE memory check try again erts: Improve carrier pool search erts: Improve alloc_SUITE:migration erts: Refactor carrier dealloc migration
2018-02-12Merge 'sverker/maint-19/alloc-n-migration/ERIERL-88'Sverker Eriksson
into 'sverker/maint-20/alloc-n-migration/ERIERL-88' OTP-14915 OTP-14916 OTP-14917 OTP-14918
2018-02-12Merge 'sverker/carrier-migration-improvements'Sverker Eriksson
into 'sverker/maint-19/alloc-n-migration/ERIERL-88'
2018-02-12erts: Add system_flags(erts_alloc,"+M?sbct *")Sverker Eriksson
to change sbct limit in runtime for chosen allocator type. With great power comes great responsibility.
2018-02-12erts: Add age order first fit allocator strategiesSverker Eriksson
ageffcaoff: Age First Fit Carrier, Address Order First Fit (within carrier) ageffcbf : Age First Fit Carrier, Best Fit (within carrier) ageffcaobf: Age First Fit Carrier, Address Order Best Fit (within carrier) Prefer old carriers, the older the better.
2018-02-08erts: Refactor erl_ao_firstfit_allocSverker Eriksson
In preparation for carrier age order. Change 'flavor' to 'blk_order' and 'crr_order'.
2018-02-08erts: Add migration options "acnl" and "acfml"Sverker Eriksson
acnl: Abandon Carrier Nr Limit acfml: Abandon Carrier Free block Min Limit
2018-01-24Merge branch 'sverker/hipe-load-fixing/OTP-14891' into maintSverker Eriksson
2018-01-17Fix slow hipe executionSverker Eriksson
particularly slow erlc when compiler is hipe compiled. hipe_unified_loader:load did not patch external call sites and instead caused a double hipe mode switch per call. hipe_unified_loader:load is only used for early modules first loaded as beam and by code:atomic_load and friends.
2018-01-17Merge branch 'fhunleth/binary_to_integer_chec/PR-1671/OTP-14879' into maintLukas Larsson
* fhunleth/binary_to_integer_chec/PR-1671/OTP-14879: Fail if ':' is passed to binary_to_integer/2
2018-01-15Merge branch 'sverker/cuddle-big-bin-tests' into maintSverker Eriksson
2018-01-11Fix encoding of filenames in stacktracesRickard Green
2018-01-04erts: Add non fatal big binary creation for test purposeSverker Eriksson
2018-01-04erts: Refactor ProcBin creationSverker Eriksson
into utility functions.
2018-01-03Fail if ':' is passed to binary_to_integer/2Frank Hunleth
Before: 1> binary_to_integer(<<":">>, 16). 3 After: 1> binary_to_integer(<<":">>, 16). ** exception error: bad argument in function binary_to_integer/2 called as binary_to_integer(<<":">>,16) Prior to this change, both list_to_integer/2 and binary_to_integer/2 would convert strings with values between ASCII '9' up to '0'+base for base > 10. For example, when converting in base 16, you could pass ':', ';', '<', '=', '>', and '?' without getting an exception. This was due to a missing check in c2int_is_invalid_char(). This change adds the missing check and a regression test for passing ':'. It also simplifies the code and tightens up an out-of-bounds check to make it off-by-one rather than off-by-two.
2017-12-20erts: Add more stats for mbcs_poolSverker Eriksson
similar to the ones in OTP-19.2.3.1
2017-12-20erts: Improve carrier pool searchSverker Eriksson
* Give back carrier to owner when put in pool with use of dd-queue. * Replace pooled_list with pooled_tree for more efficient search of all owned pooled carriers. * Remove traitor_list as it does not serve much purpose anymore. * Add HOMECOMING bit flag in crr->allctr atomic to (1) avoid double enqueue into dd-enqueue. (2) trigger read barrier in get_used_allctr for newly received carriers.
2017-12-20erts: Improve alloc_SUITE:migrationSverker Eriksson
to mix it up with some realloc calls.
2017-12-20erts: Refactor carrier dealloc migrationSverker Eriksson
by adding a dedicated 'homecoming_dd_block' to use in dd-queue. + Preparation for dd-queue-migration of non-empty carriers. + Get rid of ugly hack where blk->carrier pointer is overwritten by dd-queue and then have to be restored.
2017-12-05Merge branch 'john/erts/lcnt-fix-reg-proc-names/OTP-14803' into maintJohn Högberg
2017-12-04Fix process name resolution in lcnt resultsJohn Högberg
2017-11-30Merge pull request #1633 from sunboshan/atom-size-fixBjörn Gustavsson
Fix integer overflow when set a large maximum value for atom table OTP-14796
2017-11-27Merge branch 'john/erts/fix-nif-ioq-version/OTP-14779' into maintJohn Högberg
2017-11-24Fix purging of modules with "fake literals"Björn Gustavsson
When compiling Erlang source code, the literal area for the module can only contain data types that have a literal syntax. However, it is possible to sneak in other data types (such as references) in the literal pool by compiling from abstract or assembly code. Those "fake literals" would work fine, but would crash the runtime system when the module containing the literals was purged. Although fake literals are not officially supported, the runtime should not crash when attempting to use them. Therefore, fix the garbage collection of literals and releasing of literal areas. https://bugs.erlang.org/browse/ERL-508
2017-11-24Merge branch 'bjorn/base64-in-dumps/OTP-14686' into maintBjörn Gustavsson
* bjorn/base64-in-dumps/OTP-14686: Use base64 encoding in crash dumps Correct parsing of sub binaries Generalize passing of options for decoding
2017-11-21Merge branch 'sverker/nif-debug-bin-check' into maintSverker Eriksson
2017-11-21Use base64 encoding in crash dumpsBjörn Gustavsson
This will reduce the size of crash dumps, especially if there are large binaries.
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-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-15Fix triggering of node monitorsRickard Green
2017-11-15Fix NIF API version for enif_ioqJohn Högberg
2017-11-15erts: Fix NIF debug readonly check of binariesSverker Eriksson
when done by enif_free_env or enif_clear_env. Do check before we free heap fragments.
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-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-07Merge branch 'sverker/systask-reqid-bug/OTP-14752' into maintSverker Eriksson
* sverker/systask-reqid-bug: erts: Fix bug in systask scheduling
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-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-10-30erl_process_dump: Don't assume that literals can be foundBjörn Gustavsson
Native code does not register its literals in the code header for the loaded code. Therefore, a literal created by native code can not be found by mark_literal(). Ignore literals that can't be found instead of crashing (the crasdump_viewer will report such literals as incomplete heap data, but will not crash).
2017-10-25Stop assuming that all schedulers are managed when updating msaccJohn Högberg
This fixes statistics_SUITE:msacc when dirty schedulers are used during the test.
2017-10-25Merge branch 'maint-20' into maintJohn Högberg
* maint-20: Updated OTP version Update release notes Update version numbers erts: Fix so that bind correct schedulers Update version Fix error handling when decoding an AVP with an alternate dictionary Remove unused function arguments Fix faulty recursion vsn -> 2.1.2 Update appup for ERIERL-14684 Fix speling error 'sndbuf' -> 'recbuf' Add zlib:set_controlling_process/2
2017-10-23erts: Fix so that bind correct schedulersLukas Larsson
When the cpu ids and scheduler ids don't match, the end schedulers could end up not being bound when they should be. example: > taskset -c 1-3 erl +S 4 +sbts > erlang:system_info(scheduler_bindings). {1,2,3,unbound} This fix makes it so that all cores are used to bind schedulers.
2017-10-18Bump version of crash dumps to 0.4Björn Gustavsson
2017-10-18Don't dump literal areas that are not referenced at allBjörn Gustavsson
2017-10-18Dump literals separately to avoid incomplete heap dataBjörn Gustavsson
When a literal was used from several processes, the literal would be dumped in only one of the processes. The other processes that referenced the literals would have incomplete heap data.
2017-10-18Implement dumping of maps in crash dumpsBjörn Gustavsson
Maps would be dumped as the atom 'undefined', which is not very informative.
2017-10-18Buffer writing of crash dumpsBjörn Gustavsson
Writing of crash dumps were done using unbuffered IO. This is slow since many small writes are done. Use a FILE* with an allocated buffer to obtain buffered IO. I wrote a small test program that created 50000 binaries of 200 bytes each and then created a crash dump. The crash dumping was an order of magnitude faster with buffered IO than without.
2017-10-12Revert "Merge branch 'rickard/null-char-filenames/ERL-370/OTP-14543' into maint"Rickard Green
This reverts commit 0717a2194e863f3a78595184ccc5637697f03353, reversing changes made to 71a40658a0cef8b3e25df3a8e48a72d0563a89bf.