Age | Commit message (Collapse) | Author |
|
Add the enif_is_exception function to allow callers to determine
whether an ERL_NIF_TERM represents an exception. (Currently the only
supported exception is badarg since only enif_make_badarg exists, but
this will likely be expanded in future releases.) This allows NIF code
to call other NIF functions that return ERL_NIF_TERM and properly
check to see if the returned terms are exceptions. Without the
enif_is_exception function, developers have to create their own means
of checking whether a function creates an exception, such as returning
boolean success/failure indicators or some other special value
indicating that an exception is in effect.
The declaration of enif_is_exception in erl_nif_api_funcs.h respects
the order of declarations required to keep compatibility on Windows.
Add a new test to verify the operation of enif_is_exception.
Modify the erl_nif man page to add a description of enif_is_exception
and also to clarify the requirements of calling the enif_make_badarg
function. If code calls enif_make_badarg, the env passed in gets set
with exception information and so the return value of the calling
function MUST be the badarg term returned from enif_make_badarg. Also
clarify that the result of enif_make_badarg may be passed only to
enif_is_exception and not to any other NIF API functions.
|
|
|
|
|
|
|
|
* pg/hipe-remove-constants-pool:
Remove hipe constants pool
OTP-9128
|
|
* bjorn/binary-overflow/OTP-9117:
Fix 18 exabyte memory allocation failure
|
|
* pg/fix-hibernate-with-hipe:
Update copyright years
Fix NULL-free bug in hibernate on debug emulator
Fix several bugs related to hibernate/3 and HiPE
Conflicts:
erts/emulator/test/hibernate_SUITE.erl
OTP-9125
|
|
|
|
|
|
* sverker/valgrind-new-suppressions:
Make halfword emulator with valgrind target allocate low memory
Add erts_alloc_permanent_cache_aligned to supress valgrind
|
|
* rickard/scheduler-wait/OTP-9105:
The emulator could get into a state where it didn't check for I/O.
|
|
Limit ERTS_MSEG_FAKE_SEGMENTS (that is otherwise set for valgrind
target) to not apply to low memory needed by halfword emulator. This
will reduce the fault detection capability of valgrind for low memory.
Also correct a bug in the initial mmap and make sure the returned
memory region does not reach into high memory.
|
|
* sverker/clarify_nif_resource_doc:
clarify NIF resource object deallocation documentation
|
|
In the erl_nif documentation, clarify how and when NIF resource
objects can be deallocated. Specifically, add focus for the case of
calling enif_release_resource immediately after obtaining a resource
term from enif_make_resource, since this is likely to be a common
approach NIFs use to manage resources.
Also fix a couple misspellings in the erl_nif documentation.
|
|
The new_binary() function takes a size argument that is an
int. In the 64-bit emulator (sizeof(int) == 4, sizeof(Uint) == 8),
any sizes >= 0x8000000 become 0xffffffff80000000 and above and
triggers a memory allocation failure.
Change the type of the size argument to Uint, and change any
callers that cast the argument to an int.
Correction-by: Jon Meredith
|
|
|
|
* bjorn/erts/fix-fun-call/OTP-9095:
erts: Initialize register that may be referenced by garbage collection
|
|
* ks/process_status:
Document exiting and garbage_collecting process statuses
OTP-9102
|
|
The call_fun() function in the BEAM emulator is supposed to
to put the fun term in the x register following the actual arguments
and environment for the fun. But if the fun is not loaded and
a call to the error_handler:undefined_lambda/3 function is set up,
the x(3) register will not be initialized.
The lack of initialization is very unlikely to cause a problem
in practice, because all of the following things must happen:
1) An unloaded fun must be called (i.e. the fun must have
been received from another node or from a file or dets table).
2) The process must be scheduled out before the call to the
error_handler:undefined_lambda/3 function can take place.
3) The process must be garbage collected before the process
is scheduled in.
4) The x(3) register must contain a stale cons or box pointer
that happens to point into the the heap of the currently
executing process. (Because of the literal pool, the GC will
never copy anything that is outside of the heap.)
I was not able to write a test case that would force an
emulator crash.
|
|
Fixing miscellaneous "things" "detected" by dialyzer.
Also updated end date for a number of erts files.
|
|
Ease the valgrind supression of memory that are permanently
allocated and then aligned up to cache line.
|
|
* sverker/dialyzer_kernel_fixes:
Fix dialyzer warning in os:start_port_srv_loop
Update preloaded modules
Fix three dialyzer warnings in kernel
|
|
* hw/erl-clarify-detached-doc:
Mention that "-detached" implies "-noinput"
OTP-9086
|
|
* ta/driver-entry-typos:
Fix a couple typos in driver_entry(3)
OTP-9085
|
|
same thread
|
|
|
|
* pan/halfword-tmp-heap-fixes/OTP-8332:
Fix assymetric (Un)UseTmpHeap in erl_process.c
Conflicts:
erts/emulator/beam/beam_emu.c
|
|
|
|
* sverker/driver_SUITE_smp_select_nice_fail/OTP-9042:
Allow unexpected driver input event in driver_SUITE:smp_select
|
|
* sverker/doc-fixes/OTP-9002:
Fix minor typos in erl_nif documentation
|
|
* pan/valgrind-3.6.0:
Make crypto.c work with valgrind 3.6 and correct cerl.src
Teach cerl to handle newer valgrind
OTP-9079
|
|
* pan/inet-so-priority-ip-tos/OTP-9069:
Add patch from Per Hedeland
Ignore permission error when implicitly setting SO_PRIORITY
|
|
|
|
Joint effort by Kostis, pan, egil & sverker
|
|
* bjorn/erts/crash-dumps/OTP-9057:
Don't dump the contents of ordered_set ets tables
Write the value "Time left" for BIF timers as an unsigned integer
|
|
* lukas/stdlib/native_escript/OTP-9076:
Update escrips to allow the -n or -compile(native) flag, which compiles the code within the escript with the +native flag. You need an HiPE enabled emulator for this to work.
|
|
|
|
|
|
* rickard/unbound/OTP-9056:
Allow bindtype unbound when no cpu topology is available
|
|
|
|
|
|
|
|
* rickard/temp_alloc_check/OTP-9028:
Verify that temp allocated memory is released
|
|
* rickard/mtx-destroy-ebusy/OTP-9009:
Send warning instead of abort on EBUSY from pthread_mutex_destroy
|
|
Due to a bug in glibc the runtime system could abort
while trying to destroy a mutex. The runtime system
will now issue a warning instead of aborting.
|
|
* rickard/poll-wake/OTP-9019:
Simplify erts_poll_wait() wakeup logic
|
|
|
|
|
|
|
|
* bjorn/erts/minor-fixes:
BEAM loader: Add an assertion to check for overflowed code space
beam_emu: Eliminate redundant #ifdef
beam_emu: Remove unnecessary decrement of I in "case_end r"
|