Age | Commit message (Collapse) | Author |
|
|
|
|
|
When supplied without an enclosing list, bitstrings were returned
as-is instead of badarging.
|
|
|
|
The efile driver will soon be reimplemented as a BIF.
Instead of opening a port based on efile, use hd(erlang:ports()). It
is a reasonable safe assumption that the runtime will continue to use
use at least some ports.
|
|
and remove ugly encoding fallback as {fun, ...}
DFLAGS_NEW_FUN_TAGS has been supported by vm/erl_interface/jinterface
since R13 or even older.
Renamed test case obsolete_funs to term2bin_tuple_fallbacks
and removed test for {fun,...} fallback
and added missing test for bitstring fallback {Binary, Bits}.
|
|
|
|
Remove try-catch which must be for some old bitstring limitation.
|
|
|
|
|
|
such as a sub-binary, of a correct utf8 string,
that ends in the middle of a character.
|
|
(First attempt to fix in 23f132d9ab776a.)
If an synchronous GC was requested by calling:
erlang:garbage_collect(Pid, [{async,Ref}])
the reply message could in certain circumstances be
lost.
The problem is that cleanup_sys_tasks() is never called
if there are dirty tasks, but no other active system tasks.
Also shorten the long waiting times in the test case
binary_SUITE:trapping/1 to make it much more likely that
the GC have not already finished when the process is killed.
|
|
|
|
|
|
|
|
|
|
|
|
Those clause are obsolete and never used by common_test.
|
|
The macro ?t is deprecated. Replace its use with 'test_server'.
|
|
|
|
|
|
As a first step to removing the test_server application as
as its own separate application, change the inclusion of
test_server.hrl to an inclusion of ct.hrl and remove the
inclusion of test_server_line.hrl.
|
|
|
|
|
|
|
|
Replace the 'erlang:binary_to_term/1' and 'erlang:binary_to_term/2'
Erlang wrappers taking care of failure after yield with management
of this in the hidden yield BIF.
|
|
|
|
- erlang:list_to_binary/1
- erlang:iolist_to_binary/1
- erlang:list_to_bitstring/1
- binary:list_to_bin/1
|
|
- erlang:binary_to_list/1
- erlang:binary_to_list/3
- erlang:bitstring_to_list/1
|
|
* egil/test-cuddling:
tools: Refactor testcase
emulator: Increase timetrap timeout for binary_SUITE
emulator: Increase timetrap timeout for match_spec_SUITE
|
|
as it times out on some machines.
Not much point in redoing with lower input reductions when the terms
are so big we will trap several times anyway.
|
|
|
|
This change was triggered by the OSE float printing function
not working exactly the same way as linux/win32. But it is
also a good one in general as it cuts size in more than half
for floats.
|
|
* sverk/term2bin-simplify:
erts: Refactor ESTACK & WSTACK to use a struct easy to "export"
erts: Fix benign ESTACK/WSTACK typo
erts: Fix compiler warnings for NO_JUMP_TABLE
erts: Run binary_SUITE:trapping even for 32bit
erts: Extend binary_SUITE:ttb_trap to also cover binary_to_term
erts: Remove the extra_root feature from the process structure
erts: Simplify term_to_binary by removing saved ESTACK from root set
|
|
Not sure why it was disabled for 32bit in the first place?
|
|
and rename it 'trapping'.
|
|
|
|
|
|
Yielding binary_to_term.
OTP-11535
* tag 'OTP_R16B03_yielding_binary_to_term':
Increase versions for OTP_R16B03_yielding_binary_to_term
erts: Adjust term_to_binary reduction factors
erts: Yield after trapping term_to_binary if gc has been ordered
erts: Let term_to_binary disable gc while trapping
erts: Improve stress of binary_to_term in binary_SUITE
erts: Fix bug in binary_to_term for compressed on halfword
erts: Fix crash when binary_to_term throws badarg
erts: Trapping memcpy in binary_to_term
erts: Cleanup code for trapping binary_to_term
erts: Add erlang wrappers to binary_to_term
trapping uncompress
trapping size calculation
trapping binary_to_term/2
trapping STRING_EXT
trapping lists and tuples
trapping binary_to_term passing binary_SUITE
Conflicts:
erts/preloaded/ebin/erlang.beam
erts/preloaded/ebin/erts_internal.beam
erts/vsn.mk
lib/kernel/vsn.mk
lib/stdlib/vsn.mk
|
|
|
|
* sverk/trapping-bin2term:
erts: Adjust term_to_binary reduction factors
erts: Yield after trapping term_to_binary if gc has been ordered
erts: Let term_to_binary disable gc while trapping
erts: Improve stress of binary_to_term in binary_SUITE
erts: Fix bug in binary_to_term for compressed on halfword
erts: Fix crash when binary_to_term throws badarg
erts: Trapping memcpy in binary_to_term
erts: Cleanup code for trapping binary_to_term
erts: Add erlang wrappers to binary_to_term
trapping uncompress
trapping size calculation
trapping binary_to_term/2
trapping STRING_EXT
trapping lists and tuples
trapping binary_to_term passing binary_SUITE
Parallel check_process_code when code_server purge a module
Functionality for disabling garbage collection
Use asynchronous check_process_code in code_parallel_SUITE
Execution of system tasks in context of another process
Conflicts:
erts/emulator/beam/external.c
erts/emulator/beam/sys.h
erts/emulator/test/binary_SUITE.erl
erts/preloaded/ebin/erlang.beam
erts/preloaded/ebin/erts_internal.beam
|
|
by doing repeated calls with different reduction count.
|
|
|
|
<<131, 77, Len:32, Bits:8, Data/binary>>
badarg if Bits > 8
Used to return internally inconsistent bitstring
badarg if Len==0 and Bits > 0
Used to return invalid *huge* binary (size = (Uint)-1)
badarg if Bits==0 and Len > 0
Used to return valid binary as if Bits was 8
|
|
* jw/fix-float-middle-endian/OTP-11201:
Fix binary construction on floating point middle-endian machines
Fix binary matching on floating point middle-endian machines
Fix erlang:phash2() on floating point middle-endian machines
Fix external term format BIFs on floating point middle-endian machines
|
|
This complements 933e701 (OTP-10209).
Simple error example:
1> <<131,70,63,240,0,0,0,0,0,0>> = term_to_binary(1.0, [{minor_version,1}]).
** exception error: no match of right hand side value <<131,70,0,0,0,0,63,240,0,0>>
2> 1.0 = binary_to_term(<<131,70,63,240,0,0,0,0,0,0>>).
** exception error: no match of right hand side value 5.299808824e-315
But roundtrip always works:
3> 1.0 = binary_to_term(term_to_binary(1.0, [{minor_version,1}])).
1.0
|
|
|
|
|
|
This is needed as corruption of the index_uniq byte
can cause very strange behaviour when the fun is called
by native code.
|
|
|