Age | Commit message (Collapse) | Author |
|
This will also fix a bug in term_to_binary
treating full nodes as tuples and emiting LIST_EXT for leafs.
|
|
|
|
Hmm, seems like gcc (4.4.3 at least) can switch the order
of an &&-expression and do the last condition first if it
think it's more efficient (and without side effects I hope).
Which led to valgrind complaining about 'prev_ret' being used
uninitialized in this case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
by calling make_hash2.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The old hashing did not care which value belonged to which key,
for example:
would hash the same.
|
|
|
|
|
|
* nox/maps-match_specs-fixes/OTP-12270:
erts: Strengthen maps match spec compilation tests
Properly collect variables in match specs with maps
Fix compilation of match specs with maps
|
|
Conflicts:
erts/emulator/hipe/hipe_bif0.c
|
|
|
|
The previous compilation was just plain wrong with push/pop mismatches.
Reported-by: Björn-Egil Dahlberg
|
|
Bignums are artifically restricted in size. Arithmetic and logical
operations check the sizes of resulting bignums, and turn oversize
results into system_limit exceptions.
However, this check is not performed when bignums are constructed by
binary matching. The consequence is that such matchings can construct
oversize bignums that satisfy is_integer/1 yet don't work. Performing
arithmetic such as Term - 0 fails with a system_limit exception. Worse,
performing a logical operation such as Term band Term results in [].
The latter occurs because the size checking (e.g. in erts_band()) is
a simple ASSERT(is_not_nil(...)) on the result of the bignum operation,
which internally is [] (NIL) in the case of oversize results. However,
ASSERT is a no-op in release builds, so the error goes unnoticed and []
is returned as the result of the band/2.
This patch addresses this by preventing oversize bignums from entering
the VM via binary matching:
- the internal bytes_to_big() procedure is augmented to return NIL for
oversize results, just like big_norm()
- callers of bytes_to_big() are augmented to check for NIL returns and
signal errors in those cases
- erts_bs_get_integer_2() can only fail with badmatch, so that is the
Erlang-level result of oversize bignums from binary matches
- big_SUITE.erl is extended with a test case that fails without this
fix (no error signalled) and passes with it (badmatch occurs)
Credit goes to Nico Kruber for the initial bug report.
|
|
Assigning the result of a BIF call to a variable used to be
sufficient to prevent the call from being optimized away. With
the more aggressive optimization that will be introduced in
a future commit it will not be sufficient.
Matching the return value will prevent the compiler from doing
the optimization.
|
|
This commit improves crash dumps in several ways:
* Suspends schedulers to get a current snapshot
* Dumps information about scheduler
* Dumps stack trace of current running process
(including Garbing processes)
|
|
|
|
* sverk/port_get_data-race/OTP-12208:
erts: Fix port data memory allocation bug
|
|
for non-immediate port data >= sizeof(Eterm)*2 words.
|
|
|
|
OTP-12300
* vinoski/dirty-nif-return-gc:
Fix gc-related problem with dirty NIFs
|
|
|
|
Ensure that the return value from a dirty NIF call is made part of the GC
rootset. Add a new regression test to nif_SUITE.
Thanks to Daniel Goertzen for reporting the error and providing a test
case, and to Sverker Eriksson for making test case reproducible and finding
the fix.
|
|
This patch allows checking for NIF API version in a way similar to
driver version. E.g. by calling erlang:system_info(nif_version).
Signed-off-by: Peter Lemenkov <[email protected]>
|
|
* egil/nox/maps-match_specs/OTP-12270:
erts: Fix return value from erts_maps_get to be const
Properly support maps in match_specs
Support maps in ms_transform
Return pointer to value in erts_maps_get()
|
|
* maint:
Use isfinite() instead of finite() when available
|
|
* sv/isfinite/OTP-12268:
Use isfinite() instead of finite() when available
|
|
OS X Mavericks builds result in a number of warnings about finite() being
deprecated, like these:
beam/erl_arith.c:451:7: warning: 'finite' is deprecated: first deprecated in OS X 10.9 [-Wdeprecated-declarations]
ERTS_FP_ERROR(p, f1.fd, goto badarith);
^
sys/unix/erl_unix_sys.h:319:33: note: expanded from macro 'ERTS_FP_ERROR'
^
sys/unix/erl_unix_sys.h:244:51: note: expanded from macro '__ERTS_FP_ERROR'
^
/usr/include/math.h:718:12: note: 'finite' has been explicitly marked deprecated here
extern int finite(double) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_NA, __IPHONE_NA);
Add checks to use isfinite() instead of finite() where available. Verified
on OS X Mavericks 10.9.5 and Ubuntu 12.04.
|
|
* rickard/master/eager-check-io/OTP-12117:
No eager check I/O on OSE
Introduce support for eager check I/O scheduling
|
|
* rickard/maint-17/eager-check-io/OTP-12117:
No eager check I/O on OSE
Introduce support for eager check I/O scheduling
|
|
|
|
|
|
rickard/master/eager-check-io/OTP-12117
* rickard/maint-17/eager-check-io/OTP-12117:
No eager check I/O on OSE
Introduce support for eager check I/O scheduling
Conflicts:
erts/preloaded/ebin/erlang.beam
|
|
rickard/maint-17/eager-check-io/OTP-12117
* rickard/eager-check-io/OTP-12117:
Introduce support for eager check I/O scheduling
Conflicts:
erts/emulator/beam/erl_bif_info.c
erts/emulator/beam/erl_init.c
erts/emulator/beam/erl_process.c
erts/preloaded/ebin/erlang.beam
|
|
|
|
|
|
and add 'dirty_scheduler_support' to ErlNifSysInfo
|
|
* maint:
Only run upper boundry tuple test with lots of memory
|