aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2018-03-05Merge branch 'john/erts/efile_SUITE-iter-max-files-stability'John Högberg
* john/erts/efile_SUITE-iter-max-files-stability: Make efile_SUITE:iter_max_files more stable
2018-03-02erts: Correctly ignore +secio trueLukas Larsson
This is a fix for a bug introduced in 22cde2bda
2018-03-01Make efile_SUITE:iter_max_files more stableJohn Högberg
2018-02-28Merge branch 'john/erts/allow-opening-device-files/OTP-11462'John Högberg
* john/erts/allow-opening-device-files/OTP-11462: Allow opening device files and FIFOs with file:open/2
2018-02-28Merge branch 'john/erts/binary-bin_to_list-performance-fix/OTP-14741'John Högberg
* john/erts/binary-bin_to_list-performance-fix/OTP-14741: Replace binary:bin_to_list CIF implementation with binary_to_list
2018-02-27Merge branch 'sverker/master/erts/more-crash-dump-info/OTP-14820'Sverker Eriksson
2018-02-26Merge branch 'maint'Sverker Eriksson
2018-02-26Merge branch 'sverker/enif_self-doc' into maintSverker Eriksson
* sverker/enif_self-doc: erts: Clarify enif_self docs
2018-02-26Merge branch 'maint'Lukas Larsson
2018-02-26Merge branch 'lukas/kernel/dist_SUITE_corefile_ignore' into maintLukas Larsson
* lukas/kernel/dist_SUITE_corefile_ignore: kernel: Ignore cores in erl_distribution_SUITE
2018-02-26Merge branch 'maint'Lukas Larsson
Conflicts: erts/emulator/beam/erl_trace.c
2018-02-26Merge branch 'lukas/erts/dirty_trace_clean_fix/OTP-14938' into maintLukas Larsson
* lukas/erts/dirty_trace_clean_fix/OTP-14938: erts: Delay cleanup of removed tracer on dirty scheds
2018-02-26Replace binary:bin_to_list CIF implementation with binary_to_listJohn Högberg
binary:bin_to_list had a poor implementation that resulted in excessive garbage collection. binary_to_list is almost identical and has a generally better implementation, so I've replaced binary:bin_to_list's CIF with a thin wrapper around binary_to_list. Granted, binary_to_list has a deprecated indexing scheme, but we're unlikely to ever remote it entirely and it's somewhat easy to move it to the 'binary' module later on.
2018-02-26erts: Delay cleanup of removed tracer on dirty schedsLukas Larsson
It is not simple to do the correct de-allocation on a dirty schedulers, so we just delay it until this process runs on a normal scheduler.
2018-02-26Allow opening device files and FIFOs with file:open/2John Högberg
To the best of our knowledge this was introduced since file operations on device files/FIFO:s could hang the emulator forever back when the emulator was single-threaded and lacked IO threads; a read operation could block all progress preventing the write operation it waited for from occurring. Granted, this could still happen through starving all dirty IO schedulers, but the same issue can arise with NFS files which we've always allowed. Removing this restriction also lets us remove a stat(2) call that was added to specifically allow `/dev/null`.
2018-02-26Merge branch 'john/erts/nif-binary-iovec-fixes/OTP-14845/OTP-14931/OTP-14932'John Högberg
* john/erts/nif-binary-iovec-fixes/OTP-14845/OTP-14931/OTP-14932: Suggest using enif_make_new_binary when possible Make enif_make_binary return heap binaries if possible Expand ErlNifBinary by another word for future additions Unconditionally transfer ownership to the created term Tweak asserts and explain why the copy buf doesn't use the tmp obj list Free temporary iovecs through the tmp object list Add a helper function for attaching tmp objects to NIF environments
2018-02-26Suggest using enif_make_new_binary when possibleJohn Högberg
While enif_make_binary will create heap-binaries from ErlNifBinaries when possible now, enif_alloc_binary still allocates a Binary* off-heap which is avoided entirely with enif_make_new_binary.
2018-02-26Make enif_make_binary return heap binaries if possibleJohn Högberg
This does not avoid allocating a ProcBin since we still need to release the binary somehow (and using the tmp obj list is slightly slower since it's an unavoidable off-heap allocation), but it does give us a hard limit on how long said ProcBin will live, which is a lot better than before. OTP-14845
2018-02-26Expand ErlNifBinary by another word for future additionsJohn Högberg
When fixing OTP-14931/14932 we had to settle for a solution that decreased performance in a few corner cases like multiple calls to enif_make_binary, as the other options on the table required extra fields which would have broken ABI compatibility. This is ABI-compatible since the fields are unused and at the end.
2018-02-26Unconditionally transfer ownership to the created termJohn Högberg
This fixes two corner-cases: 1) We will no longer return an invalid term when a binary inspected on environment A is used in enif_make_binary on environment B 2) A double-free in this sequence of events: * enif_alloc_binary(size, &bin); * enif_ioq_enq_binary(ioq, &bin, skip); * enif_make_binary(env, &bin); * enif_make_binary(env, &bin); OTP-14931 OTP-14932
2018-02-26Tweak asserts and explain why the copy buf doesn't use the tmp obj listJohn Högberg
2018-02-26Free temporary iovecs through the tmp object listJohn Högberg
Attaching to a ProcBin is the fastest way to delay the release of an already allocated Binary, but alloc_tmp_obj is a lot faster when starting from scratch since it usually uses temp_alloc.
2018-02-23Add a helper function for attaching tmp objects to NIF environmentsJohn Högberg
2018-02-23erts: Clarify enif_self docsSverker Eriksson
2018-02-22Merge 'sverker/erts/more-crash-dump-info/OTP-14820'Sverker Eriksson
2018-02-22erts,observer: Add port-suspended pids to crash dumpSverker Eriksson
2018-02-22erts,observer: Add port states and flags to crash dumpSverker Eriksson
2018-02-22Add ets:whereis/1 for resolving table names -> tid()John Högberg
2018-02-21Merge PR-1708 from philipstears OTP-14934Sverker Eriksson
Optimize non-strict equality check of binaries differing in size
2018-02-20erts,observer: Add dirty schedulers to crash dumpSverker Eriksson
2018-02-20Merge branch 'maint'Sverker Eriksson
2018-02-20Merge PR-1716 from sverker/slash-in-modules/ERL-564/OTP-14933Sverker Eriksson
Reject loading modules with slash in name
2018-02-20erts,observer: Add more port info to crash dumpSverker Eriksson
2018-02-20erts: Cleanup dump_process_info()Sverker Eriksson
by testing F_SENSITIVE only once.
2018-02-20erts: Include failing garbing process in crash dumpSverker Eriksson
Exclude garbing processes, EXCEPT if run by crash dumping thread in which case we assume the heap is healthy without any move markers yet/left. Switched order between (allocating) setup_rootset() and (move marking) collect_live_heap_frags().
2018-02-20erts: Remove unused args to collect_live_heap_fragsSverker Eriksson
2018-02-20erts: Add binary vheap sizes to crash dumpSverker Eriksson
2018-02-19Merge branch 'maint'John Högberg
2018-02-19Merge branch 'john/erts/fix-iolist-bitstring-badarg/OTP-14926' into maintJohn Högberg
2018-02-19Merge branch 'john/erts/fix-iovec-unaligned-binaries/OTP-14921' into maintJohn Högberg
2018-02-19Merge branch 'john/erts/ctx-to-binary-size-assert'John Högberg
2018-02-15badarg on iolist_to_binary(Bitstring)John Högberg
When supplied without an enclosing list, bitstrings were returned as-is instead of badarging.
2018-02-15Handle unaligned binaries in enif_inspect_iovecJohn Högberg
2018-02-15Handle unaligned binaries in erlang:iolist_to_iovec/1John Högberg
A binary is a binary as long as its size in bits is evenly divisible by 8, regardless of whether it has a bit offset or not.
2018-02-15badarg on iolist_to_iovec(Bitstring)John Högberg
When supplied without an enclosing list, bitstrings were silently truncated to [] instead of badarging.
2018-02-15Test badarg when an improper list tail contains a bitstringJohn Högberg
This has always worked but we lacked test coverage for it.
2018-02-15kernel: Reject load of module names with slashSverker Eriksson
or backslash on Windows. Purpose: Prevent tricks to get hostile code running.
2018-02-14Merge branch 'sverker/gc-move-opt'Sverker Eriksson
2018-02-13Use smaller inputs in iovec testsJohn Högberg
Huge inputs weren't particularly useful and took forever to run, so this commit winds it down to a more sane level that still causes lots of yielding.
2018-02-13Merge branch 'maint'Sverker Eriksson
* maint: Updated OTP version Update release notes Update version numbers kernel: Add os:cmd/2 with max_size option # Conflicts: # OTP_VERSION # lib/kernel/doc/src/os.xml # lib/kernel/src/os.erl