aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2013-02-18ssl: Further error handling enhancmentsIngela Anderton Andin
follow up enhancments done in commit e56167dd6ca8d37d26ea7f19933691a3bda41113 Make sure format_error return good strings. Replace confusing legacy atoms with more descriptive atoms.
2013-02-14Merge branch 'ia/ssh/derived-file-in-git'Ingela Anderton Andin
* ia/ssh/derived-file-in-git: ssh: Remove derived file from git
2013-02-14ssh: Remove derived file from gitIngela Anderton Andin
2013-02-14Merge branch 'bjorn/remove-tuple-funs/OTP-10170'Björn Gustavsson
* bjorn/remove-tuple-funs/OTP-10170: si_sasl_supp: Eliminate use of tuple fun pman: Eliminate use of tuple fun
2013-02-14Merge branch 'bjorn/remove-packages/OTP-10348'Björn Gustavsson
* bjorn/remove-packages/OTP-10348: edoc: Fix building of documentation in sub directories
2013-02-14Merge branch 'ia/ssl/transport-cb-and-inet/OTP-10847'Ingela Anderton Andin
* ia/ssl/transport-cb-and-inet/OTP-10847: ssl: Generalize cb_info option
2013-02-14Merge branch 'hb/stdlib/extend_ts/OTP-10836'Hans Bolinder
* hb/stdlib/extend_ts/OTP-10836: Extend ~ts to handle binaries with characters coded in ISO-latin-1
2013-02-14Merge branch 'hb/kernel/application_bug_fix/OTP-10754'Hans Bolinder
* hb/kernel/application_bug_fix/OTP-10754: [kernel] FIx a bug that could cause crash with wrong reason
2013-02-13si_sasl_supp: Eliminate use of tuple funBjörn Gustavsson
2013-02-13pman: Eliminate use of tuple funBjörn Gustavsson
2013-02-13Merge branch 'nk/jinterface_dont_compress_if_size_increased/OTP-10822'Fredrik Gustafsson
* nk/jinterface_dont_compress_if_size_increased/OTP-10822: jinterface, OtpOutputStream: add a write_compressed(object, level) method jinterface: fix a memory leak jinterface: new limited OutputStream implementation without the need to resize jinterface: don't return compressed external term if bigger than uncompressed jinterface: don't compress small erlang terms < 5 bytes jinterface, OtpOutputStream: properly override the three write() methods to ensure our growth strategy jinterface: fix typo in error message if encoding fails jinterface: don't need another FilterOutputStream wrapper
2013-02-13Extend ~ts to handle binaries with characters coded in ISO-latin-1Hans Bolinder
Make sure io_lib:fwrite() with a format string including "~ts" does not crash when given binaries that cannot be interpreted as UTF-8-encoded strings. We want to avoid crashes caused by excessive use of the 't' modifier.
2013-02-13[kernel] FIx a bug that could cause crash with wrong reasonHans Bolinder
2013-02-13edoc: Fix building of documentation in sub directoriesBjörn Gustavsson
8115c0840527 broke building for projects that used sub directories (but not packages).
2013-02-12ssl: Generalize cb_info optionIngela Anderton Andin
2013-02-12Merge branch 'pan/unicode_filename_warnings'Björn Gustavsson
* pan/unicode_filename_warnings: Add file:list_dir_all/1 and file:read_link_all/1 prim_file: Add list_dir_all() and read_link_all() Teach prim_file:set_cwd() to avoid entering non-translatable directories Make prim_file skip invalid filenames in unicode mode prim_file: Refactor functions that return filenames prim_file: Refactor handling of responses prim_file: Always open non-file ports in binary mode Test that list_dir("non-existing-dir") fails with the correct error
2013-02-12Merge branch 'anders/diameter/message_length/OTP-10687'Anders Svensson
* anders/diameter/message_length/OTP-10687: Add length suite for testing Message Length errors Fix test/depend.mk blunder Add transport_opt() length_errors Only start a fragment timer when there's something to flush Simplify and document diameter_tcp fragment timer Comment fix Remove upgrade code not needed after application restart
2013-02-12Merge branch 'anders/diameter/rfc6733_dictionaries/OTP-10760'Anders Svensson
* anders/diameter/rfc6733_dictionaries/OTP-10760: Remove trailing whitespace Tweak service interface towards diameter_peer Split message handling in diameter_service into diameter_traffic Simplify request record Move failover out of service process Update traffic suite to test both RFC 3588 and 6733 dictionaries Update capx suite to test both RFC 3588 and 6733 dictionaries Add exprecs '#new-'/1 clause taking list argument Add exprecs '#get-'/1 for transforming records into lists Document the existence of the RFC 6733 dictionaries Don't hardcode common dictionary Add RFC 6733 dictionaries
2013-02-12Merge branch 'anders/diameter/reopen/OTP-10692'Anders Svensson
* anders/diameter/reopen/OTP-10692: Fix testcases in event suite Fix faulty watchdog transition INITIAL -> DOWN Fix faulty watchdog transition DOWN -> INITIAL Comment fixes Rename records peer/conn -> watchdog/peer in diameter_service Add testcases to traffic suite Simplify watchdog transitions in service process Simplify transport shutdown Remove upgrade code not needed after application restart Tweak (make) silent rules support
2013-02-12Merge branch 'vd/jinterface_windows_cookie/OTP-10821'Fredrik Gustafsson
* vd/jinterface_windows_cookie/OTP-10821: jinterface: fix finding cookie file on windows
2013-02-11Add length suite for testing Message Length errorsAnders Svensson
2013-02-11Fix test/depend.mk blunderAnders Svensson
Beam path in dependency was wrong.
2013-02-11Add transport_opt() length_errorsAnders Svensson
The value determines whether or not an unexpected message length in the header of an incoming messages causes the peer process to exit, the message to be discarded or handled as usual. The latter may only be appropriate for message-oriented transport (eg. SCTP) since stream-oriented transport (eg. TCP) may not be able to recover the message boundary once a length error has occurred.
2013-02-11Bumped version numberFredrik Gustafsson
2013-02-11Merge branch 'vd/tuple_constructor_bug/OTP-10819'Fredrik Gustafsson
* vd/tuple_constructor_bug/OTP-10819: fix bug in OtpErlangTuple constructor
2013-02-11[stdlib] Fix a bug concerning pretty printing and UnicodeHans Bolinder
Binaries were pretty printed too often.
2013-02-11Add file:list_dir_all/1 and file:read_link_all/1Björn Gustavsson
2013-02-11Make Unicode correctionsHans Bolinder
2013-02-11Merge branch 'bjorn/remove-tuple-funs/OTP-10170'Björn Gustavsson
* bjorn/remove-tuple-funs/OTP-10170: erl_eval: Don't allow evaluation of {M,F} in the shell
2013-02-11Merge branch 'bjorn/compiler/beam_utils-crash/OTP-10825'Björn Gustavsson
* bjorn/compiler/beam_utils-crash/OTP-10825: Fix unsafe optimization of funs
2013-02-11prim_file: Add list_dir_all() and read_link_all()Björn Gustavsson
2013-02-11Merge branch 'vd/code_get_mode/OTP-10823'Fredrik Gustafsson
* vd/code_get_mode/OTP-10823: Added name prefix to code.xml Add a new function code:get_mode() can be used to detect how the code servers behaves
2013-02-11erl_interface: Fixup of b069306, typdef enum erlang_char_encodingSverker Eriksson
2013-02-11Merge branch 'hb/stdlib/erl_scan_unicode/OTP-10756'Hans Bolinder
* hb/stdlib/erl_scan_unicode/OTP-10756: [stdlib] Remove the undocumented 'unicode' option from the scanner
2013-02-10Only start a fragment timer when there's something to flushAnders Svensson
2013-02-10Simplify and document diameter_tcp fragment timerAnders Svensson
Don't start a new timer with each incoming message. Instead, start a timer at timeout and flush after two successive timeouts with no message reception.
2013-02-10erl_eval: Don't allow evaluation of {M,F} in the shellBjörn Gustavsson
Tuples funs were removed in de7e01c958ff7c9e6da4034a53567a30a4ae5792, but it was still possible to evaluate tuple funs in the shell.
2013-02-10[stdlib] Remove the undocumented 'unicode' option from the scannerHans Bolinder
2013-02-10Comment fixAnders Svensson
2013-02-10Remove upgrade code not needed after application restartAnders Svensson
Which will be the case in R16B.
2013-02-09Fix unsafe optimization of funsBjörn Gustavsson
Commits 53bd4974a101 and 726f6e4c7afe simplified the handling of match_fail (used to generated exceptions such as 'function_clause') by first rewriting them to a call to erlang/error{1,2} and later rewriting them to specialized BEAM instructions (to reduce the code size). There was one flaw, though, which only was exposed when more aggressive optimizations were added in c3b60f86c622. Here is an example to explain it: t(V) -> fun(get) -> V end. The following BEAM code will be initially generated for the fun: {function, '-t/1-fun-0-', 2, 5}. {label,1}. {line,[{location,"t.erl",5}]}. {func_info,{atom,t},{atom,'-t/1-fun-0-'},2}. {label,2}. {test,is_eq_exact,{f,2},[{x,0},{atom,get}]}. {move,{x,1},{x,0}}. return. {label,2}. {test_heap,2,1}. {put_list,{x,0},nil,{x,1}}. {move,{atom,function_clause},{x,0}}. {line,[{location,"t.erl",5}]}. {call_ext_only,2,{extfunc,erlang,error,2}}. Translating back to Erlang code, that would be roughly: '-t/1-fun-0-'(get, V) -> V; '-t/1-fun-0-'(Arg1, _) -> erlang:error(function_clause, [Arg1]). Note that the second argument (the free variable V) is not included in the call to erlang:error/2. The beam_except pass will simplify the code to: {function, '-t/1-fun-0-', 2, 8}. {label,1}. {line,[{location,"t.erl",5}]}. {func_info,{atom,t},{atom,'-t/1-fun-0-'},2}. {label,2}. {test,is_eq_exact,{f,1},[{x,0},{atom,get}]}. {move,{x,1},{x,0}}. return. The code has been shortened by jumping to the func_info/3 instruction. Translating back to Erlang: '-t/1-fun-0-'(get, V) -> V; '-t/1-fun-0-'(Arg1, Arg2) -> erlang:error(function_clause, [Arg1,Arg2]). it is clear that both arguments are now included in the 'function_clause' exception, even though the initially generated code only included the first argument. That is no problem in this particular case, but for some more complex funs, optimizing the first version based on variable usage could make the second version unsafe. I rejected the following potential solutions: - Including the free arguments in the call to erlang:error/2: '-t/1-fun-0-'(get, V) -> V; '-t/1-fun-0-'(Arg1, Arg2) -> erlang:error(function_clause, [Arg1,Arg2]). Unfortunately, that is tricky. The free variables are only known after the second pass in v3_kernel when variable usage has been calculated. We would need to add a third pass (only for funs) that would the free arguments to the second argument for erlang:error/2 *and* update the variable usage information. - Calling beam_except earlier, from within beam_block before any optimizations based on variable usages are done. But means that the problem could reappear in some other form in the future when other updates are done to the code generator and/or optimization passes. The solution I have chosen is to modify beam_except to only replace a call to erlang:error(function_class, Args) if the length of Args is the same as the arity in the func_info/3 instruction. The code will be slightly larger. Also, the free variables for funs and list comprehensions will no longer be included in the function_clause exception (that could be less confusing, but it also means less information during debugging).
2013-02-08Merge branch 'anders/diameter/cover/OTP-10804'Anders Svensson
* anders/diameter/cover/OTP-10804: Update diameter.cover
2013-02-08Remove trailing whitespaceAnders Svensson
2013-02-08Tweak service interface towards diameter_peerAnders Svensson
2013-02-08Split message handling in diameter_service into diameter_trafficAnders Svensson
Traffic handling is connected to the service implementation through the pick_peer callback and failover but diameter_service was getting unwieldy as home to both the service process and traffic handling.
2013-02-08Simplify request recordAnders Svensson
In particular, remove fields containing values that are known (as of the preceding commit) to the request process.
2013-02-08Move failover out of service processAnders Svensson
In order to be able to remove fields from the request process that don't need to be there and do less in the service process. The pick_peer callback now takes place in the request process in the case of immutable state, just as in the case of the initial send.
2013-02-08Update traffic suite to test both RFC 3588 and 6733 dictionariesAnders Svensson
2013-02-08Update capx suite to test both RFC 3588 and 6733 dictionariesAnders Svensson
2013-02-08Add exprecs '#new-'/1 clause taking list argumentAnders Svensson
As an inverse to '#get-'/1 in the preceding commit.