aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2017-09-13Fix del_chars not considering wide chars and update buffer length before ↵Glauber Campinho
calling write_buf After deleting the chars the function `del_chars` was considering the code points to move the cursor back and not the graphemes
2017-09-01Make cp_pos_to_col function aware of the ANSI escape codesGlauber Campinho
This fixes the issue with the function `move_cursor` described in #1536 and that causes the bug described in https://github.com/elixir-lang/elixir/issues/6504. The function `cp_pos_to_col` maps the current position in the buffer to the correct column on the screen, but it didn't handle ANSI escape codes. Since the ANSI escape codes aren't visible, the `cp_pos_to_col` now skips them when executing the calculations using `ansi_escape_width`. This new function only considers color escape codes, but also handles invalid codes.
2017-08-28Remove time-consuming ethread_SUITE from smoke testsBjörn Gustavsson
The ethread_SUITE is unlikely to ever find a real bug introduced in a pull request, but it frequently times out when run by Travis CI.
2017-08-25Merge branch 'maint-20' into maintHenrik Nord
* maint-20: Updated OTP version Prepare release dialyzer: Fix a bug where merging PLT:s could lose info
2017-08-25Prepare releaseErlang/OTP
2017-08-25Merge branch 'rickard/btm-auto-cleanup-bug/OTP-14554' into maint-20Erlang/OTP
* rickard/btm-auto-cleanup-bug/OTP-14554: Fix BIF timer race between timeout and auto cleanup
2017-08-25Merge branch 'rickard/timer-sid-bug/OTP-14548' into maint-20Erlang/OTP
* rickard/timer-sid-bug/OTP-14548: Fix scheduler id field in timers # Conflicts: # erts/emulator/beam/erl_hl_timer.c
2017-08-24Merge branch 'rickard/btm-auto-cleanup-bug/OTP-14554' into maintRickard Green
* rickard/btm-auto-cleanup-bug/OTP-14554: Fix BIF timer race between timeout and auto cleanup
2017-08-24Merge branch 'rickard/timer-sid-bug/OTP-14548' into maintRickard Green
* rickard/timer-sid-bug/OTP-14548: Fix scheduler id field in timers Conflicts: erts/emulator/beam/erl_hl_timer.c
2017-08-24Merge branch 'maint-20' into maintRaimo Niskanen
* maint-20: Updated OTP version Prepare release Accept non-binary options as socket-options Bump version Fix broken handling of default values in extensions for PER compiler: Fix live regs update on allocate in validator Take fail labels into account when determining liveness in block ops Check for overflow when appending binaries, and error out with system_limit
2017-08-23Fix BIF timer race between timeout and auto cleanupRickard Green
2017-08-23Fix scheduler id field in timersRickard Green
2017-08-23Merge branch 'rickard/unicode-display_string/OTP-14545' into maintRickard Green
* rickard/unicode-display_string/OTP-14545: Unicode support for erlang:display_string/1
2017-08-23Unicode support for erlang:display_string/1Rickard Green
2017-08-23Merge branch 'sverker/halt-unicode-slogan/OTP-14553' into maintSverker Eriksson
* sverker/halt-unicode-slogan/OTP-14553: erts: Allow any unicode string as crash dump slogan erts: Generate crash_dump slogan string as UTF8 erts: Refactor erts_unicode_list_to_buf
2017-08-23erts: Allow any unicode string as crash dump sloganSverker Eriksson
i.e the first argument to erlang:halt
2017-08-23Prepare releaseErlang/OTP
2017-08-23Merge branch 'john/erts/fix-binary-append-syslimit/OTP-14524' into maint-20Erlang/OTP
* john/erts/fix-binary-append-syslimit/OTP-14524: Check for overflow when appending binaries, and error out with system_limit # Conflicts: # erts/emulator/test/bs_construct_SUITE.erl
2017-08-21Fix ANSI support in the consoleGlauber Campinho
The ANSI support doesn't work properly with edlin, the issue can be noticed when you try to use the history of the shell and the prompt prefix has ANSI (https://github.com/elixir-lang/elixir/issues/6448). The problem is that when a `\e` character appears, it handles it like a new line, dropping the buffer before it. The solution is to always add the `\e` to the buffer like a regular character and handle it when writing the buffer instead.
2017-08-17Merge branch 'dgud/stdlib/edit-unicode' into maintDan Gudmundsson
* dgud/stdlib/edit-unicode: stdlib: Improve edlin handling of unicode chars OTP-14542
2017-08-16Merge branch 'lukas/erts/fix_dirty_trace_message_flush/OTP-14538' into maintLukas Larsson
* lukas/erts/fix_dirty_trace_message_flush/OTP-14538: erts: Must have main lock when flushing trace messages
2017-08-16stdlib: Improve edlin handling of unicode charsDan Gudmundsson
Let edlin handle grapheme clusters instead of codepoints to improve the handling multi-codepoints characters. The ttsl driver (and protocol) still expects all lengths as codepoints. Previously it was expected that each codepoint used (at least) one terminal column for each codepoint, and a hack was made for wide characters (multicolumn) by patching in TAGGED characters to occupy the extra space so that codepoint index was equal column index. This didn't work at all for combining codepoints that do not occupy any more space than the previous character. Improved this handling by calculating column positions in move_cursor. This is based on wcwidth() and is not perfect, wcwidth() is wrong for some codepoints and wcwidth() can not know with Hangul graphemes for example. But it works better than before without making a major change in the protocol.
2017-08-01Check for overflow when appending binaries, and error out with system_limitJohn Högberg
This fixes the following bug: A = <<0:((1 bsl 32)-8)>>, B = <<2, 3>>. B =:= <<A/binary,1,B/binary>>. %% Evaluated to true...
2017-07-27Merge branch 'maint-20' into maintJohn Högberg
* maint-20: Updated OTP version Update release notes Update version numbers Fix doc for the 'quiet' option; it defaults to false asn1: Fix missing quotes of external encoding call Add a dedicated close function for TCP ports to prevent issues like ERL-430/448 Close TCP ports properly on send timeout erts: Add missing release note
2017-07-26Update release notesErlang/OTP
2017-07-26Update version numbersErlang/OTP
2017-07-26Merge branch 'sverker/big-bxor-bug/ERL-450/OTP-14514' into maint-20Erlang/OTP
* sverker/big-bxor-bug/ERL-450/OTP-14514: erts: Fix bug in bxor of a big negative number
2017-07-26Merge branch 'john/erts/fix-tcp-send-timeout/OTP-14509/ERL-448' into maint-20Erlang/OTP
* john/erts/fix-tcp-send-timeout/OTP-14509/ERL-448: Add a dedicated close function for TCP ports to prevent issues like ERL-430/448 Close TCP ports properly on send timeout
2017-07-25Merge branch 'sverker/enif_whereis-bug/OTP-14523' into maintSverker Eriksson
* sverker/enif_whereis-bug: erts: Fix bug in enif_whereis_pid/port
2017-07-25Merge branch 'john/erts/use-lock-flags-in-lc' into maintJohn Högberg
2017-07-13Merge branch 'sverker/big-bxor-bug/ERL-450/OTP-14514' into maintSverker Eriksson
* sverker/big-bxor-bug/ERL-450/OTP-14514: erts: Fix bug in bxor of a big negative number
2017-07-12erts: Fix bug in bxor of a big negative numberSverker Eriksson
Wrong result for (X bsl WS) bxor Y. where X is any negative integer Y is any integer that does not require more words than X WS is erlang:system_info(wordsize) or larger Fix: The subtraction of 1 (for 2-complement conversion) must be carried along all the way to the last words.
2017-07-11erts: Fix bug in enif_whereis_pid/portSverker Eriksson
that could cause heap corruption if whereis lookup conflicts with other register updater AND other thread sends on-heap message while main lock is released. Also improved enif_whereis from dirty nifs by passing c_p as NULL.
2017-07-11Fix building debug emulator on windowsJohn Högberg
CFLAGS weren't updated to include the sys/common directory for this build target.
2017-07-11Use erl_lock_flags in lock checkingJohn Högberg
2017-07-10Add a dedicated close function for TCP ports to prevent issues like ERL-430/448John Högberg
2017-07-10Close TCP ports properly on send timeoutJohn Högberg
2017-07-07Add a proper type for lock optionsJohn Högberg
2017-07-06erts: Generate crash_dump slogan string as UTF8Sverker Eriksson
the same as atoms.
2017-07-06Merge branch 'john/erts/runtime-lcnt' into maintJohn Högberg
* john/erts/runtime-lcnt: Document rt_mask and add warnings about copy_save Add an emulator test suite for lock counting Break erts_debug:lock_counters/1 into separate BIFs Allow toggling lock counting at runtime Move lock flags to a common header Enable register_SUITE for lcnt builds Enable lcnt smoke test on all builds that have lcnt enabled Make lock counter info independent of the locks being counted OTP-14412 OTP-13170 OTP-14413
2017-07-06Add an emulator test suite for lock countingJohn Högberg
OTP-14413
2017-07-06Break erts_debug:lock_counters/1 into separate BIFsJohn Högberg
2017-07-06Allow toggling lock counting at runtimeJohn Högberg
The implementation is still hidden behind ERTS_ENABLE_LOCK_COUNT, and all categories are still enabled by default, but the actual counting can be toggled at will. OTP-13170
2017-07-06Move lock flags to a common headerJohn Högberg
2017-07-06Enable register_SUITE for lcnt buildsJohn Högberg
It was disabled for performance reasons, and the new implementation handles it just fine (roughly half as fast as without lcnt).
2017-07-06Merge branch 'sverker/prealloc-race-bug/maint' into maintSverker Eriksson
* sverker/prealloc-race-bug/maint: erts: Increase pre-allocated blocks #ifdef DEBUG
2017-07-06erts: Refactor erts_unicode_list_to_bufSverker Eriksson
to get bytes written when truncated.
2017-07-04macOS: Fix problems loading cryptoBjörn Gustavsson
On macOS, it was not possible to start crypto after running observer. (ERL_251) On the beta of macOS 10.13 (High Sierra), crypto does not work at all. (ERL-439) The problem is that the use of the -flat_namespace option when linking dynamic drivers such as the one for crypto. With that option, all function names must be unique among all linked libraries and frameworks, or the wrong function could be called. Resolve the problem by using the two-level namespace as recommended by Apple. We need to use the -bundle_loader option to point out beam.smp when building all drivers and NIF libraries. https://bugs.erlang.org/browse/ERL-251 https://bugs.erlang.org/browse/ERL-439
2017-07-04erts: Add missing release noteSverker Eriksson
2017-07-04Merge branch 'maint-20' into maintJohn Högberg
* maint-20: Updated OTP version Update release notes Update version numbers erts: Fix bug in quick alloc Fix old length usage in string stdlib: Fix bug in proc_lib Support arbitrary crash report in proc_lib.