aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
AgeCommit message (Collapse)Author
2012-08-31Update copyright yearsBjörn-Egil Dahlberg
2012-08-27Merge branch 'tab/fix-sctp-multihoming-IPv6/OTP-10217' into maintFredrik Gustafsson
* tab/fix-sctp-multihoming-IPv6/OTP-10217: Allow mixed IPv4 and IPv6 addresses to sctp_bindx Add checks for in6addr_any and in6addr_loopback Fix SCTP multihoming inet_drv.c: Set sockaddr lengths in inet_set_[f]address
2012-08-21Fix init:restart with hipelibsSverker Eriksson
This is a workaround for init:restart. The root problem is that delete/purge_module does not clean up internal hipe bookkeeping (hipe_mfa_info's) properly. Symptom: Execution of deallocated beam code.
2012-08-21kernel: Disable hipe compilation for hipe_unified_loaderSverker Eriksson
Workaround for crash in code_server.
2012-08-16Fix SCTP multihomingTomas Abrahamsson
Setting several ip addresses for an SCTP socket worked only for IPv4 on Linux. For IPv6 and for other for instance Solaris and FreeBSD, it failed with badarg for both IPv4 and IPv6. For the first address specified to gen_sctp:open, bind is now called, while for any following addresses, sctp_bindx is called, repeatedly, with one address at a time. Previously, sctp_bindx was called for all addresses in one go, with the addresses in reverse order, and bind was not called at all if more than one address was specified. Both Solaris and FreeBSD requires bind to have been called before calling sctp_bindx, and FreeBSD additionally allows at most one address at a time in the call to sctp_bindx. For some versions of Linux, for instance SuSE 10, the port can be 0 only for the call to bind but not for subsequent calls to sctp_bindx, so replace with the port number assigned by the operating system.
2012-07-18Merge branch 'ta/prim_archive-reloading' into maintHenrik Nord
* ta/prim_archive-reloading: escript_SUITE: remove gratuitous space [erts,kernel,stdlib] fix escript/primary archive reloading Conflicts: erts/preloaded/src/erl_prim_loader.erl OTP-10151
2012-07-18Merge branch 'tc/rpc-call-fix' into maintHenrik Nord
* tc/rpc-call-fix: Fix rpc:call/5 for local calls with a finite Timeout OTP-10149
2012-07-06[erts,kernel,stdlib] fix escript/primary archive reloadingTuncer Ayaz
If the mtime of an escript/primary archive file changes after being added to the code path, correctly reload the archive and update the cache. The existing code didn't consider that it might be a zip archive and failed: =ERROR REPORT==== 3-Aug-2011::09:21:21 === File operation error: bad_central_directory. Target: /escript_archive/module.beam. Function: get_file. Process: code_server. Thanks David Reid and Hakan Mattson.
2012-07-02Correct the type of the disk log headerHans Bolinder
Thanks to Niclas Eklund.
2012-06-05Update to work with whitespace in exec pathLukas Larsson
OTP-10106 OTP-10107
2012-05-30Fix chunk usage checkLukas Larsson
2012-05-23Merge branch 'lukas/kernel/fix-gen_udp_tcp-leak/OTP-10094' into maintLukas Larsson
* lukas/kernel/fix-gen_udp_tcp-leak/OTP-10094: Add testcase for controlling_process(P,self()) Fix port leaking after controlling_process(Port, self())
2012-05-02Fix rpc:call/5 for local calls with a finite TimeoutTomer Chachamu
-module(rpc_example). -export([f/0, should_return_ok/0]). should_return_ok() -> {badrpc, timeout} = rpc:call(node(), ?MODULE, f, [], 5000), ok. f() -> Ref = make_ref(), receive Ref -> ok end.
2012-04-16kernel: Remove bit8 option in specBjörn-Egil Dahlberg
* The option is removed to force warnings for dialyzer
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-03-22Rename dyntrace BIFs to more suiting namesPatrik Nyblom
2012-03-22Correct some errors in the user tag spreadingPatrik Nyblom
2012-03-22Add user tag spreading functionality to VM and use in filePatrik Nyblom
User tags in a dynamic trace enabled VM are spread throughout the system in the same way as seq_trace tokens. This is used by the file module and various other modules to get hold of the tag from the user process without changing the protocol.
2012-03-22Update dtrace for changes in R15Björn-Egil Dahlberg
2012-03-22Add DTrace support for OS X, Solaris, and Linux (via SystemTap), 4/4Scott Lystig Fritchie
Add probes to (mostly) the efile_drv.c driver and other file I/O-related source files.
2012-03-20Make sure disk_log does not write too much dataHans Bolinder
While disk_log eagerly collects logged data for better performance, collecting too much data may choke the system and cause huge binaries to be written. The problem was addressed in OTP-9764, but the situation was not improved in all cases. Thanks to Richard Carlsson.
2012-03-20Merge branch 'bjorn/kernel/erts_debug_size-fix/OTP-9991' into maintBjörn Gustavsson
* bjorn/kernel/erts_debug_size-fix/OTP-9991: Improve erts_debug_SUITE Fix calculation of fun size in erts_debug:size/1
2012-03-19Merge branch 'ph/fix-enfile/OTP-9990' into maintBjörn-Egil Dahlberg
* ph/fix-enfile/OTP-9990: Update preloaded prim_inet.beam gen_tcp: Use correct specs for accept and listen prim_inet: Catch system_limit in open_port Fix returned error from gen_tcp:accept/1,2 when running out of ports
2012-03-19Fix calculation of fun size in erts_debug:size/1Björn Gustavsson
Funs would be calculated using erts_debug:flat_size/1.
2012-03-16gen_tcp: Use correct specs for accept and listenBjörn-Egil Dahlberg
2012-03-16Merge branch 'rj/fix-global-spec' into maintGustav Simonsson
* rj/fix-global-spec: Improve global:re_register_name/2,3 spec Fix global:{random_exit_name,random_notify_name}/3 spec
2012-03-01Improve global:re_register_name/2,3 specRicardo Catalinas Jiménez
Both functions always return `yes'.
2012-03-01Merge branch 'mh/create_cookie_error_msg' into maintGustav Simonsson
* mh/create_cookie_error_msg: Specify file name and error on create_cookie failure OTP-9954
2012-03-01Fix global:{random_exit_name,random_notify_name}/3 specRicardo Catalinas Jiménez
Both functions return pid(), not 'none'. The one that always returns 'none' is notify_all_name/3.
2012-02-04Fix port leaking after controlling_process(Port, self())Ricardo
Add case to handle the situation when someone call {gen_tcp,gen_udp}:controlling_process(Port, self()). Also improve spec and doc from gen_udp and gen_sctp for controlling_process/2. To reproduce the issue, open an UDP port: 4> {ok,Port} = gen_udp:open(9000, [binary]). {ok,#Port<0.587>} 5> gen_udp:controlling_process(Port, self()). ok Simulate error: 6> 1=2. ** exception error: no match of right hand side value 2 Here is the leak: 7> inet:i(). Port Module Recv Sent Owner Local Address Foreign Address State Type 581 inet_udp 0 0 <0.31.0> *:cslistener *:* BOUND DGRAM ok
2012-01-25Merge branch 'bjorn/kernel/on_load-bug/OTP-9875' into maintBjörn Gustavsson
* bjorn/kernel/on_load-bug/OTP-9875: Fix on_load handling in modules loaded by code:load_binary/3
2012-01-23Fix on_load handling in modules loaded by code:load_binary/3Björn Gustavsson
In "13.4 Running a function when a module is loaded" in the Reference Manual, it is said that: A process that calls any function in a module whose on_load function has not yet returned will be suspended until the on_load function has returned. That did not work if the module was loaded using code:load_binary/3. Instead, the callers would get an 'undef' exception.
2012-01-23Correct two contracts in gen_sctp.erlHans Bolinder
binary should be binary().
2012-01-04Fix returned error from gen_tcp:accept/1,2 when running out of portsPer Hedeland
The {error, enfile} return value is badly misleading and confusing for this case, since the Posix ENFILE errno value has a well-defined meaning that has nothing to do with Erlang ports. The fix changes the return value to {error, system_limit}, which is consistent with e.g. various file(3) functions. inet:format_error/1 has also been updated to support system_limit in the same manner as file:format_error/1.
2011-12-09Update copyright yearsBjörn-Egil Dahlberg
2011-12-08Merge branch 'ta/sendfile/OTP-9240'Lukas Larsson
* ta/sendfile/OTP-9240: Do not use async threads on DARWIN Fix cleanup when sendfile process crashes Return {error,closed} from sendfile if closed Do not use SFV_NOWAIT as it does not exist on all solaris Clarify some code comments Make solaris use sendfilev
2011-12-08Merge branch 'egil/file-info-opt-utc/OTP-7687'Björn-Egil Dahlberg
* egil/file-info-opt-utc/OTP-7687: (39 commits) Remove time_t specific test in prim_file_SUITE Update prim_file.beam and prim_zip.beam Add types for posixtime_to_universaltime and the reverse Set BASEYEAR to 1902 Set lower limit of years handled to 1601 Emulate localtime, gmtime and mktime to enable negative time_t Document file:*_file_info/2 Fix compiler warning in unix_efile.c Change name of bif universaltime_to_seconds/1 Change options to prim_file:*_file_info/* Remove dead code Catch errors from prim_file:*_file_info Testcase for utc <-> seconds conversion Fix negative time in seconds_to_universaltime/1 Remove OS taint from datetime conversion Add utc <-> seconds conversions bifs Let prim_file validate ctime in file_info Teach #file_info spec unix epochs for file times Add file_info_opt tests in prim_file_SUITE unix_efile: Zero is a valid number in utime ... Conflicts: erts/emulator/beam/erl_time_sup.c erts/emulator/sys/win32/erl_win_sys.h erts/emulator/sys/win32/sys_time.c
2011-12-08Document file:*_file_info/2Björn-Egil Dahlberg
* file:read_file_info/2 * file:write_file_info/3 Document options and time behavior.
2011-12-08Remove dead codeBjörn-Egil Dahlberg
2011-12-07Return {error,closed} from sendfile if closedLukas Larsson
If the socket is closed by the remote end, sendfile now returns {error,closed}.
2011-12-07Remove debug printoutHans Bolinder
2011-12-06Merge branch 'ta/docs'Henrik Nord
* ta/docs: Fix misspelling of chosen Fix typos in erl(1) Fix misspelling of 'turn off' Fix typo in reltool(3) Fix typo in gen_sctp(3) Fix typo in mod_responsecontrol.erl Fix typo in erts_alloc(3) Fix typos in ssl_cipher.erl Fix typos in expressions.xml file: correct make_link/2 and make_symlink/2 docs Fix typo in test_server(3) Fix typos in io_protocol.xml Fix typo in erlang(3) Fix typos in tar_SUITE Fix typos in erts/preloaded/src OTP-9787
2011-12-06Merge branch 'ao/fix-change-time-inval-dates'Henrik Nord
* ao/fix-change-time-inval-dates: Fix a crash when file:change_time/2,3 are called with invalid dates OTP-9785
2011-12-05file: correct make_link/2 and make_symlink/2 docsTuncer Ayaz
2011-12-05Merge branch 'sa/dialyzer-fixes'Henrik Nord
* sa/dialyzer-fixes: Correct callback spec in application module Refine warning about callback specs with extra ranges Cleanup autoimport compiler directives Fix Dialyzer's warnings in typer Fix Dialyzer's warning for its own code Fix bug in Dialyzer's behaviours analysis Fix crash in Dialyzer OTP-9776
2011-12-05Merge branch 'hb/kernel/too_greedy_disk_log/OTP-9764'Hans Bolinder
* hb/kernel/too_greedy_disk_log/OTP-9764: Make sure disk_log does not write too much data
2011-12-04Make sure disk_log does not write too much dataHans Bolinder
While disk_log eagerly collects logged data for better performance, collecting too much data may choke the system and cause huge binaries to be written. (Reported by Klarna.) (Logging data faster than the speed disk_log can write to disk can still cause problems.)
2011-12-02Add spec for file:read_link_info/2Björn-Egil Dahlberg
2011-12-02Move datetime into prim_fileBjörn-Egil Dahlberg
2011-12-02stdlib: Fix return file_info on epochBjörn-Egil Dahlberg