aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib
AgeCommit message (Collapse)Author
2011-09-16Merge branch 'dev' into majorBjörn-Egil Dahlberg
* dev: Cleanup ETS bif's in hipe:erl_bif_types.erl (for dialyzer) Conflicts: erts/emulator/beam/erl_db.c
2011-09-16Merge branch 'pan/erl-bif-types/OTP-9496' into devBjörn-Egil Dahlberg
* pan/erl-bif-types/OTP-9496: Cleanup ETS bif's in hipe:erl_bif_types.erl (for dialyzer)
2011-09-16Explain how dynamic child processes are stoppedChristopher Faulet
2011-09-16Stack errors when dynamic children are stoppedChristopher Faulet
Because a simple_one_for_one supervisor can have many workers, we stack errors during its shutdown to report only one message for each encountered error type. Instead of reporting the child's pid, we use the number of concerned children.
2011-09-16Explicitly kill dynamic children in supervisorsChristopher Faulet
According to the supervisor's documentation: "Important note on simple-one-for-one supervisors: The dynamically created child processes of a simple-one-for-one supervisor are not explicitly killed, regardless of shutdown strategy, but are expected to terminate when the supervisor does (that is, when an exit signal from the parent process is received)." All is fine as long as we stop simple_one_for_one supervisor manually. Dynamic children catch the exit signal from the supervisor and leave. But, if this happens when we stop an application, after the top supervisor has stopped, the application master kills all remaining processes associated to this application. So, dynamic children that trap exit signals can be killed during their cleanup (here we mean inside terminate/2). This is unpredictable and highly time-dependent. In this commit, supervisor module is patched to explicitly terminate dynamic children accordingly to the shutdown strategy. NOTE: Order in which dynamic children are stopped is not defined. In fact, this is "almost" done at the same time.
2011-09-16tar_SUITE: Work around limited pathname length on WindowsBjörn Gustavsson
Ever since the test suites were converted to the common_test convention, the tests for long names started to fail on Windows. The reason is that those test cases depend on the current working directory, and that the current working directory in common_test test cases is usually set to a directory with a longer pathname than in test_server test suites. Since neither Erlang/OTP nor common_test provides a portable way to create a temporary directory with a short name, we will have to abuse priv_dir by going upwards from it. For further information, see the comment in run_in_short_tempdir/2.
2011-09-15Fix misspelling of compatibilityTuncer Ayaz
2011-09-15Fix misspelling of successfulTuncer Ayaz
2011-09-14Merge branch 'dev' into majorLukas Larsson
* dev: Add a high value to test data to catch type cast truncation errors
2011-09-14Merge branch 'lukas/erts/ets_order_testcases/OTP-9459' into devLukas Larsson
* lukas/erts/ets_order_testcases/OTP-9459: Add a high value to test data to catch type cast truncation errors
2011-09-13beam_lib_SUITE: Don't assume that "Abst" is the last chunkBjörn Gustavsson
"Line" is now the last chunk in a BEAM file, causing beam_lib_SUITE:error/1 to fail. To avoid being bitten by this problem again, don't simply change "Abst" to "Line", but use beam_lib:info/1 to find out the name of the last chunk.
2011-09-12Cleanup ETS bif's in hipe:erl_bif_types.erl (for dialyzer)Patrik Nyblom
2011-09-09Merge branch 'bmk/inets/inets58_integration' into majorMicael Karlberg
[httpc] Deprecated interface module <c>http</c> has been removed. It has (long) been replaced by http client interface module httpc. OTP-9359 [httpc|httpd] The old ssl implementation (based on OpenSSL), has been deprecated. The config option that specified usage of this version of the ssl app, *ossl*, has been removed. OTP-9522
2011-09-08Merge branch 'dev' into majorHenrik Nord
2011-09-08Merge branch 'ta/erl_compile-dead-code' into devHenrik Nord
* ta/erl_compile-dead-code: Remove dead code in erl_compile OTP-9527
2011-09-08ms_transform: Fix incorrect `variable shadowed' warningsHaitao Li
Compile below module resulting incorrect warning: $ cat tmp.erl -module(tmp). -export([tmp/1]). -include_lib("stdlib/include/ms_transform.hrl"). tmp(X) when X > 100 -> Y=X, Y; tmp(X) -> ets:fun2ms(fun(Y) -> {X, Y} end). $ erlc tmp.erl ./tmp.erl:8: Warning: variable 'Y' shadowed in ms_transform fun head The scope for a variable is its function clause. Variables bound in one function clause should not interfere with other function clauses. This patch removes incorrect passing of variable bindings from one function clause to another. Signed-off-by: Haitao Li <[email protected]>
2011-09-05Merge branch 'bmk/inets/httpc/remove_deprecated_module_http/OTP-9359' into ↵Micael Karlberg
bmk/inets/inets58_integration
2011-09-02Merge branch 'dev' into majorBjörn Gustavsson
* dev: Make the check_old_code/1 BIF auto-imported Deprecate the docbuilder application Conflicts: lib/stdlib/src/otp_internal.erl
2011-09-02Merge branch 'bjorn/deprecate-docbuilder/OTP-9509' into devBjörn Gustavsson
* bjorn/deprecate-docbuilder/OTP-9509: Deprecate the docbuilder application
2011-09-02Merge branch 'bjorn/erts/old-code-checking-improvements/OTP-9495' into devBjörn Gustavsson
* bjorn/erts/old-code-checking-improvements/OTP-9495: Make the check_old_code/1 BIF auto-imported
2011-09-02Merge branch 'dev' into majorHans Bolinder
* dev: Fix a couple of minor bugs with hook priority Update to reflect addition of CTH priority addition Update CTH priority default to be 0 Update to reflect new cth callback api Update the return from init/2 to be {ok, NewState} or {ok,NewState,Priority} instead of NewState. Add priority functionality and tests for ct hooks Update internal hooks state to use a record instead of tuples Improve and correct types and specifications in Kernel and STDLIB
2011-09-02Merge branch 'hb/spec_improvements/OTP-9485' into devHans Bolinder
* hb/spec_improvements/OTP-9485: Improve and correct types and specifications in Kernel and STDLIB
2011-09-01Merge branch 'dev' into majorHenrik Nord
2011-09-01Merge branch 'rc/stdlib-edoc-fix' into devHenrik Nord
* rc/stdlib-edoc-fix: fix broken edoc annotations OTP-9516
2011-09-01Make the check_old_code/1 BIF auto-importedBjörn Gustavsson
check_old_code/1 was documented to be auto-imported, but in fact was not auto-imported. Since check_process_code/2 and the other code loading BIFs are now auto-imported, for consistency auto-import check_old_code/1 too.
2011-09-01Deprecate the docbuilder applicationBjörn Gustavsson
2011-08-31Add a high value to test data to catch type cast truncation errorsLukas Larsson
2011-08-31Improve and correct types and specifications in Kernel and STDLIBHans Bolinder
Running Dialyzer on the test suites revealed a few type errors.
2011-08-30Remove dead code in erl_compileTuncer Ayaz
2011-08-30Merge branch 'dev' into majorHenrik Nord
2011-08-30Merge branch 'ft/fix_supervisor_temporary_restart' into devHenrik Nord
OTP-9502
2011-08-29Merge branch 'dev' into majorHenrik Nord
2011-08-29Merge branch 'rz/add_proplist_type' into devHenrik Nord
* rz/add_proplist_type: Add a proplist() type OTP-9499
2011-08-29Merge branch 'dev' into majorHenrik Nord
2011-08-29Merge branch 'ml/two-trivial-documentation-fixes' into devHenrik Nord
* ml/two-trivial-documentation-fixes: Fix trivial documentation errors OTP-9498
2011-08-25Merge branch 'bjorn/line-numbers-in-exceptions/OTP-9468' into majorBjörn Gustavsson
* bjorn/line-numbers-in-exceptions/OTP-9468: (51 commits) debugger: By default, only save non-tail-recursive calls debugger: Add line_number_SUITE debugger: Include line numbers in exceptions Update examples in the documentation to include line numbers Update documentation for erlang:raise/3 and erlang:get_stacktrace/0 beam_lib: Retain the "Line" chunk when stripping BEAM files erl: Add +L to suppress loading of line number information compiler: Add no_line_info for suppressing line/1 instructions exception_SUITE: Test line numbers in exceptions common_test: Use line numbers in exceptions common_test tests: Don't do detailed testing of the stack backtrace test_server: Refactor init_per_testcase/3 into two functions Implement process_info(Pid, current_{location,stacktrace}) beam_emu: Factor out saving of stack trace from save_stacktrace() compiler: Don't create filenames starting with "./" ops.tab: Remove line instructions before tail-recursive calls Lookup and include filenames and line numbers in exceptions Fix decrement of continuation pointers Refactor building of the exception stacktrace BEAM loader: Load the line table ...
2011-08-25Merge branch 'dev' into majorHenrik Nord
2011-08-23fix supervisors restarting temporary childrenFred Hebert
In the current implementation of supervisors, temporary children should never be restarted. However, when a temporary child is restarted as part of a one_for_all or rest_for_one strategy where the failing process is not the temporary child, the supervisor still tries to restart it. Because the supervisor doesn't keep some of the MFA information of temporary children, this causes the supervisor to hit its restart limit and crash. This patch fixes the behaviour by inserting a clause in terminate_children/2-3 (private function) that will omit temporary children when building a list of killed processes, to avoid having the supervisor trying to restart them again. Only supervisors in need of restarting children used the list, so the change should be of no impact for the functions that called terminate_children/2-3 only to kill all children. The documentation has been modified to make this behaviour more explicit.
2011-08-18fix broken edoc annotationsRichard Carlsson
2011-08-18Fix a bug in zip:zip_open/1,2.Hans Bolinder
zip:zip_open/1,2 did not accept binary archives. Also corrected the contracts of t/1 and tt/1.
2011-08-18beam_lib: Retain the "Line" chunk when stripping BEAM filesBjörn Gustavsson
2011-08-17Correct contracts in the zip moduleHans Bolinder
The contracts of zip:zip_list_dir/1 and zip:zip_get/2 have been corrected.
2011-08-16Merge branch 'cr/trivia' into devHenrik Nord
* cr/trivia: replace "a ssl" with "an ssl" reindent pkix_path_validation/3 Trivial documentation fixes OTP-9464
2011-08-16compiler: Don't create filenames starting with "./"Björn Gustavsson
In the location information tables in the run-time system, source filenames that are the same as the module name plus ".erl" extension are not stored explicitly, thus saving memory. To take advantage of that optimization, avoid complicating the names of files in the current working directory; specifically, make sure that "./" is not prepended to the name.
2011-08-16Lookup and include filenames and line numbers in exceptionsBjörn Gustavsson
2011-08-16emulator: Add a fourth element in exception stacktracesBjörn Gustavsson
This commit is a preparation for introducing location information (filename/line number) in stacktraces in exceptions. Currently a stack trace looks like: [{Mod1,Function1,Arity1}, . . . {ModN,FunctionN,ArityN}] Add a forth element to each tuple that can be used indication the filename and line number of the source file: [{Mod1,Function1,Arity1,Location1}, . . . {ModN,FunctionN,ArityN,LocationN}] In this commit, the fourth element will just be an empty list, and we will change all code that look at or manipulate stacktraces.
2011-08-16Fix binary matching in the debuggerBjörn Gustavsson
'eval_bits' is a common utility module used for evaluting binary construction and matching. The functions that do matching (match_bits/{6,7} and bin_gen/6) are supposed to treat the bindings as an abstract data type, but they assume that the bindings have the same representation as in the erl_eval module. That may cause binary matching to fail in the debugger, because the debugger represents the bindings as an unordered list of two-tuples, while the erl_eval modules uses an ordered list of two-tuple (an ordset). One way to fix the problem would be to let the debugger to use ordered lists to represent the bindings. Unfortunately, that would also change how the bindings are presented in the user interface. Currently, the variable have most been recently assigned is shown first, which is convenient. Fix the matching problem by mending the leaky abstraction in eval_bits. The matching functions needs to be passed two additional operations: one for looking up a variable in the bindings and one for adding a binding. Those operations could be passed as two more funs (in addition to the evaluation and match fun already passed), but the functions already have too many arguments. Therefore, change the meaning of the match fun, so that the first argument is the operation to perform ('match', 'binding', or 'add_binding') and second argument is a tuple with arguments for the operation.
2011-08-15Correct the contract of timer:now_diff/2Hans Bolinder
The contract of timer:now_diff() has been corrected. (Thanks to Alex Morarash).
2011-08-08Merge branch 'dev' into majorHenrik Nord
2011-08-08Fix minor typo in gen_fsm documentationHenrik Nord