aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
AgeCommit message (Collapse)Author
2015-06-05Merge branch 'bjorn/kernel/cuddle-with-tests'Björn Gustavsson
* bjorn/kernel/cuddle-with-tests: Clean up rpc_SUITE:call_benchmark/1 Eliminate use of erlang:now/0 for generating random numbers Eliminate use of erlang:now/0 for measuring time Eliminate use of erlang:now/0 for generating unique node names
2015-06-05Clean up rpc_SUITE:call_benchmark/1Björn Gustavsson
The call_benchmark/1 test case is supposed to return a comment about the number of RPC calls per second, but the return value from the function that produces the comment (do_call_benchmark/4) is ignored. The test case is essentially useless except as a smoke test. Simplify the test case and correct the showing of the number of RPC calls per second, as well as eliminate the use of erlang:now/0.
2015-06-04Merge branch 'egil/cuddle-tests'Björn-Egil Dahlberg
* egil/cuddle-tests: erts: Remove remaining ?line macros in trace_meta_SUITE erts: Relax trace_meta_SUITE:on_and_off_test/1 erts: Remove ?line macro in trace_meta_SUITE:on_and_off_test/1 kernel: Remove remaining ?line macros in gen_tcp_misc_SUITE kernel: Relax gen_tcp_misc_SUITE don't wait for timeout kernel: Relax test gen_tcp_misc_SUITE:wrapping_oct/1
2015-06-04kernel: Remove remaining ?line macros in gen_tcp_misc_SUITEBjörn-Egil Dahlberg
Also, fixup some confusing indentations. This commit only contains whitespace changes and removal of ?line macros.
2015-06-02Merge branch 'nybek/fix_gen_tcp_shutdown'Zandra Hird
OTP-12797
2015-06-02Merge branch 'weiss/propagate-setopt-error'Henrik Nord
* weiss/propagate-setopt-error: Don't throw exception on prim_inet:setopt/3 error OTP-12798
2015-05-28kernel: Relax gen_tcp_misc_SUITE don't wait for timeoutBjörn-Egil Dahlberg
It's unnecessary to wait for timeout in some of these testcases. The tests should not check for stray messages while waiting for timeout, that is mostly covered by message order and pattern matching anyway.
2015-05-28kernel: Relax test gen_tcp_misc_SUITE:wrapping_oct/1Björn-Egil Dahlberg
2015-05-28Merge branch 'richcarl/warnings-by-default/OTP-12781'Björn-Egil Dahlberg
* richcarl/warnings-by-default/OTP-12781: stdlib: Use warning channel in test qlc_SUITE:otp_6964/1 stdlib: Fix testcase for qlc_SUITE kernel: Fix code_SUITE with respect to new logger default Map error logger warnings to warning messages by default
2015-05-27kernel: Fix code_SUITE with respect to new logger defaultBjörn-Egil Dahlberg
2015-05-27Update application versionsHans Bolinder
2015-05-27Eliminate use of erlang:now/0 for generating random numbersBjörn Gustavsson
2015-05-27Eliminate use of erlang:now/0 for measuring timeBjörn Gustavsson
2015-05-26Eliminate use of erlang:now/0 for generating unique node namesBjörn Gustavsson
Use erlang:unique_integer([positive]) when generating unique node names.
2015-05-26Merge branch 'nybek/limit_leading_zeros_in_ipv6_addresses'Henrik Nord
* nybek/limit_leading_zeros_in_ipv6_addresses: Fix parsing of IPv6 addresses to limit leading zeros OTP-12773
2015-05-25Merge branch 'bjorn/kernel/code-loading'Björn Gustavsson
* bjorn/kernel/code-loading: code: Eliminate dialyzer warnings for unmatched returns
2015-05-25Merge branch 'rickard/user_drv_q_bug/OTP-12239'Rickard Green
* rickard/user_drv_q_bug/OTP-12239: Fix usage of io-request queue
2015-05-22Map error logger warnings to warning messages by defaultRichard Carlsson
Also fix and document the broken +We option.
2015-05-22Merge branch 'richcarl/ac_tab-concurrency'Henrik Nord
* richcarl/ac_tab-concurrency: Use read_concurrency for application environment
2015-05-22code: Eliminate dialyzer warnings for unmatched returnsBjörn Gustavsson
We want to have the core applications of Erlang/OTP free from any dialyzer warnings. Eliminate the warnings for unmatched returns that were introduced in 7309ff4c3832.
2015-05-22Fix parsing of IPv6 addresses to limit leading zerosRory Byrne
The current implementations of inet:parse_ipv6_address/1 and inet:parse_ipv6strict_address/1 permit address strings which have an unlimited number of leading zeros. Addresses such as: "0000000000000000000000000000000ffff::" "::00000000000000000000000000000000000000000000000000000000" "::0000000f435:1" If we are using this facility to validate string representations of IPv6 addresses, then we would end up validating addresses which are non-conformant (with respect to RFC 4291 section 2.2) and potentially dangerous. This patch ensures that each segment of an IPv6 address has a maximum of 4 hex digits.
2015-05-22Merge branch 'richcarl/md5-fixes'Björn Gustavsson
* richcarl/md5-fixes: code: Correct type spec for code:make_stub_module/3
2015-05-21Update runtime dependenciesRickard Green
2015-05-20Fix usage of io-request queueRickard Green
2015-05-20Revert "Map error logger warnings to warning messages by default"Zandra Hird
This reverts commit 4c4d7fa40e5fb59854724ce74b8aa3546525cb90. This pr is causing some test failures that were missed at first.
2015-05-20Merge branch 'richcarl/warnings-by-default'Zandra Hird
* richcarl/warnings-by-default: Map error logger warnings to warning messages by default OTP-12755
2015-05-20Merge branch 'MSch/patch-1'Henrik Nord
* MSch/patch-1: Remove erlang:display/1 calls
2015-05-18Map error logger warnings to warning messages by defaultRichard Carlsson
Also fix and document the broken +We option.
2015-05-13Use read_concurrency for application environmentRichard Carlsson
2015-05-13code: Correct type spec for code:make_stub_module/3Björn Gustavsson
e47490f83e561a changed the size of Info argument tuple (third argument) for code:make_stub_module/3 from 2 to 3, but did not update the spec in code.erl.
2015-05-13Revert "Prepare release"Henrik Nord
This reverts commit e09dd66dc4d89c62ddfd8c19791f9678d5d787c6.
2015-05-12Fix gen_tcp:shutdown/2 by making it asynchronousRory Byrne
If the driver queue is empty, or the user is requesting a 'read' shutdown, then the shutdown() syscall is performed synchronously, as per the old version of shutdown/2. However, if the user is requesting a 'write' or 'read_write' shutdown, and there is data in the driver queue for the socket, then the shutdown() syscall is delayed and handled asynchronously when the driver queue is written out. This version of shutdown solves a number of issues with the old version. The two main solutions it offers are: * It doesn't block when the TCP peer is idle or slow. This is the expected behaviour when shutdown() is called: the caller needs to be able to continue reading from the socket, not be prevented from doing so. * It doesn't truncate the output. The current version of gen_tcp:shutdown/2 will truncate any outbound data in the driver queue after about 10 seconds if the TCP peer is idle of slow. Worse yet, it doesn't even inform anyone that the data has been truncated: 'ok' is returned to the caller; and a FIN rather than an RST is sent to the TCP peer. For a detailed description of all the problems with the old version of shutdown, please see the EEP Light that was written to justify this patch.
2015-05-12Prepare releaseErlang/OTP
2015-05-11Send format and args on process exit to error_loggerJosé Valim
Previously, the emulator would generate a whole string with values and call the error_logger passing "~s~n". This commit changes it to a format string containing ~p with the respective values as arguments.
2015-05-08Merge branch 'richcarl/md5-fixes'Björn Gustavsson
* richcarl/md5-fixes: Set module_info md5 for native modules properly Add module_info entry for native code Gracefully handle empty md5 field in module_info Remove 'imports' key from spec of get_module_info()
2015-05-08Fix a typoMichael Klishin
2015-05-07code: Make load_native_code_for_all_loaded/0 comply to specBjörn Gustavsson
7309ff4c38325 introduced a mismatch between load_native_code_for_all_loaded/0 and its spec. We could just delete spec, but it is cleaner to ensure that the function always returns 'ok'. Noticed-by: Tuncer Ayaz
2015-05-07Set module_info md5 for native modules properlyRichard Carlsson
Use the md5 of the native code chunk instead of the Beam code md5.
2015-05-06Merge branch 'bjorn/kernel/code-loading'Björn Gustavsson
* bjorn/kernel/code-loading: kernel application: Start code server first code: Reduce overhead of native code checking for loaded modules
2015-05-06kernel application: Start code server firstBjörn Gustavsson
When the code server has started, it will read the .beam files for all loaded modules to see whether they contain native code that should be loaded. To make that as fast as possible when we have no native code, start the code server as early as possible to minimize the number .beam files that must be read from disk. The code server does not use the 'file' module, so it is OK to start the code server before starting the file_server process. On my computer, the time for checking the loaded modules for native code is reduced from roughly 2 ms to 1.5 ms.
2015-05-06code: Reduce overhead of native code checking for loaded modulesBjörn Gustavsson
When the code server has been started, the function load_native_code_for_all_loaded/0 will check whether the .beam files for all loaded modules contain any native code. If there is native code, it will be loaded. If there is no native code, on my computer the check will take about 10 ms. That time can be reduced to about 2 ms if we replace the call to code beam_lib:chunks/2 with a call to prim_file:read_file/1 to read the file and a call to code:get_chunk/2 to check whether the chunk for native code is present. Furthermore, the entire check can be spawned off to a separate process and done in parallel with OTP starting up.
2015-05-04Merge branch 'peppe/jcl_mode_improvements'Peter Andersson
* peppe/jcl_mode_improvements: Fix problem with unitialized edlin text buffer Fix shell crash when in switch command mode OTP-12673
2015-04-30kernel: Use module erl_annoHans Bolinder
2015-04-28Merge branch 'egil/opt-instructions/OTP-12690'Björn-Egil Dahlberg
* egil/opt-instructions/OTP-12690: erts: Specialize minus and plus instruction erts: Add move2 specialization for common move patterns erts: Specialize rem instruction for common case erts: Specialize band instruction for common case erts: Batch loads and stores for move_window erts: Fix loader increment from minus instruction erts: Add move window instruction erts: Add instruction move3 for xy and xx erts: Specialize compare instructions kernel: Add instruction_count helper to erts_debug
2015-04-23kernel: Add instruction_count helper to erts_debugBjörn-Egil Dahlberg
2015-04-22Fix problem with unitialized edlin text bufferPeter Andersson
Also make it possible to copy text buffer from current group process to the JCL mode
2015-04-22Fix shell crash when in switch command modeJonas Falkevik
The user_drv process can crash if ctrl-y is pressed when in switch command mode (ctrl-g). This is due to switch mode using edlin to parse the input. And edlin uses the process dictionary to store the kill_buffer. However the kill_buffer is undefined if not initialized by edlin:init/0 which makes the user_drv process crash since edlin is calling list:reverse/2 with undefined. Fix calles edlin:init/0 once before server_loop is entered.
2015-04-22Remove erlang:display/1 callsMartin Schürrer
2015-04-20kernel: Document heart environment HEART_KILL_SIGNALBjörn-Egil Dahlberg
2015-04-09Don't throw exception on prim_inet:setopt/3 errorHolger Weiß
Let gen_tcp:controlling_process/2 and inet_sctp:connect/[45] propagate prim_inet:setopt/3 errors instead of having them generate badmatch exceptions.