Age | Commit message (Collapse) | Author |
|
* mk/net-dragonfly-bsd-patches:
Remove unused variables
Use proper install method
Add support for DragonFly BSD
Add support for NetBSD
|
|
* ms/inet-bug-fixes:
inet: support retrieving MAC address on BSD
inet: fix getservbyname buffer overflow
inet: fix ifr_name buffer overflow
inet: null terminate ifr_name buffer
OTP-8816
|
|
The make_term_n function in nif_SUITE.c created resources that never
got released, creating valgrind memcheck Definitely Lost warnings.
|
|
The scheduler wakeup threshold is now possible to adjust at system boot.
For more information see the `+swt' command line argument of `erl'.
|
|
Lower the scheduler wakeup threshold since schedulers aren't spuriously
woken as before (since commit 59ee2a593090e7d53c97ceba63cbd300d1b9657e).
|
|
On systems supporting getaddrinfo(), support looking up the MAC
address from inet:ifget/2. The results have the same quirks as with
Linux: if the MAC address is longer than 6 bytes (e.g., fw0 under
Mac OS X), the address is truncated; if the interface does not have
a MAC address (e.g., lo0), an address consisting of 0's is returned.
|
|
Added erlang:system_info(build_type) which makes it
easier to chose drivers, NIF libraries, etc based
on build type of the runtime system.
|
|
* rickard/cpu-info-testcase/OTP-8765:
Fix crash when calling erlang:system_info(update_cpu_info)
Add testcase for erlang:system_info(update_cpu_info)
|
|
* rani/sctp-sndrcvinfo/OTP-8795:
Fix xfer_active close expection for Solaris behaviour
Keep default #sctp_sndrcvinfo{} fields on gen_sctp:send/4
Fill in sinfo_assoc_id in struct sctp_sndrcvinfo for getopt()
Conflicts:
lib/kernel/test/gen_sctp_SUITE.erl
|
|
* rani/sctp-linger-bugfix/OTP-8726:
Fix SCTP linger option
|
|
* pg/fix-segfault-on-crash_dump-with-hipe:
Fix segmentation fault when dumping the crash log with hipe enabled and natively compiled modules
OTP-8801
|
|
* mp/fix-hipe-on_load_crash:
fix native code crash when calling unloaded module with on_load function
OTP-8799
|
|
* mp/robustify-hipe_bifs_get_hrvtime:
robustify hipe_bifs:get_hrvtime/0
OTP-8798
|
|
Calling erlang:system_info(update_cpu_info) on platforms where no
CPU topology was found could result in a crash if other CPU
information had changed. This bug was introduced in the 'dev'
branch before R14B (commit 1b273b618002d65159453fdfb9520a9476e4423a).
That is, the bug has never been seen in a released runtime system.
|
|
|
|
* rickard/cpu-info-unbind/8765:
Fix erroneous error reports about unbind failure
|
|
On platforms where binding of schedulers is not supported, numerous error
reports on the form "Scheduler <N> failed to unbind from cpu -1: enotsup"
were erroneously issued. This bug was introduced in the 'dev' branch
before R14B (commit 1b273b618002d65159453fdfb9520a9476e4423a). That is,
the bug has never been seen in a released runtime system.
Reported-By: Tuncer Ayaz
|
|
The assoc_id field was uninitialized causing random answers.
|
|
inet:setopts(S, [{linger,{true,2}}]) returned {error,einval} for
SCTP sockets. The inet_drv had a bug when checking the option size.
|
|
* pan/ets_binary_overhead/OTP-8762:
Remove binary overhead counter from ets objects
|
|
* sverker/NIF-64bit-integers/OTP-8746:
Make windows 64bit types be declared more consistently
Teach Windows about the int64 functions
NIF doc official support note
NIF 64-bit integer support
|
|
* egil/R14A/binary-gc-wrap/OTP-8730:
Increase vheap counter to Uint64
Fix wrapping in next vheap calculation
|
|
* pan/local_univ_time_bsd/OTP-8580:
Teach erl_time_sup to handle timezones w/o DST on FreeBSD as on other platforms
|
|
* pan/list_to_float/OTP-7178:
Teach Unix sys_float.c to ignore underflow in list_to_float and return 0.0
|
|
* rickard/cpu-info/OTP-8765:
Initialize environment functionality after thread lib
Fix faulty assertions
Implement automatic detection of CPU topology on Windows
Make it possible to reread and update detected CPU information
|
|
An assertion failed due to the thread library not being
initialized when initializing an rwmutex. This was however
harmless.
|
|
natively compiled modules
When loading a module, code area is allocated and header fields
code[MI_ATTR_SIZE] as well as code[MI_COMPILE_SIZE] are not
cleared. They are only set later when freeze_code is called, if the
module has attributes and compilation info, which should always be the
case. When loading a native module (as a stub), code is allocated as
well (to contain the stub functions), and code[MI_ATTR_SIZE] as well
as code[MI_COMPILE_SIZE] are not cleared either. Yet, freeze_code will
not be called (since there is no threaded code to freeze for native
modules), and as a result, these header fields are never set. They can
contain any garbage.
Later on, when writing a crash dump, the attributes and compilation
info are dumped, using these particular header fields. If the size is
garbage, the dump attribute function will iterate until it segfaults.
The fix consists in clearing code[MI_ATTR_SIZE] and
code[MI_COMPILE_SIZE] in both cases (threaded code and native
code). Even if non-native modules should contain code and attributes
and therefore the values code[MI_ATTR_SIZE] and code[MI_COMPILE_SIZE]
should be set by freeze_code, it seems cleaner and easier to maintain
to clear the whole the header in the "initialize code area"
section. As a result, crash dump will not segfault. Instead, native
modules will have an empty attributes and compilation info section in
the crash dump.
|
|
As reported in erlang-bugs, the following sequence of events crashes the VM:
1. Module M1 is loaded and in native mode.
2. Module M2 is not loaded, in emulated mode, and has an on_load function.
3. M1 calls some function in M2. This works.
4. M1 again calls some function in M2. This segfaults.
The reason for the crash is that when the beam loader fixes up export
entries after a successful on_load function call, it erroneously clears
the ->code[3] field in that module's export entries. This is redundant
(no code in beam relies on ->code[3] being NULL), inconsistent with
modules without on_load functions (there ->code[3] remains a valid beam
instruction after the module is loaded), and breaks native code which needs
the old ->address value in an export entry to remain valid after a module
load step (before the load ->address points to ->code[3], after the load
->address points to the real code but uses of the old ->address value
remain so ->code[3] must remain valid).
Thus the fix for the crash is to simply not clear ->code[3].
This patch fixes R14A and should also fix R13B04.
(There does exist a performance bug in this area, but it is unrelated
to the on_load feature so will be fixed separately.)
|
|
The HiPE runtime system has a hipe_bifs:get_hrvtime/0 BIF which
mimics the non-standard gethrvtime() C API. It's possible to
configure the implementation to use the "perfctr" Linux kernel
extension for performance-monitoring counters, in which case
get_hrvtime has very high precision and low overhead. Otherwise
it uses the same code as runtime(statistics).
This patch changes the get_hrvtime implementation to do a runtime
check to see if perfctr is available, and to use the fallback code
rather than returning a dummy value if perfctr is unavailable,
which is common.
The current dummy value return is a bug. It messes up the API
and either breaks callers (they get badarg when trying to compute
on the value) or forces them to implement checks and fallbacks
themselves. Timing code in HiPE's test suites and benchmarks
is known to be affected.
|
|
* rickard/erts-poll-race/OTP-8773:
Fix race in erts_poll()
|
|
A race condition in erts_poll() could cause
delay of poll for I/O.
|
|
* bjorn/solaris-fp-exception:
Solaris/x86: Handle floating point exceptions properly in driver threads
|
|
* bjorn/remove-elib_malloc/OTP-8764:
erts: Remove broken elib_malloc
erts: Remove the unused mem_drv driver
erts: Remove stray pre-ISO-C compatibility macros
erts: Remove unused decl.h
|
|
* rickard/fix-faulty-assert/OTP-8759:
Fix faulty no_empty_run_queues assertion
|
|
As the overhead counter got larger and never really was needed in ets objects,
I removed them.
A few stray comments of XXX:PaN type from halfword dev removed in the process.
|
|
Calling erlang:system_info/1 with the new argument 'update_cpu_info'
will make the runtime system reread and update the internally stored
CPU information. For more information see the documentation of
erlang:system_info(update_cpu_info).
|
|
On Solaris/x86, the floating point exceptions bits seems to
be propagated to child threads, so if scheduler threads
use floating points exceptions, also driver threads will
have floating points exception enabled.
The problem is that erts_thread_init_float() has not been
called for driver threads, and because of that matherr()
will crash when called.
Fix matherr() so that it will work even if erts_thread_init_float()
has not been called.
This fix was suggested by Mikael Pettersson.
|
|
elib_malloc is an alternate memory allocator that
is no longer possible to build.
|
|
The mem_drv driver was only useful when elib_malloc was
active.
|
|
A long time ago, the Erlang run-time system could be
build with pre-ANSI/ISO-C (K&R) C compilers, but that is
no longer possible. Remove the remaining uses of the
compatibility macros that made it possible that possible.
|
|
The header file erts/emulator/beam/decl.h is no longer used.
|
|
These are the current NetBSD pkgsrc patches.
|
|
It's been reported that HiPE-enabled Erlang VMs running on BSD
systems sometimes generate messages like
Yikes! erts_alloc() returned misaligned address 0x8016a512c
These originate from hipe_bif0.c:hipe_bifs_alloc_data_2().
A native code module has an associated data area of some
size and alignment. In the case where the size is zero,
the alignment is irrelevant, but the allocation BIF checks
it anyway. The warning then triggers on systems where
malloc(0) returns blocks with less alignment than we
(erroneously) expected.
The fix is to simply skip the allocation in this case and
return NULL. The loader won't actually use the address in
this case so that's safe. This is also an optimization since
it avoids allocating memory that cannot be used, and it avoids
fragmenting the system heap with useless tiny blocks.
A second problem is that the warning message failed to
identify its origin. Fixed by prefixing the message by
the BIF's name rather than the silly Yikes! string.
Tested and confirmed to solve the original reporter's problem.
|
|
This will reduce the risk of integer wrapping in bin vheap counting.
The vheap size series will now use the golden ratio instead of doubling
and fibonacci sequences.
OTP #8730
|
|
OTP #8730
|
|
* bjorn/remove-obsolete-driver-support/OTP-8758:
Remove obsolete/driver.h and the associated functionality
|
|
For a short period of time no_empty_run_queues may have
been increased twice for a specific run queue. Two
assertions did not take this into account.
|
|
|
|
The obsolete/driver.h header file has been obsolete
since R8B.
Remove that file, along with obsolete thread APIs for
drivers in the emulator and the test cases.
|
|
|