aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2018-01-15Merge branch 'sverker/cuddle-big-bin-tests' into maintSverker Eriksson
2018-01-15Merge branch 'sverker/term_to_binary-spec/ERL-548/OTP-14876' into maintSverker Eriksson
2018-01-15erts: Refactor and cleanup sys_double_to_chars_fastSverker Eriksson
Replace long long with Uint64
2018-01-15erts: Fix float_to_list(F, [{decimals,D}]).Sverker Eriksson
Example symptom: 1> float_to_list(0.145, [{decimals,1}]). "0.2" There were two problems in sys_double_to_chars_fast 1. Most serious was adding 0.55555555 / (10^D) instead of 0.5 / (10^D) which imposed a 5.5% risk of a faulty rounding up. 2. Using fixpoint for frac_part which lost significant bits if F < 0.5
2018-01-15erts: Fix buffer overflow bug in erts_printf %fSverker Eriksson
Sign character was not accounted for. Ex: float_to_list(-3.1265538967899625e+69, [{decimals,16}]).
2018-01-15stdlib: Handle Unicode when formatting stacktracesHans Bolinder
See also ERL-553 and ERL-544 (commit c3ddb0f).
2018-01-11Merge branch 'maint'Rickard Green
* maint: Fix encoding of filenames in stacktraces
2018-01-11Merge branch 'rickard/file-encoding-stacktraces/OTP-14847/ERL-544' into maintRickard Green
* rickard/file-encoding-stacktraces/OTP-14847/ERL-544: Fix encoding of filenames in stacktraces
2018-01-11Fix encoding of filenames in stacktracesRickard Green
2018-01-11Merge branch 'maint'Rickard Green
* maint: Do not add -lz to LIBS; keep it in Z_LIB
2018-01-11Merge branch 'rickard/libs-libz/ERL-529/OTP-14840' into maintRickard Green
* rickard/libs-libz/ERL-529/OTP-14840: Do not add -lz to LIBS; keep it in Z_LIB
2018-01-11Merge branch 'john/erts/remove-sender-punishment/OTP-14667'John Högberg
2018-01-09stdlib: Improve erl_eval's stacktracesHans Bolinder
The call "erlang:get_stacktrace()" is not handled explicitly. If there are issues, they can probably be ignored since erlang:get_stacktrace/1 will be deprecated and removed.
2018-01-09erts: Fix term_to_binary/2 specSverker Eriksson
2018-01-08Remove sender punishmentJohn Högberg
The reduction cost of sending messages is now constant and will no longer scale according to the length of the receiving process' message queue.
2018-01-08Merge branch 'john/erts/putenv-thread-safety/OTP-14666'John Högberg
2018-01-05erts: Refactor more usage of erts_build_proc_binSverker Eriksson
2018-01-04erts: Add non fatal big binary creation for test purposeSverker Eriksson
2018-01-04erts: Refactor ProcBin creationSverker Eriksson
into utility functions.
2018-01-03Fail if ':' is passed to binary_to_integer/2Frank Hunleth
Before: 1> binary_to_integer(<<":">>, 16). 3 After: 1> binary_to_integer(<<":">>, 16). ** exception error: bad argument in function binary_to_integer/2 called as binary_to_integer(<<":">>,16) Prior to this change, both list_to_integer/2 and binary_to_integer/2 would convert strings with values between ASCII '9' up to '0'+base for base > 10. For example, when converting in base 16, you could pass ':', ';', '<', '=', '>', and '?' without getting an exception. This was due to a missing check in c2int_is_invalid_char(). This change adds the missing check and a regression test for passing ':'. It also simplifies the code and tightens up an out-of-bounds check to make it off-by-one rather than off-by-two.
2018-01-03Merge branch 'maint'Sverker Eriksson
2018-01-03Merge PR-1664 from sverker/sverker/hipe-bs_put_utf8-gc-bug OTP-14850Sverker Eriksson
Fix GC bug for HiPE primop bs_put_utf8
2018-01-03Add PRIMOP_ABI_VSN to erts checksumSverker Eriksson
in order to detect incompatible changes in primop interface (which we just did for bs_put_utf8) and refuse hipe loading.
2018-01-03Fix bug in hipe primop bs_put_utf8Sverker Eriksson
by preventing it from doing GC, which generated code relies on.
2018-01-03Document that os:putenv/2 and putenv(3) modify different environmentsJohn Högberg
This is *ONLY* relevant for drivers/NIFs, so it's probably counter- productive to document it elsewhere.
2018-01-03Disallow NULs in filename-encoded stringsJohn Högberg
Previously we accepted trailing NULs, which was backwards compatible as such usage never resulted in misbehavior in the first place. The downside is that it prevented erts_native_filename_need from returning an accurate number of *actual characters*, needlessly complicating encoding-agnostic code like erts_osenv.
2018-01-03Alter erl_ddll:load dependency search path on WindowsJohn Högberg
The standard search order does not include the directory that the loaded DLL resides in, requiring dirty $PATH hacks to get things working, which is not an option now that os:putenv/2 is divorced from the OS environment.
2018-01-03Replace the libc environment with a thread-safe emulationJohn Högberg
putenv(3) and friends aren't thread-safe regardless of how you slice it; a global lock around all environment operations (like before) keeps things safe as far as our own operations go, but we have absolutely no control over what libc or a library dragged in by a driver/NIF does -- they're free to call getenv(3) or putenv(3) without honoring our lock. This commit solves this by setting up an "emulated" environment which can't be touched without going through our interfaces. Third-party libraries can still shoot themselves in the foot but benign uses of os:putenv/2 will no longer risk crashing the emulator.
2017-12-21Merge branch 'maint'Sverker Eriksson
2017-12-21Merge branch 'sverker/cuddle-valgrind' into maintSverker Eriksson
2017-12-20erts: Add more stats for mbcs_poolSverker Eriksson
similar to the ones in OTP-19.2.3.1
2017-12-20erts: Fix alloc_SUITE:migrationSverker Eriksson
It crashed due to recursive calls to alloc_util in carrier initialization test callback.
2017-12-20erts: Improve carrier pool searchSverker Eriksson
* Give back carrier to owner when put in pool with use of dd-queue. * Replace pooled_list with pooled_tree for more efficient search of all owned pooled carriers. * Remove traitor_list as it does not serve much purpose anymore. * Add HOMECOMING bit flag in crr->allctr atomic to (1) avoid double enqueue into dd-enqueue. (2) trigger read barrier in get_used_allctr for newly received carriers.
2017-12-20erts: Improve alloc_SUITE:migrationSverker Eriksson
to mix it up with some realloc calls.
2017-12-20erts: Refactor carrier dealloc migrationSverker Eriksson
by adding a dedicated 'homecoming_dd_block' to use in dd-queue. + Preparation for dd-queue-migration of non-empty carriers. + Get rid of ugly hack where blk->carrier pointer is overwritten by dd-queue and then have to be restored.
2017-12-19Merge branch 'sverker/cleanup-some-ERTS_SMP'Sverker Eriksson
2017-12-19Merge branch 'dgud/kernel/refc_sched_wall_time/OTP-11694'Dan Gudmundsson
* dgud/kernel/refc_sched_wall_time/OTP-11694: test: spawn scheduler_wall_time flag holder Turn on scheduler_wall_time in an alive process Redirect system_flag(scheduler_wall_time,_) to kernel_refc kernel: add a resource reference counter
2017-12-19Redirect system_flag(scheduler_wall_time,_) to kernel_refcRickard Green
2017-12-18Do not add -lz to LIBS; keep it in Z_LIBRickard Green
2017-12-14Merge pull request #1653 from tonyrog/makedep_side_effectBjörn Gustavsson
Add -MMD option to erlc OTP-14830
2017-12-13erts: Add core dumps from valgrind to z_SUITE searchSverker Eriksson
2017-12-13Merge branch 'maint'Henrik Nord
2017-12-12erts: Trim driver_SUITE:smp_select for slow valgrindSverker Eriksson
Symptom: "Closing pipe in state Waiting. Event lost?" Snake oil: Do erlang:yield() instead of busy spinning in "Waiting" state.
2017-12-12erts: Remove some straggling ERTS_SMPSverker Eriksson
2017-12-08Update release notesErlang/OTP
2017-12-08Update version numbersErlang/OTP
2017-12-08Merge pull request #1634 from bjorng/bjorn/get_stacktrace-syntax/OTP-14692Björn Gustavsson
Add syntax in try/catch to retrieve the stacktrace directly
2017-12-07Merge branch 'john/erts/fix-invalid-name-xlat'John Högberg
2017-12-06"Fix" tracing of dirty NIFs on debug buildsJohn Högberg
When a dirty NIF is executed a "schedule in" trace event is generated, which may in turn result in a generic system task being created, causing the process to be scheduled out as it can't run dirty with pending tasks. This is usually fine since said system task is seldom created, but ERTS_FORCE_ENIF_SEND_DELAY was de-facto always on for debug builds, causing the process to bounce between dirty and normal schedulers forever. This commit is not a complete fix and it can go off the rails even on normal builds; if there's a lot of dirty jobs lined up and the receiver's msgq lock happens to be busy at the wrong time, the additional trace messages generated through this will hammer the lock and keep everything bouncing.
2017-12-06Add translation for ERROR_INVALID_NAMEJohn Högberg
Most functions return this if they're given an invalid path, eg. if they contain "<" or ">". ENOENT may seem like a strange translation, but that's what open(2) returns when fed garbage, so we'll roll with that.