aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
AgeCommit message (Collapse)Author
2016-01-25Eliminate run-time system crash in code:load_abs/1Björn Gustavsson
The run-time system would terminate if code:load_abs/1 was called with a filename containing any non-latin1 characters. The reason is that code_server would attempt to construct a module name from the filename using list_to_atom/1 and that atoms currently are limited to the latin1 character set. But how should the error be reported? I have decided to that the simplest and least confusing way is to move the call to list_to_atom/1 to 'code' module and let it crash the calling process. The resulting stack back trace will make it clear what the reason for the crash was.
2016-01-22Remove redundant test that hipe_unified_loader is loadedBjörn Gustavsson
For some reason, there is a test in code_server that hipe_unified_loader is loaded before trying to call it. The test was added in R9B, but it is not clear why. Before starting the code server, the 'code' module would always load hipe_unified_loader; thus there is now way that the test can ever fail.
2016-01-22Avoid testing for pending on_load twiceBjörn Gustavsson
2016-01-22code_server: Tighten type of modules parametersBjörn Gustavsson
The following functions in the 'code' module only allow the module argument to an atom: load_file/1 load_binary/3 ensure_loaded/1 delete/1 purge/1 soft_purge/1 get_object_code/1 Therefore, there is no reason that the corresponding implementation in code_server should allow the module to be either an atom or a string. Only accept an atom and remove the helper functions to_atom/1 and do_mod_call/4.
2016-01-20Introduce time warp safe trace timestamp formatsRickard Green
New timestamp options for trace, sequential trace, and system profile: - monotonic_timestamp - strict_monotonic_timestamp
2016-01-13erts: Refactor code:purge/1 and code:soft_purge/1Sverker Eriksson
by moving code from code_server to erts_code_purger. This is more or less a copy-paste from code_server.erl to erts_code_purger.erl. All the inner mechanics of code:purge/1 and code:soft_purge/1 are unchanged.
2015-12-17Merge branch 'bjorn/kernel/remove-code-path-cache/OTP-13191'Björn Gustavsson
* bjorn/kernel/remove-code-path-cache/OTP-13191: Remove the code path cache in the code server
2015-12-16Merge tag 'OTP-18.2'Henrik Nord
=== OTP-18.2 === Changed Applications: - asn1-4.0.1 - common_test-1.11.1 - compiler-6.0.2 - crypto-3.6.2 - dialyzer-2.8.2 - diameter-1.11.1 - erl_docgen-0.4.1 - erl_interface-3.8.1 - erts-7.2 - eunit-2.2.12 - hipe-3.14 - inets-6.1 - jinterface-1.6.1 - kernel-4.1.1 - observer-2.1.1 - parsetools-2.1.1 - public_key-1.1 - runtime_tools-1.9.2 - sasl-2.6.1 - snmp-5.2.1 - ssh-4.2 - ssl-7.2 - stdlib-2.7 - test_server-3.9.1 - tools-2.8.2 - typer-0.9.10 - wx-1.6 - xmerl-1.3.9 Unchanged Applications: - cosEvent-2.2 - cosEventDomain-1.2 - cosFileTransfer-1.2 - cosNotification-1.2 - cosProperty-1.2 - cosTime-1.2 - cosTransactions-1.3 - debugger-4.1.1 - edoc-0.7.17 - eldap-1.2 - et-1.5.1 - gs-1.6 - ic-4.4 - megaco-3.18 - mnesia-4.13.2 - odbc-2.11.1 - orber-3.8 - os_mon-2.4 - ose-1.1 - otp_mibs-1.1 - percept-0.8.11 - reltool-0.7 - syntax_tools-1.7 - webtool-0.9 Conflicts: OTP_VERSION erts/vsn.mk
2015-12-15Merge branch 'lukas/erts/forker'Lukas Larsson
* lukas/erts/forker: (28 commits) erts: Never abort in the forked child erts: Mend ASSERT makro for erl_child_setup erts: Allow enomem failures in port_SUITE erts: iter_port sleep longer on freebsd erts: Allow one dangling fd if there is a gethost port erts: Only use forker StackAck on freebsd erts: It is not possible to exit the forker driver erts: Add forker StartAck for port start flowcontrol erts: Fix large open_port arg segfault for win32 erts: Fix memory leak at async open port kernel: Remove cmd server for unix os:cmd erts: Add testcase for huge port environment erts: Move os_pid to port hash to child setup erts: Handle all EINTR and EAGAIN cases in child setup erts: Make child_setup work with large environments erts: Fix forker driver ifdefs for win32 erts: Fix uds socket handling for os x erts: Fix dereferencing of unaligned integer for sparc erts: Flatten too long io vectors in uds write erts: Add fd count test for spawn_driver ... Conflicts: erts/emulator/beam/erl_node_tables.c erts/preloaded/src/erts_internal.erl
2015-12-15kernel: Remove cmd server for unix os:cmdLukas Larsson
Since we no longer to vfork in the emulator there is no need to serialize the os:cmd calls through a central command server. This greatly decreases the complexity of this code and should make it fast+more scalable. OTP-13089
2015-12-14Remove the code path cache in the code serverBjörn Gustavsson
In practice, it does not seem that code path cache can improve performance. Looking for any file that is not found will cause the cache to be rebuilt, which will negate any gain of using the cache.
2015-12-14Merge branch 'bjorn/deprecate-random/OTP-12502'Björn Gustavsson
* bjorn/deprecate-random/OTP-12502: Deprecate the 'random' module Eliminate mentions of 'random' in documentation mnesia tests: Replace 'random' with 'rand' percept tests: Replace 'random' with 'rand' system tests: Replace 'random' with 'rand' common_test tests: Replace 'random' with 'rand' gs: Remove the contribs directory wx: Replace 'random' with 'rand' stdlib tests: Replace 'random' with 'rand' kernel test: Replace 'random' with 'rand' debugger tests: Replace 'random' with 'rand' compiler tests: Replace 'random' with 'rand' Emulator test suite: Replace use of 'random' with 'rand' Use 'rand' instead of the obsolete 'random' module compile: Eliminate use of the obsolete 'random' module
2015-12-11Use 'rand' instead of the obsolete 'random' moduleBjörn Gustavsson
In most cases, we don't have to seed the random number generator, as the rand:uniform/1 takes care about that itself.
2015-12-11Update appups in kernel, stdlib and sasl for OTP-18.2Siri Hansen
2015-12-07erts: Change erts_internal:map_type/1 into term_type/1Sverker Eriksson
to support other terms, not just maps
2015-12-04Merge branch 'maint'Henrik Nord
2015-12-04Merge branch 'maint-17' into maintHenrik Nord
Conflicts: OTP_VERSION erts/doc/src/notes.xml erts/vsn.mk lib/kernel/doc/src/notes.xml lib/kernel/src/kernel.appup.src lib/kernel/vsn.mk lib/ssl/doc/src/notes.xml lib/ssl/src/ssl.appup.src lib/ssl/src/ssl_cipher.erl lib/ssl/vsn.mk otp_versions.table
2015-12-02Merge branch 'maint'Raimo Niskanen
2015-12-02Merge branch 'soranoba/fix-file-position/PR-646' into maintRaimo Niskanen
* soranoba/fix-file-position/PR-646: Unify internal error handling Fix file:pread and :pwrite to use character encoding Clean up code for file:position/2 Fix file:position (not raw mode) OTP-13155
2015-12-01Update appupRaimo Niskanen
2015-11-26Unify internal error handlingRaimo Niskanen
2015-11-26Fix file:pread and :pwrite to use character encodingRaimo Niskanen
2015-11-24Clean up code for file:position/2Raimo Niskanen
2015-11-19Fix inet:setopts/2 to take multiple raw optionsRaimo Niskanen
2015-11-17Use copy literal range check in message passing and purgingBjörn-Egil Dahlberg
2015-11-17Add machinery to enable SHCOPY dynamicallyNikolaos S. Papaspyrou
This commit is just for debugging purposes, will probably be reverted. It comes with a the erts_debug:copy_shared/1 BIF. If SHCOPY_DISABLE is defined, SHCOPY starts disabled and is dynamically enabled the first time that the BIF is called.
2015-11-17Add the BIF size_shared/1 and debug cleanupNikolaos S. Papaspyrou
2015-11-05Merge branch 'maint'Henrik Nord
2015-11-05Merge branch 'weiss/case-insensitive-lookups' into maintHenrik Nord
* weiss/case-insensitive-lookups: inet_res: Make host name lookups case-insensitive OTP-13083
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-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-27inet_res: Make host name lookups case-insensitiveHolger Weiß
This partly reverts commit 8152505ea3793037984a7f3349ac95cc20c4e44c.
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.