aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
AgeCommit message (Collapse)Author
2015-10-26Update primary bootstrapIngela Anderton Andin
2015-10-26erts: Add {line_delimiter, byte()} option to inet:setopts/2Serge Aleynikov
A new {line_delimiter, byte()} option allows line-oriented TCP-based protocols to use a custom line delimiting character. It is to be used in conjunction with {packet, line}. This option also works with erlang:decode_packet/3 when its first argument is 'line'.
2015-10-12Merge branch 'maint'Zandra
2015-10-12Merge branch 'stolen/unified_dist' into maintZandra
OTP-13040 * stolen/unified_dist: kernel: inet6_tcp_dist: reuse inet_tcp_dist code Conflicts: lib/kernel/src/inet_tcp_dist.erl
2015-10-08Update Kernel and STDLIBHans Bolinder
Record field types have been modified due to commit 8ce35b2: "Take out automatic insertion of 'undefined' from typed record fields".
2015-10-08Merge branch 'maint'Björn Gustavsson
* maint: Avoid always updating inet_dns in the primary bootstrap
2015-10-05Avoid always updating inet_dns in the primary bootstrapBjörn Gustavsson
The include file inet_dns_record_adts.hrl is generated by the Perl script inet_dns_record_adts.pl in a non-deterministic way. That is, every time the script is run, the functions will be in a different order. That will cause inet_dns.beam in the primary bootstrap to be updated every time the bootstrap is updated, even though there is no actual code change. Modify the Perl script to sort the keys pulled out from hashes to make the order deterministic.
2015-09-21Merge branch 'maint'Hans Bolinder
* maint: Update application versions
2015-09-18Update application versionsHans Bolinder
2015-07-10ose: Remove all code related to the OSE portLukas Larsson
The OSE port is no longer supported and this commit removed it and any changes related to it. The things that were general improvements have been left in the code.
2015-06-18Change license text to APLv2Bruce Yinhe
2015-06-17Merge branch 'nybek/fix_so_linger_zero__simple'Raimo Niskanen
* nybek/fix_so_linger_zero__simple: Update prim_inet.beam Fix socket option {linger, {true, 0}} to abort TCP connections Apply 'show_econnreset' socket option to send errors as well Add 'show_econnreset' TCP socket option
2015-06-16Fix typo in commentYuki Ito
2015-06-10Merge branch 'egil/fix-cover-error_logger/OTP-12818'Björn-Egil Dahlberg
* egil/fix-cover-error_logger/OTP-12818: cover: Unstick modules before loading remote kernel: Add module name to sticky_dir error message kernel: Remove ?line macros in error_logger_warn_SUITE
2015-06-10Merge branch 'richcarl/avoid-try-native-load'Henrik Nord
* richcarl/avoid-try-native-load: Update list of funcalls in kernel code_SUITE Move architecture knowledge out of hipe loader Avoid repeated calls to system_info in hipe loader Avoid exception overhead if HiPE is disabled HiPE help shouldn't modify the calling process OTP-12816
2015-06-09Add 'show_econnreset' TCP socket optionRory Byrne
An ECONNRESET is a socket error which tells us that a TCP peer has sent an RST. The RST indicates that they have aborted the connection and that the payload we have received should not be considered complete. Up until now, the implementation of TCP in inet_drv.c has hidden the receipt of the RST from the user, treating it as though it was just a FIN terminating the read side of the socket. There are many cases where user code needs to be able to distinguish between a socket that was closed normally and one that was aborted. Setting the option {show_econnreset, true} enables the user to receive ECONNRESET errors on both active and passive sockets. A connected socket returned from gen_tcp:accept/1 will inherit the show_econnreset setting of the listening socket. By default this option is set to {show_econnreset, false}. Note that this patch only enables the reporting of ECONNRESET when the socket is being read from. It does not report ECONNRESET (or EPIPE) when the user tries to write to a connection when an RST has already been received. Currently the TCP implementation in inet_drv.c hides all such send errors from the user in favour of returning {error, close}. A separate patch will be needed to enable the reporting of such errors.
2015-06-08kernel: Add module name to sticky_dir error messageBjörn-Egil Dahlberg
2015-06-08kernel: Fix inet time conversionBjörn-Egil Dahlberg
2015-06-04Move architecture knowledge out of hipe loaderRichard Carlsson
Make code_server be responsible for finding the architecture and deciding whether to try to load native code, in order to avoid repeated calls to system_info(hipe_architecture) and clumsy uses of try/catch to test if hipe is enabled.
2015-06-04Avoid repeated calls to system_info in hipe loaderRichard Carlsson
Make hipe_unified_loader not call system_info(hipe_architecture) repeatedly. Also clean up some ugly architecture-dependent case switches.
2015-06-04Avoid exception overhead if HiPE is disabledRichard Carlsson
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-27Update application versionsHans Bolinder
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-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-20Merge branch 'MSch/patch-1'Henrik Nord
* MSch/patch-1: Remove erlang:display/1 calls
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-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-05-02kernel: inet6_tcp_dist: reuse inet_tcp_dist codeDanil Zagoskin
inet6_tcp_dist module is an old copy of inet_tcp_dist with changed address family. New features (such as listening port range, interface and generic options) are implemented in inet_tcp_dist only, inet6_tcp_dist looks abandoned (it does not even have tests). This patch makes inet_tcp_dist internals work with abstract driver, and inet6_tcp_dist becomes just a thin wrapper for it.
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-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.
2015-03-20Merge branch 'rickard/time_api/OTP-11997'Rickard Green
* rickard/time_api/OTP-11997: (22 commits) Update primary bootstrap inets: Suppress deprecated warning on erlang:now/0 inets: Cleanup of multiple copies of functions Add inets_lib with common functions used by multiple modules inets: Update comments Suppress deprecated warning on erlang:now/0 Use new time API and be back-compatible in inets Remove unused functions and removed redundant test asn1 test SUITE: Eliminate use of now/0 Disable deprecated warning on erlang:now/0 in diameter_lib Use new time API and be back-compatible in ssh Replace all calls to now/0 in CT with new time API functions test_server: Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API otp_SUITE: Warn for calls to erlang:now/0 Replace usage of erlang:now() with usage of new API Multiple timer wheels Erlang based BIF timer implementation for scalability Implement ethread events with timeout ... Conflicts: bootstrap/bin/start.boot bootstrap/bin/start_clean.boot bootstrap/lib/compiler/ebin/beam_asm.beam bootstrap/lib/compiler/ebin/compile.beam bootstrap/lib/kernel/ebin/auth.beam bootstrap/lib/kernel/ebin/dist_util.beam bootstrap/lib/kernel/ebin/global.beam bootstrap/lib/kernel/ebin/hipe_unified_loader.beam bootstrap/lib/kernel/ebin/inet_db.beam bootstrap/lib/kernel/ebin/inet_dns.beam bootstrap/lib/kernel/ebin/inet_res.beam bootstrap/lib/kernel/ebin/os.beam bootstrap/lib/kernel/ebin/pg2.beam bootstrap/lib/stdlib/ebin/dets.beam bootstrap/lib/stdlib/ebin/dets_utils.beam bootstrap/lib/stdlib/ebin/erl_tar.beam bootstrap/lib/stdlib/ebin/escript.beam bootstrap/lib/stdlib/ebin/file_sorter.beam bootstrap/lib/stdlib/ebin/otp_internal.beam bootstrap/lib/stdlib/ebin/qlc.beam bootstrap/lib/stdlib/ebin/random.beam bootstrap/lib/stdlib/ebin/supervisor.beam bootstrap/lib/stdlib/ebin/timer.beam erts/aclocal.m4 erts/emulator/beam/bif.c erts/emulator/beam/erl_bif_info.c erts/emulator/beam/erl_db_hash.c erts/emulator/beam/erl_init.c erts/emulator/beam/erl_process.h erts/emulator/beam/erl_thr_progress.c erts/emulator/beam/utils.c erts/emulator/sys/unix/sys.c erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/ebin/init.beam erts/preloaded/src/erts_internal.erl lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl lib/diameter/src/base/diameter_lib.erl lib/kernel/src/os.erl lib/ssh/test/ssh_basic_SUITE.erl system/doc/efficiency_guide/advanced.xml