Age | Commit message (Collapse) | Author |
|
* ta/docs-fixes:
Fix misspelling of intermediate
Fix typos in erts/preloaded/src
Fix more misspellings of compatibility
Fix misspelling of kept
Fix misspelling of compatibility in ssl_basic_SUITE
Fix misspelling of compatibility
Fix misspelling of accommodate
Fix misspelling of exceed
Fix misspelling of accidentally
Fix misspelling of erroneous in xmerl_xsd
Fix misspelling of erroneous
Fix misspelling of successful
Fix typos in instrument(3)
Fix typos in dbg(3)
dialyzer: fix a small typo in list_to_bitstring test
Fix typos in cover.erl
Fix typos (variable name) in erl_nif(3)
Fix typos in mod_esi(3)
Fix trivial typos in erlang(3)
OTP-9555
|
|
* rickard/glibc-mutex-destroy-bug/OTP-9373:
Do not abort emulator when buggy pthread impl return EBUSY
|
|
* pan/erl-bif-types/OTP-9496:
Cleanup ETS bif's in hipe:erl_bif_types.erl (for dialyzer)
|
|
* pan/win_erlsrv_stop/OTP-9344:
Move init of smp rw mutex from init to sys_args to make sure that it is initialized before the first erts_sys_getenv call
Move erts_sys_env_init() to erts_sys_pre_init()
Remove _DEBUG from start_erl.c
Spelling correction in erlsrv doc
Convert windows start_erl to take rootdir on command line
Add command start_disabled to erlsrv
Add global lock for erlsrv to avoid races
Change start order so that service_event gets initialized before it's used
|
|
|
|
* In rare cases we could have no run_queue in schedule misc ops
|
|
|
|
* fm/enif_compare-64-to-32bits-cast:
Fix enif_compare on 64bits machines
OTP-9533
|
|
In 64bits machines the Sint type has a size of 8 bytes,
while on 32bits machines it has a 4 bytes size.
enif_compare was ignoring this and therefore returning
incorrect values when the result of the CMP function
(which returns a Sint value) doesn't fit in 4 bytes.
For example, passing the operands -1294536544000 and
-1178704800000 to enif_compare would trigger the bug.
|
|
This BIF's second parameter is a list of options.
Currently the only allowed option is {minor_version, Version}
where version is either 0 (default) or 1.
|
|
Add erlang:check_old_code/1 to quickly check whether a module
has old code. If there is no old code, there is no need to call
erlang:check_process_code/2 for all processes, which will save
some time if there are many processes.
|
|
There is no need to suspend the process if the module has no old
code. Measurements show that this change will make
erlang:check_process_code/2 in an SMP emulator about four times
faster if the module has no old code.
|
|
* rc/r14-gc-fix:
fix 64-bit issues in the garbage collection
OTP-9488
|
|
We discovered that if a single Erlang process tried to grow above 32
GB (i.e., more 64-bit words than can be counted by a 32-bit number),
the VM failed to find the next larger heap size, even though there
were plenty more heap sizes left to pick from and even though we had a
lot more memory available on the machine. (Obviously, this is only
applicable on 64-bit Erlang.)
It turned out to be due to some 'int' variables in the heap resizing
parts of erl_gc.c not being properly updated to 'Uint' or 'Sint'. Once
that was fixed, I got segfaults instead as soon as the heap got larger
than 2^32 words, due to even more 'int' declarations in the same file,
but now in the GC code.
After fixing this as well, I successfully ran an Erlang node in which
a single Erlang process had a heap so large that I'm not at liberty to
divulge the exact size, but I think the scientific term is
"humongous", and I'm confident that there are no further immediate
problems with very very large individual process heaps.
|
|
Constructing binaries using the bit syntax with literals sizes
that would not fit in an Uint will either cause an emulator crash
or the loading to be aborted.
Use the new TAG_o tag introduced in the previous commit to make sure
that the attempt to create huge binary literals will generate a
system_limit exception at run-time.
|
|
The handling of large values for other tags than TAG_i (integer) is
buggy. Any tag value equal to or greater than 2^40 (5 bytes) will
abort loading. Tag values fitting in 5 bytes will be truncated to 4
bytes values.
Those bugs cause real problems because the bs_init2/6 and
bs_init_bits/6 instructions unfortunately use TAG_u to encode literal
sizes (using TAG_i would have been a better choice, but it is too late
to change that now). Any binary size that cannot fit in an Uint
should cause a system_limit exception at run-time, but instead the
buggy handling will either cause an emulator crash (for values in the
range 2^32 to 2^40-1) or abort loading.
In this commit, implement overflow checking of tag values as a
preparation for fixing the binary construction instructions. If any
tag value cannot fit in an Uint (except for TAG_i), change the
tag to the special TAG_o overflow tag.
|
|
Attempting to construct <<0:((1 bsl 32)-1)>>, the largest bitstring
allowed in a 32 bit emulator, would cause an emulator crash because
of integer overflow.
Fix the problem by using an Uint64 to avoid integer overflow.
Do not attempt to handle construction of <<0:((1 bsl 64)-1>> in
a 64-bit emulator, because that will certainly cause the emulator
to terminate anyway because of insufficient memory.
|
|
* sverker/allocator-aoff/OTP-9424:
New allocator: Address order first fit (aoff)
|
|
alloc_no of sbmbc_low_alloc was set to ERTS_ALC_A_STANDARD_LOW
|
|
|
|
* sverker/enif_make_int64-halfword/OTP-9394:
Fix halfword bug in enif_make_int64
|
|
* rickard/sbmbc/OTP-9339:
Use separate memory carriers for small blocks
|
|
* sverker/ets_delete-deadlock-race/OTP-9423:
Fix bug in ets:delete for write_concurrency that could lead to deadlock
|
|
|
|
A trace matchspec with 'enable_trace' or 'disable_trace' in body could
cause an emulator crash if a concurrent process altered the trace
setting of the traced function by calling erlang:trace_pattern.
The effect was a deallocation of the binary holding the matchspec
program while it was running. Fixed by increasing reference count of
ms-binary in the cases when 'enable_trace' or 'disable_trace' may
cause a system block that may alter the ongoing trace.
The paradox here is that db_prog_match() is using erts_smp_block_system()
to do 'enable_trace' and 'disable_trace' in a safe (atomic) way. But that
also have the (non-atomic) effect that racing thread might block the
system and change the trace settings with erlang:trace_pattern.
|
|
Relocking in ets_delete_1() and remove_named_tab() was done by
unlocking the table without clearing the is_thread_safe flag. A racing
thread could then read-lock the table and then incorrectly
write-unlock the table as db_unlock() looked at is_thread_safe to
determine which kind of lock to unlock.
Several fixes:
1. Make db_unlock() use argument 'kind' instead of is_thread_safe to
determine lock type.
2. Make relock logic use db_lock() and db_unlock() instead of directly
accessing lock primitives.
3. Do ownership transfer earlier in ets_delete_1 to avoid racing owner
process to also start deleting the same table.
|
|
The bug was creating an invalid bignum instead of a small integer,
causing strange comparing behavior (=:= failed but == succeeded).
|
|
|
|
|
|
|
|
* rickard/driver_async_cancel/OTP-9302:
Fix driver_async_cancel()
|
|
|
|
* sverker/hipe-misc-fixing/OTP-9298:
hipe_mkliterals print argv[0] in generated files
Fix code:is_module_native segv on deleted module
lock checking fix in hipe_bif2.c
|
|
* rickard/barriers/OTP-9281:
Silence warnings
Fix build with hipe on amd64
Reduce number of atomic ops
Use 32-bit atomic for port snapshot
Remove pointless erts_ports_alive variable
Ensure quick break
Ensure that all rehashing information are seen when done
Ensure that stack updates are seen when stack is released
Add needed barriers for write_concurrency tables
Homogenize memory barriers on atomics
|
|
|
|
|
|
Counters for active, and used schedulers have been coalesced in
order to reduce the amount of atomic operations needed.
Some currently not strictly necessary barriers have also been added
in order to be future proof.
|
|
|
|
|
|
This is not a bugfix. The change is done in order to avoid a
future bug.
|
|
Ets tables using ordered_set could potentially get into an
internally inconsistent state.
|
|
* bjorn/fix-warnings/OTP-9250:
Eliminate alias warning in gcc 4.5.2
erl_trace: Eliminate alias warning
|
|
* bjorn/fix-binary-overflow/OTP-9118:
Fix overflow in list_to_bitstring/1
Replace io_list_len() with erts_iolist_size()
Make port_command/2 reject non-byte sized bitstrings
io.c: Make io_list_vec_len() less general
iolist_size/1: Fix truncation of result
Test iolist_size/1 with bad arguments
binary_SUITE: Remove workaround for avoiding stack overflow
|
|
Ets tables using the write_concurrency option could potentially get
into an internally inconsistent state.
|
|
* sverker/halfword-printf-relative-terms/OTP-9292:
ETS usage of erts_printf %R
erts_printf %R for relative ets-terms in halfword-vm
Another halfword is_same-bug for ETS ordered_set
|
|
* sverker/halfword-high-alloc/OTP-9291:
Present 'low' memory count for halfword-vm with erlang:memory()
Fix faulty values from erlang:memory() on halfword-vm
Allow allocator disable for high memory (better valgrind for halfword)
Expand the use of high memory allocation in halfword emulator
|
|
|
|
* rickard/gc-other/OTP-9211:
Fix bad assertions
Avoid scheduling of processes being garbage collected by others
|
|
|
|
|