Age | Commit message (Collapse) | Author |
|
The io_list_len() function returns an int, where a negative return
value indicates a type error. One problem is that an int only consists
of 32 bits in a 64-bit emulator. Changing the return type to Sint
will solve that problem, but in the 32-bit emulator, a large iolist
and a iolist with a type error will both return a negative number.
(Noticed by Jon Meredith.)
Another problem is that for iolists whose total size exceed the
word size, the result would be truncated, leading to a subsequent
buffer overflow and emulator crash.
Therefore, introduce the new erts_iolist_size() function which
returns a status indication and writes the result size through
a passed pointer. If the result size does not fit in a word,
return an overflow indication.
|
|
Also rename the fun_to_port/1 test case to outputv_errors/1 and
test sending more kinds of bad data to an outputv-enabled driver.
|
|
io_list_vec_len() is slightly more general than it needs to be.
Specifically:
* The only caller always passes ERL_SMALL_IO_BIN_LIMIT as the
value for the bin_limit parameter, so the bin_limit parameter
can be eliminated.
* The only caller never passes any NULL pointers, so there is
no need test the pointers before writing through them.
|
|
iolist_size/1 would silently return a truncated result for iolists
whose size exceeded the word size. For example:
iolist(lists:duplicate(256, <<0:(1 bsl 24)/unit:8>>)).
would return 0 (instead of 4294967296 or 1 bsl 32).
Rewrite iolist_size/1 to accumulate the size in a bignum if
necessary and result the correct result.
|
|
|
|
In older releases of Erlang/OTP, the '=:=' operator could run out
of stack if used to compare very deep lists. Since that problem
has been fixed, we can remove the workaround used in the deep/1
test case.
|
|
* ta/driver_entry-typo:
driver_entry: Remove gratuitous paren and fix typo
OTP-9254
|
|
* ms/unsigned-integer-overflow-in-error:
Unsigned integer may overflow in error message
OTP-9251
|
|
* ms/file-fix-hang-reading-compressed-files:
file: fix hang reading compressed files
OTP-9245
|
|
* sverker/code_SUITE-false_dependency-bug:
Fix bug in test case code_SUITE:false_dependency
|
|
* sverker/enif_is_exception/OTP-9150:
add support for checking if an ERL_NIF_TERM is an exception
|
|
* sverker/erts_printf-halfword:
erts_printf %be to print integers of size Eterm
Fix use of type BeamInstr in hipe_debug.c
Conflicts:
erts/emulator/hipe/hipe_debug.c
|
|
|
|
Conflicts:
erts/vsn.mk
|
|
* rickard/process-status/OTP-9197:
Fix thread unsafe access
Fix lost wakeup when process garbage collected by other
Only set status P_WAITING when needed
Add testcase for process_info() badarg bug
|
|
Fix thread unsafe access to process status field introduced in OTP-9125.
|
|
|
|
The status of a process was unnecessarily set to waiting before
the process was enqueued in a run queue. This bug was harmless
up until OTP-R14B01. In OTP-R14B02 erlang:hibernate/3 was fixed
(OTP-9125). After the introduction of OTP-9125, the previously
harmless process status bug sometimes caused erroneous badarg
exceptions from process_info().
|
|
|
|
* ta/erts-unused-vars:
erts: Remove unused variables
OTP-9205
|
|
The gzio driver goes into an infinite loop when reading past the end of
a compressed file.
Reported-By: Alex Morarash
|
|
|
|
|
|
Causing out-of-memory on halfword emulator.
|
|
* ks/hipe-ppc64:
Enable HiPE by default when compiling for PPC64
Translate RTL to PPC code on PPC64 too
Changes in ppc files for PPC64
Additions for the PPC64 backend
Changes for the PPC64 backend
Added loader for ppc64
New files for the 64-bit backends
Cleanup tags
OTP-9198
|
|
* egil/estone-exported-fix:
Fix unexported function in estone testcase
|
|
|
|
|
|
* hw/call-chmod-without-f:
Call chmod without the "-f" flag
Conflicts:
erts/emulator/test/Makefile
lib/asn1/test/Makefile
lib/crypto/test/Makefile
lib/debugger/test/Makefile
lib/docbuilder/test/Makefile
lib/edoc/test/Makefile
lib/erl_interface/test/Makefile
lib/inviso/test/Makefile
lib/parsetools/test/Makefile
lib/percept/test/Makefile
lib/ssl/test/Makefile
lib/syntax_tools/test/Makefile
lib/test_server/test/Makefile
lib/tools/test/Makefile
OTP-9170
|
|
Calling a BIF thaf is called as a function (such as process_info/{1,2})
would leave a non-zero value in c_p->cp, which would lead to
duplicate entries in the stacktrace.
|
|
For some historical reason, the transformation of a func_info/3
instruction to the internal i_func_info/4 instruction is more
involved than it needs to be. Remove the gen_func_info() function
in the loader and use a simple transformation.
|
|
* pan/valgrind_xml_log:
Make xml valgrind messages end up in xml log
OTP-9079
|
|
* pan/tcp_send_timeout/OTP-9145:
Add testcase
Teach tcp_recv not to cancel send timer
|
|
* pan/system_info_procs_crash/OTP-9140:
Make erts_printf %T not recurse on C stack
Corrected fd_driver and cleaned up some really old code in win32/sys.[ch]
|
|
pan/valgrind_xml_log
|
|
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.
|
|
|
|
|
|
|
|
|
|
Existing %bp to print pointer size integers does not work in halfword
emulator to print Eterm size integers.
|
|
|
|
|
|
|
|
|
|
* 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
|
|
|
|
|