aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
AgeCommit message (Collapse)Author
2019-02-14Merge branch 'john/erts/spectre-configure-flag-otp_20/OTP-15430/ERIERL-237' ↵Erlang/OTP
into maint-20 * john/erts/spectre-configure-flag-otp_20/OTP-15430/ERIERL-237: Allow disabling retpoline in interpreter loop Add a ./configure flag for spectre mitigation
2019-01-16Merge branch 'rickard/dirty_scheduler_collapse/OTP-15509' into maint-20Erlang/OTP
* rickard/dirty_scheduler_collapse/OTP-15509: Fix bug causing dirty scheduler sleeper list inconsistency
2019-01-11Fix bug causing dirty scheduler sleeper list inconsistencyRickard Green
2018-12-28Merge branch 'sverker/big-band-bug/ERL-804/OTP-15487' into maint-20Erlang/OTP
* sverker/big-band-bug/ERL-804/OTP-15487: erts: Fix bug in 'band' of two negative numbers, one big
2018-12-17erts: Fix bug in 'band' of two negative numbers, one bigSverker Eriksson
Similar bug as for bxor fixed by abc4fd372d476821448dfb9 Ex: 1> io:format("~.16B\n", [-16#1110000000000000000 band (-1)]). -1120000000000000000 Wrong result for (-X bsl WS) band -Y. where X is any positive integer WS is erlang:system_info(wordsize)*8*N where N is 1 or larger Y is any positive integer smaller than (1 bsl WS) Fix: The subtraction of 1 (for 2-complement conversion) must be carried along all the way to the last words.
2018-11-20Merge branch 'john/erts/spectre-configure-flag/OTP-15430/ERIERL-237' into ↵John Högberg
john/erts/spectre-configure-flag-otp_20/OTP-15430/ERIERL-237 * john/erts/spectre-configure-flag/OTP-15430/ERIERL-237: Allow disabling retpoline in interpreter loop Add a ./configure flag for spectre mitigation
2018-11-20Allow disabling retpoline in interpreter loopJohn Högberg
We only do this when the user has explicitly told us it's okay to partially disable mitigation (spectre-mitigation=incomplete). The macro is inert if it isn't.
2018-11-05Merge branch 'john/erts/OTP-20.3.8/minusminus_trapping/OTP-15371' into maint-20Erlang/OTP
* john/erts/OTP-20.3.8/minusminus_trapping/OTP-15371: Optimize operator '--' and yield on large inputs
2018-11-02Optimize operator '--' and yield on large inputsJohn Högberg
The removal set now uses a red-black tree instead of an array on large inputs, decreasing runtime complexity from `n*n` to `n*log(n)`. It will also exit early when there are no more items left in the removal set, drastically improving performance and memory use when the items to be removed are present near the head of the list. This got a lot more complicated than before as the overhead of always using a red-black tree was unacceptable when either of the inputs were small, but this compromise has okay-to-decent performance regardless of input size. Co-authored-by: Dmytro Lytovchenko <[email protected]>
2018-10-31Merge branch 'rickard/internal_ref_cmp/OTP-15399/ERL-751' into maint-20Erlang/OTP
* rickard/internal_ref_cmp/OTP-15399/ERL-751: Fix erts_internal_ref_number_cmp()
2018-10-31Fix erts_internal_ref_number_cmp()Rickard Green
2018-10-16Merge branch 'sverker/erts/ets-select_replace-bug/OTP-15346' into maint-20Erlang/OTP
* sverker/erts/ets-select_replace-bug/OTP-15346: erts: Fix bug in ets:select_replace for bound key
2018-10-09erts: Fix bug in ets:select_replace for bound keySverker Eriksson
which may cause following calls to ets:next or ets:prev to fail.
2018-08-09Merge branch 'dotsimon/ref_ordering_bug/OTP-15225' into maint-20Erlang/OTP
* dotsimon/ref_ordering_bug/OTP-15225: Fixed #Ref ordering bug Test #Ref ordering in lists and ets
2018-08-09Merge branch 'rickard/full-cache-nif-env/OTP-15223/ERL-695' into maint-20Erlang/OTP
* rickard/full-cache-nif-env/OTP-15223/ERL-695: Fix caching of NIF environment when executing dirty
2018-08-09Fix caching of NIF environment when executing dirtyRickard Green
2018-08-09Fixed #Ref ordering bugSimon Cornish
2018-07-20Merge branch 'sverker/crash-dump-crash-literals/OTP-15181' into maint-20Erlang/OTP
* sverker/crash-dump-crash-literals/OTP-15181: erts: Fix bug in crash dump generation
2018-07-12erts: Fix bug in crash dump generationSverker Eriksson
Symptom: emulator core dumps during crash dump generation. Problem: erts_dump_lit_areas did not grow correctly to always be equal or larger than number of loaded modules. The comment about twice the size to include both curr and old did not seem right. The beam_ranges structure contains *all* loaded module instances until they are removed when purged.
2018-06-28Merge branch 'john/erts/fix-process-schedule-after-free/OTP-15067/ERL-573' ↵Erlang/OTP
into maint-20 * john/erts/fix-process-schedule-after-free/OTP-15067/ERL-573: Don't enqueue system tasks if target process is in fail_state Fix erroneous schedule of freed/exiting processes Fix deadlock in run queue evacuation Fix memory leak of processes that died in the run queue
2018-06-14Don't enqueue system tasks if target process is in fail_stateJohn Högberg
The fail state wasn't re-checked in the state change loop; only the FREE state was checked. In addition to that, we would leave the task in the queue when bailing out which could lead to a double-free. This commit backports active_sys_enqueue from master to make it easier to merge onwards.
2018-06-14Fix erroneous schedule of freed/exiting processesJohn Högberg
When scheduled out, the process was never checked for the FREE state before rescheduling, which meant that a system task could sneak in and cause a double-free later on.
2018-06-13Merge branch 'sverker/ets-auto-unfix-delete-race/OTP-15109' into maint-20Erlang/OTP
* sverker/ets-auto-unfix-delete-race/OTP-15109: erts: Fix race between ets table deletion and auto-unfix
2018-06-05Merge branch 'sverker/system-profile-bug/OTP-15085' into maint-20Erlang/OTP
* sverker/system-profile-bug/OTP-15085: erts: Fix bug in system_profile
2018-06-05Merge branch 'sverker/enif_binary_to_term-bug/OTP-15080' into maint-20Erlang/OTP
* sverker/enif_binary_to_term-bug/OTP-15080: erts: Fix bug in enif_binary_to_term for immediates
2018-06-04erts: Fix race between ets table deletion and auto-unfixSverker Eriksson
Problem: 1. Process A fixates table T. 2. Process B starts deleting table T (either by ets:delete or exit) and does tid_clear(). 3. Process A exits and does proc_cleanup_fixed_table() and get NULL from btid2tab() and deallocates DbFixation. 4. Process B continues deleting table in free_fixations_locked() and finds the deallocated DbFixation in the fixing_procs tree. Solution: Wait with tid_clear() until after free_fixations_locked() has traversed the fixing_procs tree.
2018-05-21Fix deadlock in run queue evacuationJohn Högberg
2018-05-21Fix memory leak of processes that died in the run queueJohn Högberg
2018-05-18erts: Fix bug in system_profileSverker Eriksson
seen to cause redundant {profile,_,active,_,_} messages when process is terminating.
2018-05-16erts: Fix bug in enif_binary_to_term for immediatesSverker Eriksson
Symptom: Heap corruption Expanded test case to provoke this bug and test some more term types.
2018-02-27Merge branch 'sverker/erts/more-crash-dump-info/OTP-14820' into maintSverker Eriksson
* sverker/erts/more-crash-dump-info/OTP-14820: erts,observer: Add port-suspended pids to crash dump erts,observer: Add port states and flags to crash dump erts,observer: Add dirty schedulers to crash dump observer: Refactor get_schedulerinfo1 erts,observer: Add more port info to crash dump erts: Cleanup dump_process_info() erts: Include failing garbing process in crash dump erts: Remove unused args to collect_live_heap_frags erts: Add binary vheap sizes to crash dump
2018-02-26Merge branch 'lukas/erts/dirty_trace_clean_fix/OTP-14938' into maintLukas Larsson
* lukas/erts/dirty_trace_clean_fix/OTP-14938: erts: Delay cleanup of removed tracer on dirty scheds
2018-02-26erts: Delay cleanup of removed tracer on dirty schedsLukas Larsson
It is not simple to do the correct de-allocation on a dirty schedulers, so we just delay it until this process runs on a normal scheduler.
2018-02-22erts,observer: Add port-suspended pids to crash dumpSverker Eriksson
2018-02-22erts,observer: Add port states and flags to crash dumpSverker Eriksson
2018-02-20erts,observer: Add dirty schedulers to crash dumpSverker Eriksson
2018-02-20erts,observer: Add more port info to crash dumpSverker Eriksson
2018-02-20erts: Cleanup dump_process_info()Sverker Eriksson
by testing F_SENSITIVE only once.
2018-02-20erts: Include failing garbing process in crash dumpSverker Eriksson
Exclude garbing processes, EXCEPT if run by crash dumping thread in which case we assume the heap is healthy without any move markers yet/left. Switched order between (allocating) setup_rootset() and (move marking) collect_live_heap_frags().
2018-02-20erts: Remove unused args to collect_live_heap_fragsSverker Eriksson
2018-02-20erts: Add binary vheap sizes to crash dumpSverker Eriksson
2018-02-19Merge branch 'john/erts/fix-iolist-bitstring-badarg/OTP-14926' into maintJohn Högberg
2018-02-19Merge branch 'john/erts/fix-iovec-unaligned-binaries/OTP-14921' into maintJohn Högberg
2018-02-15badarg on iolist_to_binary(Bitstring)John Högberg
When supplied without an enclosing list, bitstrings were returned as-is instead of badarging.
2018-02-15Handle unaligned binaries in enif_inspect_iovecJohn Högberg
2018-02-15Handle unaligned binaries in erlang:iolist_to_iovec/1John Högberg
A binary is a binary as long as its size in bits is evenly divisible by 8, regardless of whether it has a bit offset or not.
2018-02-15badarg on iolist_to_iovec(Bitstring)John Högberg
When supplied without an enclosing list, bitstrings were silently truncated to [] instead of badarging.
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'