Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
Called with a signed int 'sz' argument on 64 bit
would cause sign extension 'sz' was larger than 33554431.
|
|
|
|
|
|
|
|
|
|
|
|
Conflicts:
erts/emulator/Makefile.in
erts/emulator/beam/bif.tab
erts/emulator/beam/erl_gc.c
erts/emulator/beam/erl_gc.h
erts/emulator/beam/erl_printf_term.c
erts/emulator/beam/erl_term.c
erts/emulator/beam/erl_term.h
|
|
* 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
|
|
* mikpe/hipe-mfait-rwlock:
hipe: change mfa_info_table lock to rwmutex
OTP-12557
|
|
* mikpe/avoid-oversize-bignums:
don't leave a heap hole in erts_bs_get_integer_2
don't create oversize bignums in binary matching
OTP-12556
|
|
* egil/beam/select_val/OTP-12555:
erts: Use linear search for small select_val arrays
|
|
* egil/process_dictionary-initial-size/OTP-12535:
erts: Document option 'hpds'
erts: Enable command line argument for initial pd size
|
|
|
|
|
|
The previous compilation was just plain wrong with push/pop mismatches.
Reported-by: Björn-Egil Dahlberg
|
|
Conflicts:
erts/test/otp_SUITE.erl
|
|
* seriyps/zlib-inflate-bound:
Add zlib limited output buffer size functionality
Conflicts:
erts/preloaded/ebin/zlib.beam
OTP-12548
|
|
* erland/ssh/time/OTP-12444:
Update misleading comment in ssh_basic_SUITE
Update new time API and be back-compatible in ssh
Use new time API and be back-compatible in ssh otp_SUITE: Ignore undefined functions in ssh
|
|
|
|
* leoliu/master:
Two minor fixes
OTP-12545
|
|
|
|
* egil/fix-break-printout/OTP-12537:
erts: Fix erroneous printout in crashdump
|
|
|
|
Use '+hpds size' to set initial process dictionary size for spawned processes.
|
|
* Fix documentation on $char for unicode
* Remove duplicate declaration for erts_encode_ext_dist_header_size
|
|
The hipe_mfa_info_table lock is currently a mutex, causing
unnecessary contention and serialization of lookups for
apply-like constructs.
- change the lock from a mutex to an rwmutex
- split hipe_get_na_nofail_locked into a "try" path which
only needs a read lock, and a "slow" path which requires
a write lock
- reimplement hipe_get_na_nofail (used by apply ops etc) to
first call the "try" path with a read lock, and if that
fails the "slow" path with a write lock
- reimplement hipe_get_na_nofail_locked (used by maintenance
code) to call the "try" path and then optionally the "slow"
path, but without taking locks since its caller already has
the write lock
- adjust remaining lock ops to take/release full write lock
- use _rwlocked as suffix on functions requiring a write lock
- change hipe_mfa_get_trampoline to call get_locked not put_locked,
allowing it to take a read lock instead of a write lock
- change hipe_find_mfa_from_ra() to only take a read lock
|
|
otp_SUITE: Ignore undefined functions in ssh
|
|
An extra '}' were printed in remote links.
|
|
Perfctr is a Linux kernel extension that allows programmatic access
to the performance monitoring counters found in most current CPUs.
However, development of perfctr ceased after 2010, and it cannot be
used with Linux kernels newer than 2.6.32.
Therefore the perfctr support code in the Erlang VM is effectively
dead code, so this patch removes it.
|
|
|
|
Reset p->htop in the oversize bignum error case to avoid leaving a
hole in the heap, which would crash the debug emulator.
|
|
This functionality may be useful for compressed streams with high
compression ratio (in case of gzip it may be up to x1000), when
small amount of compressed data will produce large amount of
uncompressed output. This may lead to DoS attacks, because
server easily goes out of memory.
Example of such high compression ratio stream:
```
dd if=/dev/zero of=sparse.bin bs=1MB count=100 # 100mb of zeroes
gzip sparse.bin # 95kb sparse.bin.gz
$ erl
> {ok, Compressed} = file:read_file("sparse.bin.gz"),
> 97082 = size(Compressed),
> Uncompressed = zlib:gunzip(Compressed),
> 100000000 = iolist_size(Uncompressed).
```
|
|
* bjorn/compiler/dup-bug-fix/OTP-12453:
Teach case_opt/3 to avoid unnecessary building
sys_core_fold: Optimize let statements more aggressively
Suppress warnings for expressions that are assigned to '_'
trace_bif_SUITE: Ensure that a call to time/0 is not removed
|
|
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.
|
|
|
|
Conflicts:
OTP_VERSION
erts/emulator/sys/unix/sys.c
erts/vsn.mk
|
|
|
|
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.
|
|
|
|
* egil/fix-getifaddrs-realloc/OTP-12445:
erts: Fix getifaddrs realloc ptr mismatch
|
|
* egil/fix-child_setup-close/OTP-12446:
erts: Use closefrom() if available when closing fds
erts: Don't close all fds twice in child_setup
|
|
When a buffer was exhausted and subsequently a realloc, we could get
an invalid pointer.
For this to occur we would need to have a realloc to lower adresses.
The symptom would be garbage returned from erlang:port_control(Port, 25, [])
(prim_inet:getifaddrs(Port) resulting in a badarg) or a segmentation fault.
|
|
closefrom() was only used in the vfork() case before, now also
used in the fork() case.
|
|
The commit c2b4eab25c907f453a394d382c04cd04e6c06b49 introduced an error
in which child_setup erroneously tried to close all file descriptors twice.
|
|
|