aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
AgeCommit message (Collapse)Author
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-21Merge branch 'maint'Hans Bolinder
* maint: Make sure disk_log does not write too much data
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 'maint'Björn Gustavsson
* maint: Improve erts_debug_SUITE Fix calculation of fun size in erts_debug:size/1
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 'maint'Björn-Egil Dahlberg
Conflicts: erts/preloaded/ebin/prim_inet.beam
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-19Merge branch 'maint'Gustav Simonsson
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 'maint'Gustav Simonsson
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-17hipe,erts: Add DEBUG support with MFA's in stack descriptorsSverker Eriksson
2012-02-09hipe: Fix address_to_mfa in hipe loaderSverker Eriksson
Strange that the effect of this bug is not more fatal. Kudos to Fabian and Tom for spotting this one.
2012-02-07Correct dializer errors in erlang.erl and othersPatrik Nyblom
New errors found when adding specs to erlang.erl and removing them from erl_bif_types are examined and corrected. Some errors was due to faulty specs, while others were actual errors in the code using BIF's.
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-27Move types and specs from erl_bif_types.erl to modulesHans Bolinder
2012-01-27Merge branch 'bjorn/erts/bif-stubs/OTP-9861'Björn Gustavsson
* bjorn/erts/bif-stubs/OTP-9861: beam_load.c: Allow stubs for BIFs beam_load.c: Don't show unnecessary context in errors beam_load.c: Remove useless call to next_heap_size() beam_load.c: apply/2 does not need a special case
2012-01-25Merge branch 'maint'Lukas Larsson
* maint: Look for port in priv/bin/arch/ as well as priv/bin/ Fix on_load handling in modules loaded by code:load_binary/3
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-24beam_load.c: Allow stubs for BIFsBjörn Gustavsson
We want to be able to write type specifications for BIFs in the same way as for any other function. Currently, the type for BIFs need to be described in erl_bif_types. To avoid extending the compiler and Dialyzer with special directives for providing specifications for BIFs, we have decided to let the loader accept a local definition for a function which exists as a BIF. As an example, here is how a stub for lists:reverse/2 can be defined: -export([reverse/2]). -spec reverse([term()], term()) -> [term()]. reverse(_, _) -> erlang:nif_error(undef). Essentially, the loader will discard the local definition of reverse/2. Other functions in the same module must *not* do local calls to a BIF stub. If a local call to a BIF is found, the loader will refuse to load the module. That is, the following call is not allowed: reverse(List) -> reverse(List, []). but the following is: reverse(List) -> ?MODULE:reverse(List, []). A few words about the implementation. It turns out to be too complicated to actually discard the BIF stubs. Although it would be possibly with some jiggery pokery in ops.tab, the code would be difficult to maintain and it could slow down loading of modules that don't define BIFs (which are almost all modules). Therefore, the stub functions are kept in the loaded code, but their names in the func_info instruction are invalidated so that module_info(functions) can filter them out.
2012-01-24Merge branch 'maint'Hans Bolinder
* maint: Correct two contracts in gen_sctp.erl
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-29Update appup files for kernel and stdlib for OTP R16Siri Hansen
The appup files shall allow upgrade from two major versions back, i.e. for R16 they shall match back to R14. They shall no longer match for R13.
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
2011-12-02Fix undefined datetimesBjörn-Egil Dahlberg