aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
AgeCommit message (Collapse)Author
2014-03-19Merge branch 'josevalim/set_cwd-typespec'Henrik Nord
* josevalim/set_cwd-typespec: Correct file:set_cwd/1 typespec OTP-11787
2014-03-14erts: Add distribution capability flag for maps DFLAG_MAP_TAGSverker Eriksson
This is just a preparation to allow detection of older nodes that do not understand maps (R16 and older).
2014-03-10Correct file:set_cwd/1 typespecJosé Valim
file:set_cwd/1 accepts binaries as arguments, however the binaries must be properly encoded as per file:native_name_encoding/0. Also update the note under no_translation error to refer that passing a ISO-latin-1 encoded binary under any unicode file name encoding.
2014-02-28Delay patching of closures to eliminate a race conditionBjörn Gustavsson
The loader of native code tries to avoid race condition by bringing down the system to a single scheduler. Unfortunately, that will not completely avoid race conditions beacuse other processes may still run while the code is being loaded. Therefore, we must still make sure that native code has been fully fixed up before it can be executed. Under unlucky circumstances, it was possible for the global name register process to call a fun in native code before the native code for the fun had been fully fixed up. The run-time system would crash when running the not-fully-fixed-up code. Here is a way to make the bug 100% reproducible. First add this function to the 'global' module: silly_looper(List) -> lists:foreach(fun(E) -> put(any_atom, E) end, List), silly_looper(List). Then insert the following code at the beginning of the init/1 function in the 'global' module: spawn_link(fun() -> silly_looper(lists:seq(1, 100)) end), The run-time system will crash during start up when the native code for the 'global' module is being loaded. What will happen is that lists:foreach/2 (which runs in native code) will call the native code for the fun in silly_looper/1 before the reference to 'any_atom' has been changed from a 0 to the proper tagged atom value. The put/2 BIF will exit when attempting to calculate the hash value for the illegal value 0 (it is not properly tagged). To eliminate this race condition, we must delay patching the native code addresses for a fun into the fun entry until the native code has been fully fixed up. We will use the new BIFs introduced in the previous commit. While we are at it, we will also make sure that we erase any temporary variables in the process dictionary used by the hipe_unified_loader module.
2014-02-28hipe: Break apart hipe_bif:make_fe/3 into two BIFsBjörn Gustavsson
This commit is a preparation for eliminating a race condition loading the native code for modules whose BEAM code has already been loaded. Here we introduce two new BIFs so that looking up a fun entry is separate from setting the native address in the fun entry.
2014-02-24Merge branch 'lukas/ose/master/OTP-11334'Lukas Larsson
* lukas/ose/master/OTP-11334: (71 commits) erts: Fix unix efile assert ose: Use -O2 when building ose: Expand OSE docs ose: Add dummy ttsl driver ose: Cleanup cleanup of mutex selection defines ose: Polish mmap configure checks ose: Add ose specific x-compile flags ose: Updating fd_driver and spawn_driver for OSE ose: Updating event and signal API for OSE ose: Cleanup of mutex selection defines win32: Compile erl_log.exe ose: Remove uneccesary define ose: Fix ssl configure test for osx erts: Fix sys_msg_dispatcher assert ose: Fix broken doc links ose: Thread priorities configurable from lmconf ose: Yielding the cpu is done "the OSE" way ose: Start using ppdata for tse key ose: Do not use spinlocks on OSE ose: Fix support for crypto ... Conflicts: lib/crypto/c_src/crypto.c
2014-02-24ose: Create OSE applicationLukas Larsson
Create an specific OSE application that mainly contains documentation around the OSE specific part of Erlang/OTP.
2014-02-24ose: efile driver updates.Jonas Karlsson
2014-02-24ose: Bugfixes to filesystem related issues.Jonas Karlsson
2014-02-24ose: Add module that allows interaction with any OSE processLukas Larsson
The interface of this module is made to be as generic as possible in order for other IPC mechanisms to mimic it and allow porting of code between different os:es.
2014-02-24ose: Adapt suite for OSERasmuss Graaf
2014-02-24Merge branch 'siri/master-cuddle-with-tests'Siri Hansen
* siri/master-cuddle-with-tests: Use default timetrap (30 min) for kernel, stdlib and sasl app tests Unload 'deadlock' application in application_SUITE:shutdown_deadlock
2014-02-23Deprecate pre-defined built-in typesHans Bolinder
The types array(), dict(), digraph(), gb_set(), gb_tree(), queue(), set(), and tid() have been deprecated. They will be removed in OTP 18.0. Instead the types array:array(), dict:dict(), digraph:graph(), gb_set:set(), gb_tree:tree(), queue:queue(), sets:set(), and ets:tid() can be used. (Note: it has always been necessary to use ets:tid().) It is allowed in OTP 17.0 to locally re-define the types array(), dict(), and so on. New types array:array/1, dict:dict/2, gb_sets:set/1, gb_trees:tree/2, queue:queue/1, and sets:set/1 have been added.
2014-02-21Use default timetrap (30 min) for kernel, stdlib and sasl app testsSiri Hansen
These tests start new nodes, and they frequently timed out on some slow test hosts.
2014-02-21Unload 'deadlock' application in application_SUITE:shutdown_deadlockSiri Hansen
This is just to clean up properly after the test case. If not, code_SUITE:bit_boot_embedded might fail since it tries to include the 'deadlock' application in the boot file and fails when running systools:make_script.
2014-02-21Merge branch 'hb/kernel/spec_bug_fix/OTP-11730'Hans Bolinder
* hb/kernel/spec_bug_fix/OTP-11730: Correct the contract of inet:ntoa/1
2014-02-20Merge branch 'siri/appup_tests_17/OTP-11534'Siri Hansen
* siri/appup_tests_17/OTP-11534: Update sasl/test/test_lib.hrl with recent versions of kernel and stdlib Update appups and appup tests for kernel, stdlib and sasl
2014-02-20Correct the contract of inet:ntoa/1Hans Bolinder
Thanks to Max Treskin.
2014-02-19kernel: Fix an application terminate deadlock possibilityDan Gudmundsson
Could happen if get_child was called during terminate. io (since it is a group_leader) also causes problems after get_child was called. Split up and do it async.
2014-02-14Merge branch 'josevalim/jv-persistent-set-env'Henrik Nord
* josevalim/jv-persistent-set-env: Allow persistent option on set_env/4 and unset_env/3 OTP-11708
2014-02-12Fix a few of Dialyzer's unmatched_return warningsHans Bolinder
2014-02-12Update appups and appup tests for kernel, stdlib and saslSiri Hansen
Appups now only support one major release back, and the tests are updated accordingly. Support is also added in tests for giving previous releases in a ct config file, e.g. {otp_releases,[{r15,"/path/to/r15/bin/erl"}, {r16,"/path/to/r16/bin/erl"}, {'17',"/path/to/17/bin/erl"}]}.
2014-02-11Allow persistent option on set_env/4 and unset_env/3José Valim
An environment key set with the persistent option will not be overridden by the ones configured in the application resource file on load. This means persistent values will stick after the application is loaded and also on application reload.
2014-02-06Make the references to various Erlang/OTP releases verboseHans Bolinder
2014-01-29Merge branch 'bjorn/fna-default/OTP-11612'Björn Gustavsson
* bjorn/fna-default/OTP-11612: Change the default file name encoding mode to +fnaw
2014-01-28Merge branch 'lukas/erts/sendfile_no_async_pool/OTP-11639'Lukas Larsson
* lukas/erts/sendfile_no_async_pool/OTP-11639: erts/kernel: sendfile no longer uses async threads
2014-01-28Change the default file name encoding mode to +fnawBjörn Gustavsson
2014-01-28Merge branch 'siri/appup_tests_17/OTP-11534'Siri Hansen
* siri/appup_tests_17/OTP-11534: Update sasl appup test to work for OTP release 17 Update stdlib appup test to work for OTP release 17 Update kernel appup test to work for OTP release 17
2014-01-27Merge branch 'lukas/erts/sendfile_passive_mode_fix/OTP-11614'Lukas Larsson
* lukas/erts/sendfile_passive_mode_fix/OTP-11614: erts: fix bug when using passive mode and sendfile
2014-01-27erts: fix bug when using passive mode and sendfileLukas Larsson
The bug incorrectly issued driver_select when un-ignoring an fd for a socket in passive mode, which caused an incorrect error tuple to be returned when the remote end closed the connection.
2014-01-27erts/kernel: sendfile no longer uses async threadsLukas Larsson
This has been done because a slow client attack is possible if the async thread pool is used. The scenario is: Client does a request for a file and then slowly receives the file one byte at a time. This will eventually fill the async thread pool with blocking sendfile operations and thus starving the vm of all file operations. If you still want to use the async threads pool for sendfile an option to enable it has been introduced.
2014-01-22Update kernel appup test to work for OTP release 17Siri Hansen
2014-01-22Merge branch 'bjorn/erts/zlib-1.2.8'Björn Gustavsson
* bjorn/erts/zlib-1.2.8: configure: Prefer the system's zlib over own our zlib source Update preloaded modules Add the 'rle' zstrategy Don't make gzio.c dependent on the zutil.h header file Update zlib to 1.2.8 erts/zlib: Remove unused file example.c
2014-01-21kernel: code_SUITE fix unicode optionBjörn-Egil Dahlberg
2014-01-21Fix testing with unicode pathsDan Gudmundsson
re needs unicode option
2014-01-16Add the 'rle' zstrategyBjörn Gustavsson
2014-01-14Update zlib to 1.2.8Björn Gustavsson
2013-12-13Merge branch 'rickard/otp-17-vsn'Rickard Green
* rickard/otp-17-vsn: Update versions of OTP, erts, kernel, and stdlib
2013-12-10Merge tag 'OTP_R16B03'Magnus Lidén
The R16B03 release Conflicts: lib/sasl/vsn.mk
2013-12-10Update versions of OTP, erts, kernel, and stdlibRickard Green
Update versions of OTP, erts, kernel, and stdlib to comply with the new version scheme decided by the OTP technical board.
2013-12-09Prepare releaseOTP_R16B03Erlang/OTP
2013-12-07Merge branch 'rickard/garbage_collect/OTP-11388'Rickard Green
* rickard/garbage_collect/OTP-11388: Parallel check_process_code when code_server purge a module Functionality for disabling garbage collection Use asynchronous check_process_code in code_parallel_SUITE Execution of system tasks in context of another process Conflicts: bootstrap/lib/kernel/ebin/hipe_unified_loader.beam erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam
2013-11-29Merge branch 'sv/file-osync/OTP-11498'Lukas Larsson
* sv/file-osync/OTP-11498: Add sync option to file:open/2 Conflicts: erts/preloaded/ebin/prim_file.beam
2013-11-27Merge branch 'maint'Sverker Eriksson
2013-11-26kernel: Fix zlib_SUITE:large_deflateSverker Eriksson
Commontest doesn't like arity 0 function with same name as test case.
2013-11-26Merge branch 'maint'Raimo Niskanen
Conflicts: erts/preloaded/ebin/prim_inet.beam lib/kernel/test/gen_sctp_SUITE.erl
2013-11-26Merge branch 'maint-r16' into maintRaimo Niskanen
2013-11-25Improve documentationRaimo Niskanen
2013-11-19DocumentRaimo Niskanen
2013-11-18Parallel check_process_code when code_server purge a moduleRickard Green
When the code_server is about to purge a module it will now issue asynchronous check_process_code requests to all processes at once instead of one at a time. These check_process_code operation can execute in parallel.