From aschultz@REDACTED Mon Oct 3 14:05:40 2011 From: aschultz@REDACTED (Andreas Schultz) Date: Mon, 03 Oct 2011 14:05:40 +0200 (CEST) Subject: [erlang-patches] [PATCH] fix handling of ssl_cipher:block_decipher/5 failure In-Reply-To: <74b78642-9e41-498d-87d1-2ee13c382fda@office> Message-ID: Hi all, Included is a change to fix a badmatch error in ssl_cipher:generic_block_cipher_from_bin/2 and implement a CBC timming attack counter measure in ssl_cipher:block_decipher/5. Both changes are closely related. git fetch git@REDACTED:RoadRunnr/otp.git ssl-cbc-fix ssl_cipher:generic_block_cipher_from_bin/2 would generate a badmatch error when the padding length was greater than the overall data. This can happen when the decryption resulted in invalid data. It seems to me, that the try in block_decipher/5 was supposed to catch that, but it did not. Also, RFC 5246 suggests a counter measure for a CBC timing attack on the MAC calculation. This can easily be implemented by not generating the error alert in block_decipher/5 and invalidating the decoded text. It would also be possible to extend the return value of block_decipher with the result of the padding check and test that value later. However, this would also require changes to generic_block_cipher_from_bin/2. Thanks Andreas -- -- Dipl. Inform. Andreas Schultz email: as@REDACTED phone: +49-391-819099-224 mobil: +49-179-7654368 ------------------ managed broadband access ------------------ Travelping GmbH phone: +49-391-8190990 Roentgenstr. 13 fax: +49-391-819099299 D-39108 Magdeburg email: info@REDACTED GERMANY web: http://www.travelping.com Company Registration: HRB21276 Handelsregistergericht Chemnitz Geschaeftsfuehrer: Holger Winkelmann | VAT ID No.: DE236673780 -------------------------------------------------------------- From henrik@REDACTED Mon Oct 3 17:03:02 2011 From: henrik@REDACTED (Henrik Nord) Date: Mon, 3 Oct 2011 17:03:02 +0200 Subject: [erlang-patches] Fix documentation for erlang:process_info/2 In-Reply-To: References: <4E846605.5060406@erlang.org> Message-ID: <4E89CEA6.3010806@erlang.org> On 09/29/2011 07:15 PM, Filipe David Manana wrote: > On Thu, Sep 29, 2011 at 5:35 AM, Henrik Nord wrote: >> On 09/20/2011 07:57 PM, Filipe David Manana wrote: >>> git fetch git://github.com/fdmanana/otp.git process_info_doc_fix >>> >>> Web diff: >>> https://github.com/fdmanana/otp/compare/process_info_doc_fix >>> >> Hi >> >> We will not include this patch as it removes the description of the max >> priority. > I think it was misunderstood the goal of the patch. > The same exact paragraph, about process priorities, is duplicated in 2 places: > > https://github.com/erlang/otp/blob/dev/erts/doc/src/erlang.xml#L3660 > > and > > https://github.com/erlang/otp/blob/dev/erts/doc/src/erlang.xml#L3707 > > The first one makes sense, as it's under the section describing > process_flag(priority, Level). The second one however seems like a > copy paste accident because it's under the section describing > process_flag(save_calls, N). > >> However it might not be the best written part of the documentation, and if >> you want to reword it to make it easy for the reader we are willing to >> accept such a patch. >> >> -- >> /Henrik Nord Erlang/OTP >> >> _______________________________________________ >> erlang-patches mailing list >> erlang-patches@REDACTED >> http://erlang.org/mailman/listinfo/erlang-patches >> > > Ah we managed to miss that even when we had 2 pairs of eyes on the code. I will include the patch Thank you for the contribution! -- /Henrik Nord Erlang/OTP From ingela@REDACTED Tue Oct 4 18:13:59 2011 From: ingela@REDACTED (Ingela Anderton Andin) Date: Tue, 4 Oct 2011 18:13:59 +0200 Subject: [erlang-patches] [PATCH] fix handling of ssl_cipher:block_decipher/5 failure In-Reply-To: References: Message-ID: <4E8B30C7.3080005@erix.ericsson.se> Hi! This patch is to late for R14B04, but I think it is a good patch and I want to include it for the next release. I was just thinking that should not the aes_decipher_fail-test test that the Contetent and Mac values are not the expected ones and not only test that they are "something" of the expected size? Regards Ingela Erlang/OTP team - Ericsson AB Andreas Schultz wrote: > Hi all, > > Included is a change to fix a badmatch error in > ssl_cipher:generic_block_cipher_from_bin/2 and implement a CBC > timming attack counter measure in ssl_cipher:block_decipher/5. > Both changes are closely related. > > git fetch git@REDACTED:RoadRunnr/otp.git ssl-cbc-fix > > ssl_cipher:generic_block_cipher_from_bin/2 would generate a badmatch > error when the padding length was greater than the overall data. This > can happen when the decryption resulted in invalid data. It seems to > me, that the try in block_decipher/5 was supposed to catch that, but > it did not. > > Also, RFC 5246 suggests a counter measure for a CBC timing attack on > the MAC calculation. This can easily be implemented by not generating > the error alert in block_decipher/5 and invalidating the decoded text. > > It would also be possible to extend the return value of block_decipher > with the result of the padding check and test that value later. However, > this would also require changes to generic_block_cipher_from_bin/2. > > Thanks > Andreas > > From aschultz@REDACTED Tue Oct 4 18:57:13 2011 From: aschultz@REDACTED (Andreas Schultz) Date: Tue, 04 Oct 2011 18:57:13 +0200 (CEST) Subject: [erlang-patches] [PATCH] fix handling of ssl_cipher:block_decipher/5 failure In-Reply-To: <4E8B30C7.3080005@erix.ericsson.se> Message-ID: Hi, ----- Original Message ----- > Hi! > > This patch is to late for R14B04, but I think it is a good patch and > I want to include it for the next release. > I was just thinking that should not the aes_decipher_fail-test test > that the Contetent and Mac values are > not the expected ones and not only test that they are "something" of > the expected size? I am not sure that this would actually make a difference. I was not trying to check if AES works (thats a test for the crypto module). The test is supposed to check that handle padding correctly and deal with the fallout of an decryption failure in the right way. It is not really obvious from the test, but the expected size in the good case is actually 22, so getting something different means that the decryption must have failed. The plain text contains a 10 byte padding, which can not be stripped when the encryption fails. Also, the real test is that we get the three element tupple and not a ?BAD_RECORD_MAC alert or (as would happen without the generic_block_cipher_from_bin change) a badmatch error. I did choose the bad key in a way that it would lead to a padding length greater than the text length. Regards Andreas > > Regards Ingela Erlang/OTP team - Ericsson AB > > Andreas Schultz wrote: > > Hi all, > > > > Included is a change to fix a badmatch error in > > ssl_cipher:generic_block_cipher_from_bin/2 and implement a CBC > > timming attack counter measure in ssl_cipher:block_decipher/5. > > Both changes are closely related. > > > > git fetch git@REDACTED:RoadRunnr/otp.git ssl-cbc-fix > > > > ssl_cipher:generic_block_cipher_from_bin/2 would generate a > > badmatch > > error when the padding length was greater than the overall data. > > This > > can happen when the decryption resulted in invalid data. It seems > > to > > me, that the try in block_decipher/5 was supposed to catch that, > > but > > it did not. > > > > Also, RFC 5246 suggests a counter measure for a CBC timing attack > > on > > the MAC calculation. This can easily be implemented by not > > generating > > the error alert in block_decipher/5 and invalidating the decoded > > text. > > > > It would also be possible to extend the return value of > > block_decipher > > with the result of the padding check and test that value later. > > However, > > this would also require changes to generic_block_cipher_from_bin/2. > > > > Thanks > > Andreas > > > > > > -- -- Dipl. Inform. Andreas Schultz email: as@REDACTED phone: +49-391-819099-224 mobil: +49-179-7654368 ------------------ managed broadband access ------------------ Travelping GmbH phone: +49-391-8190990 Roentgenstr. 13 fax: +49-391-819099299 D-39108 Magdeburg email: info@REDACTED GERMANY web: http://www.travelping.com Company Registration: HRB21276 Handelsregistergericht Chemnitz Geschaeftsfuehrer: Holger Winkelmann | VAT ID No.: DE236673780 -------------------------------------------------------------- From tuncer.ayaz@REDACTED Wed Oct 5 17:00:16 2011 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Wed, 5 Oct 2011 17:00:16 +0200 Subject: [erlang-patches] snmpc: fix --warnings/--W option parsing Message-ID: git fetch git://github.com/tuncer/otp.git snmcp-warnings-option https://github.com/tuncer/otp/compare/snmcp-warnings-option https://github.com/tuncer/otp/compare/snmcp-warnings-option.patch From hm@REDACTED Thu Oct 6 08:22:14 2011 From: hm@REDACTED (=?ISO-8859-1?Q?H=E5kan_Mattsson?=) Date: Thu, 6 Oct 2011 08:22:14 +0200 Subject: [erlang-patches] [erts, stdlib] fix escript/primary archive reloading In-Reply-To: References: Message-ID: I do not like that erl_prim_loader has knowledge of escript internals. Much of the "new" code is copied from escript. It would be better if the caller to set_primary_archive/3 could give a fun or MFA as argument which can be executed when the archive needs to be re-opened. Then we would avoid this duplication of code. /H?kan On Sun, Sep 18, 2011 at 1:16 AM, Tuncer Ayaz wrote: > git fetch git://github.com/tuncer/otp.git > erl_prim_loader-primary_archive-reloading > > > https://github.com/tuncer/otp/compare/erl_prim_loader-primary_archive-reloading > > https://github.com/tuncer/otp/compare/erl_prim_loader-primary_archive-reloading.patch > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ingela@REDACTED Thu Oct 6 09:30:18 2011 From: ingela@REDACTED (Ingela Anderton Andin) Date: Thu, 6 Oct 2011 09:30:18 +0200 Subject: [erlang-patches] [PATCH] fix handling of ssl_cipher:block_decipher/5 failure In-Reply-To: References: Message-ID: <4E8D590A.2070903@erix.ericsson.se> Hi! Thank you for the explanation I am with you now. Regards Ingela Erlang/OTP team - Ericsson AB Andreas Schultz wrote: > Hi, > > ----- Original Message ----- > >> Hi! >> >> This patch is to late for R14B04, but I think it is a good patch and >> I want to include it for the next release. >> I was just thinking that should not the aes_decipher_fail-test test >> that the Contetent and Mac values are >> not the expected ones and not only test that they are "something" of >> the expected size? >> > > I am not sure that this would actually make a difference. I was not trying > to check if AES works (thats a test for the crypto module). The test is > supposed to check that handle padding correctly and deal with the fallout > of an decryption failure in the right way. > > It is not really obvious from the test, but the expected size in the good case > is actually 22, so getting something different means that the decryption must > have failed. The plain text contains a 10 byte padding, which can not be stripped > when the encryption fails. > > Also, the real test is that we get the three element tupple and not a ?BAD_RECORD_MAC > alert or (as would happen without the generic_block_cipher_from_bin change) a badmatch > error. I did choose the bad key in a way that it would lead to a padding length greater > than the text length. > > Regards > Andreas > > >> Regards Ingela Erlang/OTP team - Ericsson AB >> >> Andreas Schultz wrote: >> >>> Hi all, >>> >>> Included is a change to fix a badmatch error in >>> ssl_cipher:generic_block_cipher_from_bin/2 and implement a CBC >>> timming attack counter measure in ssl_cipher:block_decipher/5. >>> Both changes are closely related. >>> >>> git fetch git@REDACTED:RoadRunnr/otp.git ssl-cbc-fix >>> >>> ssl_cipher:generic_block_cipher_from_bin/2 would generate a >>> badmatch >>> error when the padding length was greater than the overall data. >>> This >>> can happen when the decryption resulted in invalid data. It seems >>> to >>> me, that the try in block_decipher/5 was supposed to catch that, >>> but >>> it did not. >>> >>> Also, RFC 5246 suggests a counter measure for a CBC timing attack >>> on >>> the MAC calculation. This can easily be implemented by not >>> generating >>> the error alert in block_decipher/5 and invalidating the decoded >>> text. >>> >>> It would also be possible to extend the return value of >>> block_decipher >>> with the result of the padding check and test that value later. >>> However, >>> this would also require changes to generic_block_cipher_from_bin/2. >>> >>> Thanks >>> Andreas >>> >>> >>> >> > > From tuncer.ayaz@REDACTED Thu Oct 6 10:23:26 2011 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Thu, 6 Oct 2011 10:23:26 +0200 Subject: [erlang-patches] [erts, stdlib] fix escript/primary archive reloading In-Reply-To: References: Message-ID: 2011/10/6 H?kan Mattsson : > I do not like that erl_prim_loader has knowledge of escript > internals. Much of the "new" code is copied from escript. > > It would be better if the caller to set_primary_archive/3 could give > a fun or MFA as argument which can be executed when the archive > needs to be re-opened. Then we would avoid this duplication of code. Shouldn't the modules in erts/preloaded avoid using modules from lib? What about sharing the code in a new module like erts/preloaded/src/prim_escript.erl? From hm@REDACTED Thu Oct 6 10:44:00 2011 From: hm@REDACTED (=?ISO-8859-1?Q?H=E5kan_Mattsson?=) Date: Thu, 6 Oct 2011 10:44:00 +0200 Subject: [erlang-patches] [erts, stdlib] fix escript/primary archive reloading In-Reply-To: References: Message-ID: 2011/10/6 Tuncer Ayaz > 2011/10/6 H?kan Mattsson : > > I do not like that erl_prim_loader has knowledge of escript > > internals. Much of the "new" code is copied from escript. > > > > It would be better if the caller to set_primary_archive/3 could give > > a fun or MFA as argument which can be executed when the archive > > needs to be re-opened. Then we would avoid this duplication of code. > > Shouldn't the modules in erts/preloaded avoid using modules from lib? > Yes, but my suggestion does not introduce such a dependency. erl_prim_loader will just apply a fun (or MFA) that it gets as argument. There is no hard dependencies in the "wrong" direction. Compare it with how the lists module works. The lists module applies funs from other applications but does not dependent on them. > > What about sharing the code in a new module like > erts/preloaded/src/prim_escript.erl? > It seems unneccessary. What would the purpose be? /H?kan -------------- next part -------------- An HTML attachment was scrubbed... URL: From egil@REDACTED Thu Oct 6 14:18:35 2011 From: egil@REDACTED (=?ISO-8859-1?Q?Bj=F6rn-Egil_Dahlberg?=) Date: Thu, 6 Oct 2011 14:18:35 +0200 Subject: [erlang-patches] INFORMATION: New Git branch-names and strategy Message-ID: <4E8D9C9B.2080805@erlang.org> A new branching strategy is now in place for Erlang/OTP development and patch submissions. A detailed description can be found on our Github Wiki for the Erlang/OTP project. - https://github.com/erlang/otp/wiki/Branches - https://github.com/erlang/otp/wiki/Submitting-patches To summarize. We will have two development branches: one for features and one for corrections. The 'master' branch will now reflect feature development aimed for our next major release. After our R15 release we will also have a 'maint' branch which will include any corrections and minor features submitted by the community. The 'maint' branch will progress and become our next minor release (e.g. R15B01). Regards, Bj?rn-Egil and Henrik Erlang/OTP From henrik@REDACTED Mon Oct 10 14:16:48 2011 From: henrik@REDACTED (Henrik Nord) Date: Mon, 10 Oct 2011 14:16:48 +0200 Subject: [erlang-patches] What's cooking in erlang/otp (2011-10-07) Message-ID: <201110101216.p9ACGk5v007379@smaug.otp.ericsson.se> Read https://github.com/erlang/otp/wiki/Branches and https://github.com/erlang/otp/wiki/Submitting-patches New Branching strategy short version: The branch 'master' will be the upcoming major release (e.g. R15). Branch from this to submit patches for the next major release. (New features and major changes) New branch 'maint' will be introduced AFTER R15, and will be the next maintenance release (e.g. R15B01) Branch from this to submit patches for the next maintenance release. (Bug fixes and minor changes) The 'pu' branch will be based on 'master' and we will later add a 'maint-pu' for the 'maint' branch. ------------------------------------------------------------ [Graduated] * hl/beam_disasm-no_attri_chunk (compiler) (2011-07-22) 1 commit + beam_disasm: Handle stripped BEAM files (347dfb0) * pd/ttb-cleanup (observer, runtime_tools) (2011-08-25) 38 commits + Support for stopped and resumed tracing. (7e2c876) + More robust testing of tracing with 'local' option. (1924817) + Print path to logs dir unless nofetch option specified. (f7dc3bf) + Removed unused option to send realtime trace to erlide. (224f432) + Documented global state when applying formatting function to trace logs. (584eec8) + Test for: (BUGFIX) Error with ip tracing to wrap sets. (7f2123b) + Stop option 'return' changed to 'return_fetch_dir' (b610184) + update format function's description (e598660) + It is safe to change cwd on control node or remote nodes while tracing (2d319d3) + fixed documentation (4e3b8cc) + additional tests for ttb module (da2e84e) + new tests for ttb module (871839b) * rc/edoc-0.7.9 (edoc) (2011-09-25) 6 commits + bumped revision (df2063c) + removed some never-matching clauses reported by dialyzer (823f018) + Fix macro expansion in comments following Erlang types (530d3b1) + URI-escape bytes as two hex digits always (reported by Alfonso De Gregorio) (10f7682) + updated author e-mail (766d0f0) + recognize some more URI schemas in wiki text, in particular https (d11d6ac) * rc/eunit-2.2.1 (eunit) (2011-09-23) 4 commits + removed some never-matching clauses reported by dialyzer (c78dae0) + updated author e-mails and homepages (fde5038) + removed cvs keywords from files (33b9fe2) + removed files that should not be checked in (756f301) * sa/dialyzer-bug-fixes (dialyzer, hipe, typer) (2011-09-28) 4 commits + Fix typer's crash for nonexisting files (e4d5a20) + Remove unused macro (39a3e0a) + Decrease tuple arity limit (7fc2604) + Fix bug in dataflow (e36b171) * va/http-win-dir-traversal (inets) (2011-08-26) 1 commit + Fix httpd directory traversal on Windows (a936795) * sa/callback-attr (compiler, inets, kernel, otp, stdlib) (2010-06-08) 8 commits . Add callback specs into 'application' module in kernel (a54866b) . Add callback specs to tftp module following internet documentation (e14c3c6) . Add callback specs to inets_service module following possibly deprecated comments (3eaa5a9) . Add '-callback' attributes in stdlib's behaviours (b606232) . Update primary bootstrap (fbf331d) . Update the documentation with information on the callback attribute (e6a152e) . Automatically generate 'behaviour_info' function from '-callback' attributes (c1aa398) . Add '-callback' attribute to language syntax (1837121) ------------------------------------------------------------ [New topics] * fm/process_info_doc_fix (erts) (2011-09-20) 1 commit - Fix documentation for erlang:process_flag/2 (e88a46d) * gs/mod_log-fix (inets) (2011-09-24) 1 commit - Fix logging of content length in mod_log (166f4cc) * mh/run_erl-exit-status (erts) (2011-09-02) 1 commit - run_erl.c: propagate exit status from child process (29364cf) * rj/fix-debugger-msgs (debugger) (2011-09-25) 2 commits - Fixes "OK" spelling in debugger messages and variables (808629d) - Fixes debugger message with wx (e43aa85) * rj/fix-erlang-doc-style (erts) (2011-09-26) 1 commit - Fixes module erlang doc style: option description (283e3ab) * rj/fix-net_kernel-doc (kernel) (2011-09-28) 1 commit - Fixes net_kernel:get_net_ticktime() doc (bfa676a) * rj/fix-remove-exec-bit (asn1, common_test, debugger, dialyzer, docbuilder, erts, hipe, orber, otp, percept, public_key, sasl, snmp, ssh, wx, xmerl) (2011-09-24) 3 commits - Removes exec bit from files: info files, dat, bat (25d7dee) - Removes exec bit from files related to: XML, make, C (b414881) - Removes exec bit from: erl, hrl, xml, html, asn, gif, xpm (75a1021) ------------------------------------------------------------ [Stalled] * jn/gen_stream (stdlib) (2011-04-15) 2 commits - Update gen_stream tests to conform with common_test standard (ce84daf) - Add gen_stream behaviour (6a089a4) Action expected from: OTP-Team * bw/efile_exists (erts) (2010-10-07) 1 commit - prim_file:exists/{1,2} which is lightweight file existence check (7203932) Action expected from: Topic author * fm/posix-fallocate (erts, kernel) (2010-12-28) 1 commit - Added file:allocate/2 (682f39a) Action expected from: Topic author * tn/inet_drv-fix (erts) (2011-04-08) 1 commit - Use libdlpi to get physical address (e360563) Action expected from: Topic author * pr/mnesia_frag_hash (mnesia) (2011-04-27) 2 commits - add mnesia_frag_hash test (1d6762d) - Reduce calls to phash in key_to_frag_number (67a20c0) Action expected from: Topic author ------------------------------------------------------------ [Cooking] * bg/temp-hipe-fixes (compiler, kernel) (2010-03-15) 5 commits - Avoid crash by skipping compilation_SUITE:on_load/1 (0198ee2) - Inline less aggressively for native-code compilation (41638df) - seq_trace_SUITE: Don't native-compile (fce2b79) - Disable native code if on_load is used (c8994f2) - andor_SUITE: Don't native-compile (531e5d9) This branch contains temporary workarounds to avoid failing test cases and is never intended to graduate. * cf/simple_one_for_one_shutdown (otp, stdlib) (2011-09-14) 3 commits - Explain how dynamic child processes are stopped (0473132) - Stack errors when dynamic children are stopped (42c581d) - Explicitly kill dynamic children in supervisors (4775947) * cf/supervisor_shutdown_infinity (otp, stdlib) (2011-09-14) 2 commits - Add a warning to docs about workers' shutdown strategy (76cc98d) - Allow an infinite timeout to shutdown worker processes (9f6552d) * hl/fix-ms_transform-scope-warn (stdlib) (2011-08-26) 1 commit - ms_transform: Fix incorrect `variable shadowed' warnings (29610af) * mh/create_cookie_error_msg (kernel) (2011-09-15) 1 commit - Specify file name and error on create_cookie failure (9319587) * pg/fix-cover-leftover-down-msg (tools) (2011-08-29) 1 commit - [cover]fix leftover {'DOWN', ..} msg in callers queue (cc087c3) * rc/remote-shell-completion (kernel) (2010-10-22) 1 commit - make tab completion work in remote shells (73d1959) * rj/fix-doctypos (kernel, otp) (2011-09-19) 3 commits - Adds missing spaces in Reference Manual in distributed section (0ac642f) - Fixes typo in heart doc, adds missing parenthesis (60ed9f9) - Fixes typo in Reference Manual in macros section (63c101d) * ta/erl_prim_loader-primary_archive-reloading (erts, stdlib) (2011-09-01) 1 commit - [erts,stdlib] fix escript/primary archive reloading (e88bfb7) * ta/sendfile (erts, kernel) (2011-01-13) 1 commit - Implement file:sendfile (e362bb2) * ta/nif-variadic-funs (erts) (2011-05-13) 1 commit - erts: convert variadic nif funs into inline funs (9a1f9b6) * fm/enif_is_number (erts) (2011-06-08) 1 commit - Add NIF function enif_is_number (8db78b0) * ms/epmd-IPv6-node-reg (erts, kernel) (2011-06-03) 1 commit - epmd: support IPv6 node registration (5523b21) * nox/xmerl-namespace-axis (xmerl) (2010-12-07) 12 commits . Implement namespace axis (27d791f) . Add `#xmlPI` support to xmerl_xpath:write_node/1 (75e67f5) . Fix processing-instruction(name?) (f05e78b) . Fix path filters (610df56) . Support more top-level primary expressions (770d6d9) . Accumulate comments in element nodes (e5b6b3a) . Add `default_attrs` option (18584c5) . Allow whole documents to be returned (aef3dea) . Track parents and namespace in `#xmlAttribute` nodes (dc9b220) . Track parents in `#xmlPI` nodes (5095331) . Set `vsn` field in `#xmlDecl` record (d712331) . Fix namespace-conformance constraints (e062270) * rc/epp-include-path-fix (stdlib) (2011-06-14) 1 commit - Make epp search directory of current file first when including another file (3001e9d) ------------------------------------------------------------ [Dropped] * rj/typer-fix-delete (typer) (2011-09-24) 1 commit . Fixes TypEr crash when doing old files cleanup (189d095) Adressed by Kostis/Stavros in sa/dialyzer-bug-fixes From tuncer.ayaz@REDACTED Tue Oct 11 22:48:19 2011 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Tue, 11 Oct 2011 22:48:19 +0200 Subject: [erlang-patches] [erts, stdlib] fix escript/primary archive reloading In-Reply-To: References: Message-ID: On Sun, Sep 18, 2011 at 1:16 AM, Tuncer Ayaz wrote: > git fetch git://github.com/tuncer/otp.git > erl_prim_loader-primary_archive-reloading > > https://github.com/tuncer/otp/compare/erl_prim_loader-primary_archive-reloading > https://github.com/tuncer/otp/compare/erl_prim_loader-primary_archive-reloading.patch Incorporated changes as suggested by Hakan Mattson. Please refetch. From henrik@REDACTED Wed Oct 12 09:48:12 2011 From: henrik@REDACTED (Henrik Nord) Date: Wed, 12 Oct 2011 09:48:12 +0200 Subject: [erlang-patches] [erts, stdlib] fix escript/primary archive reloading In-Reply-To: References: Message-ID: <4E95463C.6010701@erlang.org> On 10/11/2011 10:48 PM, Tuncer Ayaz wrote: > On Sun, Sep 18, 2011 at 1:16 AM, Tuncer Ayaz wrote: >> git fetch git://github.com/tuncer/otp.git >> erl_prim_loader-primary_archive-reloading >> >> https://github.com/tuncer/otp/compare/erl_prim_loader-primary_archive-reloading >> https://github.com/tuncer/otp/compare/erl_prim_loader-primary_archive-reloading.patch > Incorporated changes as suggested by Hakan Mattson. > Please refetch. > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches refetched -- /Henrik Nord Erlang/OTP From aronisstav@REDACTED Fri Oct 14 19:49:15 2011 From: aronisstav@REDACTED (Stavros Aronis) Date: Fri, 14 Oct 2011 20:49:15 +0300 Subject: [erlang-patches] Dialyzer fixes Message-ID: Commit messages explain everything. git fetch git://github.com/aronisstav/otp.git dialyzer-wunderspecs Stavros -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe@REDACTED Fri Oct 14 23:04:16 2011 From: joe@REDACTED (Joe Williams) Date: Fri, 14 Oct 2011 14:04:16 -0700 Subject: [erlang-patches] gen_event clean ups Message-ID: git fetch git://github.com/joewilliams/otp.git gen_event -- Name: Joseph A. Williams Email: joe@REDACTED Blog: http://www.joeandmotorboat.com/ Twitter: http://twitter.com/williamsjoe -------------- next part -------------- An HTML attachment was scrubbed... URL: From laforge@REDACTED Sat Oct 15 22:43:58 2011 From: laforge@REDACTED (Harald Welte) Date: Sat, 15 Oct 2011 22:43:58 +0200 Subject: [erlang-patches] [PATCH] asn1rt_check: Fix transform_to_EXTERNAL1990 for binary input Message-ID: <20111015204358.GD28063@prithivi.gnumonks.org> If ber_bin is used, decoded EXTERNAL types will include a binary Data_value in the {'EXTERNAL', ...} tuple. When handing such a tuple to the encoder again, we should properly encode it. To do so, we treat a binary data part just like a list data part. --- lib/asn1/src/asn1rt_check.erl | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/asn1/src/asn1rt_check.erl b/lib/asn1/src/asn1rt_check.erl index 24a2a38..1c5ec89 100644 --- a/lib/asn1/src/asn1rt_check.erl +++ b/lib/asn1/src/asn1rt_check.erl @@ -313,7 +313,8 @@ transform_to_EXTERNAL1990([Data_val_desc,Data_value],Acc) when is_binary(Data_value)-> list_to_tuple(lists:reverse([{'single-ASN1-type',Data_value}, Data_val_desc|Acc])); -transform_to_EXTERNAL1990([Data_value],Acc) when is_list(Data_value)-> +transform_to_EXTERNAL1990([Data_value],Acc) + when is_list(Data_value); is_binary(Data_value) -> list_to_tuple(lists:reverse([{'octet-aligned',Data_value}|Acc])). -- 1.7.6.3 From henrik@REDACTED Mon Oct 17 11:25:23 2011 From: henrik@REDACTED (Henrik Nord) Date: Mon, 17 Oct 2011 11:25:23 +0200 Subject: [erlang-patches] Dialyzer fixes In-Reply-To: References: Message-ID: <4E9BF483.30305@erlang.org> On 10/14/2011 07:49 PM, Stavros Aronis wrote: > Commit messages explain everything. > > git fetch git://github.com/aronisstav/otp.git > dialyzer-wunderspecs > > Stavros > > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches Thank you Stavros, branch included in 'pu' -- /Henrik Nord Erlang/OTP -------------- next part -------------- An HTML attachment was scrubbed... URL: From henrik@REDACTED Tue Oct 18 11:53:14 2011 From: henrik@REDACTED (Henrik Nord) Date: Tue, 18 Oct 2011 11:53:14 +0200 Subject: [erlang-patches] [PATCH] asn1rt_check: Fix transform_to_EXTERNAL1990 for binary input In-Reply-To: <20111015204358.GD28063@prithivi.gnumonks.org> References: <20111015204358.GD28063@prithivi.gnumonks.org> Message-ID: <4E9D4C8A.8000804@erlang.org> On 10/15/2011 10:43 PM, Harald Welte wrote: > If ber_bin is used, decoded EXTERNAL types will include a binary > Data_value in the {'EXTERNAL', ...} tuple. When handing such a tuple to > the encoder again, we should properly encode it. > > To do so, we treat a binary data part just like a list data part. > --- > lib/asn1/src/asn1rt_check.erl | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/lib/asn1/src/asn1rt_check.erl b/lib/asn1/src/asn1rt_check.erl > index 24a2a38..1c5ec89 100644 > --- a/lib/asn1/src/asn1rt_check.erl > +++ b/lib/asn1/src/asn1rt_check.erl > @@ -313,7 +313,8 @@ transform_to_EXTERNAL1990([Data_val_desc,Data_value],Acc) > when is_binary(Data_value)-> > list_to_tuple(lists:reverse([{'single-ASN1-type',Data_value}, > Data_val_desc|Acc])); > -transform_to_EXTERNAL1990([Data_value],Acc) when is_list(Data_value)-> > +transform_to_EXTERNAL1990([Data_value],Acc) > + when is_list(Data_value); is_binary(Data_value) -> > list_to_tuple(lists:reverse([{'octet-aligned',Data_value}|Acc])). > > Thank you for the contribution. I will include this in 'pu' -- /Henrik Nord Erlang/OTP From henrik@REDACTED Tue Oct 18 11:56:33 2011 From: henrik@REDACTED (Henrik Nord) Date: Tue, 18 Oct 2011 11:56:33 +0200 Subject: [erlang-patches] gen_event clean ups In-Reply-To: References: Message-ID: <4E9D4D51.3040508@erlang.org> On 10/14/2011 11:04 PM, Joe Williams wrote: > git fetch git://github.com/joewilliams/otp.git gen_event > > > -- > Name: Joseph A. Williams > Email: joe@REDACTED > Blog: http://www.joeandmotorboat.com/ > Twitter: http://twitter.com/williamsjoe > > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches Thank you Joe! branch included in 'pu' -- /Henrik Nord Erlang/OTP -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe@REDACTED Tue Oct 18 19:01:13 2011 From: joe@REDACTED (Joe Williams) Date: Tue, 18 Oct 2011 10:01:13 -0700 Subject: [erlang-patches] addition of release_handler:which_releases/1 Message-ID: <4385849BC24E47B8AAF8E5A3A32C6EC0@joetify.com> git fetch git://github.com/joewilliams/otp.git release_handler_which_releases -- Name: Joseph A. Williams Email: joe@REDACTED Blog: http://www.joeandmotorboat.com/ Twitter: http://twitter.com/williamsjoe -------------- next part -------------- An HTML attachment was scrubbed... URL: From henrik@REDACTED Wed Oct 19 10:25:37 2011 From: henrik@REDACTED (Henrik Nord) Date: Wed, 19 Oct 2011 10:25:37 +0200 Subject: [erlang-patches] addition of release_handler:which_releases/1 In-Reply-To: <4385849BC24E47B8AAF8E5A3A32C6EC0@joetify.com> References: <4385849BC24E47B8AAF8E5A3A32C6EC0@joetify.com> Message-ID: <4E9E8981.9020904@erlang.org> On 10/18/2011 07:01 PM, Joe Williams wrote: > git fetch > git://github.com/joewilliams/otp.git release_handler_which_releases Thank you, included in 'pu' -- /Henrik Nord Erlang/OTP From henrik@REDACTED Wed Oct 19 15:45:17 2011 From: henrik@REDACTED (Henrik Nord) Date: Wed, 19 Oct 2011 15:45:17 +0200 Subject: [erlang-patches] addition of release_handler:which_releases/1 In-Reply-To: <4385849BC24E47B8AAF8E5A3A32C6EC0@joetify.com> References: <4385849BC24E47B8AAF8E5A3A32C6EC0@joetify.com> Message-ID: <4E9ED46D.8010402@erlang.org> On 10/18/2011 07:01 PM, Joe Williams wrote: > git fetch > git://github.com/joewilliams/otp.git release_handler_which_releases > > > -- > Name: Joseph A. Williams > Email: joe@REDACTED > Blog: http://www.joeandmotorboat.com/ > Twitter: http://twitter.com/williamsjoe > > > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches I would like tests and documentation for this extension before considering it for graduation. Thank you -- /Henrik Nord Erlang/OTP -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe@REDACTED Wed Oct 19 19:09:59 2011 From: joe@REDACTED (Joe Williams) Date: Wed, 19 Oct 2011 10:09:59 -0700 Subject: [erlang-patches] addition of release_handler:which_releases/1 In-Reply-To: <4E9ED46D.8010402@erlang.org> References: <4385849BC24E47B8AAF8E5A3A32C6EC0@joetify.com> <4E9ED46D.8010402@erlang.org> Message-ID: Please refetch, this patch now includes docs and tests. git fetch git://github.com/joewilliams/otp.git release_handler_which_releases Also note that the test is untested as there is currently an error during "make release_tests", output in link below. https://gist.github.com/dd106072ce11cc22fee9 -- Name: Joseph A. Williams Email: joe@REDACTED Blog: http://www.joeandmotorboat.com/ Twitter: http://twitter.com/williamsjoe On Wednesday, October 19, 2011 at 6:45 AM, Henrik Nord wrote: > On 10/18/2011 07:01 PM, Joe Williams wrote: > > git fetch git://github.com/joewilliams/otp.git (http://github.com/joewilliams/otp.git) release_handler_which_releases > > > > > > -- > > Name: Joseph A. Williams > > Email: joe@REDACTED (mailto:joe@REDACTED) > > Blog: http://www.joeandmotorboat.com/ > > Twitter: http://twitter.com/williamsjoe > > > > > > > > _______________________________________________ erlang-patches mailing list erlang-patches@REDACTED (mailto:erlang-patches@REDACTED) http://erlang.org/mailman/listinfo/erlang-patches I would like tests and documentation for this extension before considering it for graduation. > > Thank you > > -- /Henrik Nord Erlang/OTP -------------- next part -------------- An HTML attachment was scrubbed... URL: From henrik@REDACTED Thu Oct 20 09:52:44 2011 From: henrik@REDACTED (Henrik Nord) Date: Thu, 20 Oct 2011 09:52:44 +0200 Subject: [erlang-patches] addition of release_handler:which_releases/1 In-Reply-To: References: <4385849BC24E47B8AAF8E5A3A32C6EC0@joetify.com> <4E9ED46D.8010402@erlang.org> Message-ID: <4E9FD34C.20909@erlang.org> On 10/19/2011 07:09 PM, Joe Williams wrote: > Please refetch, this patch now includes docs and tests. > > git fetch git://github.com/joewilliams/otp.git > release_handler_which_releases > Thank you. > > Also note that the test is untested as there is currently an error > during "make release_tests", output in link below. > > https://gist.github.com/dd106072ce11cc22fee9 > > > > -- > Name: Joseph A. Williams > Email: joe@REDACTED > Blog: http://www.joeandmotorboat.com/ > Twitter: http://twitter.com/williamsjoe > > On Wednesday, October 19, 2011 at 6:45 AM, Henrik Nord wrote: > >> On 10/18/2011 07:01 PM, Joe Williams wrote: >>> git fetch git://github.com/joewilliams/otp.git >>> release_handler_which_releases >>> >>> >>> -- >>> Name: Joseph A. Williams >>> Email: joe@REDACTED >>> Blog: http://www.joeandmotorboat.com/ >>> Twitter: http://twitter.com/williamsjoe >>> >>> >>> >>> _______________________________________________ >>> erlang-patches mailing list >>> erlang-patches@REDACTED >>> http://erlang.org/mailman/listinfo/erlang-patches >> I would like tests and documentation for this extension before >> considering it for graduation. >> >> Thank you >> >> -- >> /Henrik Nord Erlang/OTP > -- /Henrik Nord Erlang/OTP -------------- next part -------------- An HTML attachment was scrubbed... URL: From vladdu55@REDACTED Thu Oct 20 14:38:24 2011 From: vladdu55@REDACTED (Vlad Dumitrescu) Date: Thu, 20 Oct 2011 14:38:24 +0200 Subject: [erlang-patches] jinterface: workaround for a Java bug Message-ID: git fetch git://github.com/vladdu/opt.git java_string_bug https://github.com/vladdu/otp/compare/java_string_bug https://github.com/vladdu/otp/compare/java_string_bug.patch OtpErlangString is affected by Java bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6242664 Java 1.5 has a bug where detecting codepoint offsets in strings that are created by String.substring() gives wrong results. The new implementation uses a different method, avoinding the issue. The following code will crash without the fix: final String s = "abcdefg"; final String ss = s.substring(3, 6); final int[] cps = OtpErlangString.stringToCodePoints(ss); regards, Vlad From magnus.henoch@REDACTED Fri Oct 21 18:52:02 2011 From: magnus.henoch@REDACTED (Magnus Henoch) Date: Fri, 21 Oct 2011 17:52:02 +0100 (BST) Subject: [erlang-patches] An ODBC process should exit normally if its client exits with 'shutdown' Message-ID: <568484fa-5510-4448-91ab-1c8343ca2334@knuth> I noticed that ODBC processes would always generate crash reports when our system was being shut down, and came up with this patch: git fetch git://github.com/legoscia/otp.git odbc-shutdown-normal-exit https://github.com/legoscia/otp/compare/odbc-shutdown-normal-exit https://github.com/legoscia/otp/compare/odbc-shutdown-normal-exit.patch Here is an example of such a crash report: =CRASH REPORT==== 21-Oct-2011::16:52:55 === crasher: initial call: odbc:init/1 pid: <0.2685.0> registered_name: [] exception exit: {stopped,{'EXIT',<0.2684.0>,shutdown}} in function gen_server:terminate/6 ancestors: [odbc_sup,<0.2520.0>] messages: [{'EXIT',#Port<0.26070>,normal}] links: [<0.2521.0>] dictionary: [] trap_exit: true status: running heap_size: 610 stack_size: 24 reductions: 1483 neighbours: -- Magnus Henoch Erlang Solutions Ltd http://www.erlang-solutions.com/ From cyg.cao@REDACTED Wed Oct 26 10:14:40 2011 From: cyg.cao@REDACTED (Wei Cao) Date: Wed, 26 Oct 2011 16:14:40 +0800 Subject: [erlang-patches] fix erl_interface crash Message-ID: Fix a crash in erl_interface. erl_interface use linux select() to get notified on socket events, which works when fd is less than 1024. however, when fd is larger than 1024, the fd_set structure on stack gets corrupted and the process crashes soon, this is possible when there are lots of connections kept or the process keeps creating new connect and closing it. git fetch git://github.com/weicao/otp.git erl_interface_replace_select_ with_poll https://github.com/weicao/otp/compare/erl_interface_replace_select_with_poll https://github.com/weicao/otp/compare/erl_interface_replace_select_with_poll.patch -- Best, Wei Cao -------------- next part -------------- An HTML attachment was scrubbed... URL: From henrik@REDACTED Wed Oct 26 12:05:08 2011 From: henrik@REDACTED (Henrik Nord) Date: Wed, 26 Oct 2011 12:05:08 +0200 Subject: [erlang-patches] fix erl_interface crash In-Reply-To: References: Message-ID: <4EA7DB54.6040402@erlang.org> On 10/26/2011 10:14 AM, Wei Cao wrote: > Fix a crash in erl_interface. > > erl_interface use linux select() to get notified on socket events, > which works when fd is less than 1024. > > however, when fd is larger than 1024, the fd_set structure on stack > gets corrupted and the process crashes soon, > > this is possible when there are lots of connections kept or the > process keeps creating new connect and closing it. > > > git fetch git://github.com/weicao/otp.git > erl_interface_replace_select_ > with_poll > > > https://github.com/weicao/otp/compare/erl_interface_replace_select_with_poll > > https://github.com/weicao/otp/compare/erl_interface_replace_select_with_poll.patch > > > -- > > Best, > > Wei Cao > > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches Hi 1. The commit msg is not conforming to the guidelines on how to write a proper commit msg. https://github.com/erlang/otp/wiki/Writing-good-commit-messages 2. could you add tests for this? Thank you for the contribution! -- /Henrik Nord Erlang/OTP -------------- next part -------------- An HTML attachment was scrubbed... URL: From norton@REDACTED Wed Oct 26 14:36:04 2011 From: norton@REDACTED (Joseph Wayne Norton) Date: Wed, 26 Oct 2011 21:36:04 +0900 Subject: [erlang-patches] ei - decode functions without memory copy Message-ID: <34B4E539-0795-4337-B459-FE403599A5E9@lovely.email.ne.jp> I wanted to ask if there is interest in adding new decode functions to the ei application that do not perform any memory copying. The purpose is to avoid unnecessary memory copy by the ei functions themselves and to avoid unnecessary memory allocation by the decode function callers. Here are two sample implementations - one for atoms and one for binaries. I could prepare an git-based patch if someone can provide some feedback for additional functions that should be included and for a better naming convention for these new functions. thanks, - Joe N. // This function inspects an atom from the binary format. The p // parameter is the name of the atom and the name should be // zero-terminated. If the name is equal to the atom in binary // format, returns 0. Otherwise, return -1. If name is NULL, no // comparison is done and returns 0. int ei_inspect_atom(const char *buf, int *index, char *p) { const char *s = buf + *index; const char *s0 = s; int len; if (get8(s) != ERL_ATOM_EXT) return -1; len = get16be(s); if (len > MAXATOMLEN) return -1; if (p) { if (len != (int) strlen(p)) return -1; if (memcmp(p, s, len)) return -1; } s += len; *index += s-s0; return 0; } // This function inspects a binary from the binary format. The p // parameter is set to the address of the binary. The len parameter // is set to the actual size of the binary. int ei_inspect_binary(const char *buf, int *index, void **p, long *lenp) { const char *s = buf + *index; const char *s0 = s; long len; if (get8(s) != ERL_BINARY_EXT) return -1; len = get32be(s); if (p) *p = (void*) s; s += len; if (lenp) *lenp = len; *index += s-s0; return 0; } Joseph Wayne Norton norton@REDACTED Joseph Wayne Norton norton@REDACTED From henrik@REDACTED Thu Oct 27 13:46:01 2011 From: henrik@REDACTED (Henrik Nord) Date: Thu, 27 Oct 2011 13:46:01 +0200 Subject: [erlang-patches] ei - decode functions without memory copy In-Reply-To: <34B4E539-0795-4337-B459-FE403599A5E9@lovely.email.ne.jp> References: <34B4E539-0795-4337-B459-FE403599A5E9@lovely.email.ne.jp> Message-ID: <4EA94479.4060800@erlang.org> On 10/26/2011 02:36 PM, Joseph Wayne Norton wrote: > I wanted to ask if there is interest in adding new decode functions to the ei application that do not perform any memory copying. > > The purpose is to avoid unnecessary memory copy by the ei functions themselves and to avoid unnecessary memory allocation by the decode function callers. > > Here are two sample implementations - one for atoms and one for binaries. > > I could prepare an git-based patch if someone can provide some feedback for additional functions that should be included and for a better naming convention for these new functions. > > thanks, > > - Joe N. Hello We can not at this time give a definitive answer to this. We will have to get back to you at a later date. Thank you for the contribution! > > > // This function inspects an atom from the binary format. The p > // parameter is the name of the atom and the name should be > // zero-terminated. If the name is equal to the atom in binary > // format, returns 0. Otherwise, return -1. If name is NULL, no > // comparison is done and returns 0. > > int > ei_inspect_atom(const char *buf, int *index, char *p) > { > const char *s = buf + *index; > const char *s0 = s; > int len; > > if (get8(s) != ERL_ATOM_EXT) return -1; > > len = get16be(s); > > if (len> MAXATOMLEN) return -1; > > if (p) { > if (len != (int) strlen(p)) return -1; > if (memcmp(p, s, len)) return -1; > } > s += len; > *index += s-s0; > > return 0; > } > > // This function inspects a binary from the binary format. The p > // parameter is set to the address of the binary. The len parameter > // is set to the actual size of the binary. > > int > ei_inspect_binary(const char *buf, int *index, void **p, long *lenp) > { > const char *s = buf + *index; > const char *s0 = s; > long len; > > if (get8(s) != ERL_BINARY_EXT) return -1; > > len = get32be(s); > if (p) *p = (void*) s; > s += len; > > if (lenp) *lenp = len; > *index += s-s0; > > return 0; > } > > > Joseph Wayne Norton > norton@REDACTED > > > > Joseph Wayne Norton > norton@REDACTED > > > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- /Henrik Nord Erlang/OTP From spawn.think@REDACTED Thu Oct 27 15:33:22 2011 From: spawn.think@REDACTED (Ahmed Omar) Date: Thu, 27 Oct 2011 15:33:22 +0200 Subject: [erlang-patches] fix atime mtime Message-ID: Issue : http://comments.gmane.org/gmane.comp.lang.erlang.bugs/2657 git fetch git://github.com/spawnthink/otp.git fix_atime_mtime https://github.com/spawnthink/otp/compare/fix_atime_mtime https://github.com/spawnthink/otp/compare/fix_atime_mtime.patch -- Best Regards, - Ahmed Omar http://nl.linkedin.com/in/adiaa Follow me on twitter @spawn_think -------------- next part -------------- An HTML attachment was scrubbed... URL: From spawn.think@REDACTED Thu Oct 27 21:50:20 2011 From: spawn.think@REDACTED (Ahmed Omar) Date: Thu, 27 Oct 2011 21:50:20 +0200 Subject: [erlang-patches] fix atime mtime In-Reply-To: References: Message-ID: Added another fix there https://github.com/spawnthink/otp/commit/cbe886c1fdb9db4a639aa911f9c691b4d86ec48b for issue reported by systemio@REDACTED Please refetch Note : please let me know if you need me to separate them in different branches. On Thu, Oct 27, 2011 at 3:33 PM, Ahmed Omar wrote: > Issue : http://comments.gmane.org/gmane.comp.lang.erlang.bugs/2657 > > git fetch git://github.com/spawnthink/otp.git fix_atime_mtime > > https://github.com/spawnthink/otp/compare/fix_atime_mtime > > > https://github.com/spawnthink/otp/compare/fix_atime_mtime.patch > > -- > Best Regards, > - Ahmed Omar > http://nl.linkedin.com/in/adiaa > Follow me on twitter > @spawn_think > > -- Best Regards, - Ahmed Omar http://nl.linkedin.com/in/adiaa Follow me on twitter @spawn_think -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.wiger@REDACTED Fri Oct 28 04:13:11 2011 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Thu, 27 Oct 2011 19:13:11 -0700 Subject: [erlang-patches] [PATCH] - extending behaviours to support alternative process registries Message-ID: <23E0C495-FCB1-42DC-B3A1-D130049D2C69@erlang-solutions.com> git fetch http://github.com/uwiger/otp.git uw_extending_gen Author: Ulf Wiger Date: Thu Oct 27 18:56:54 2011 -0700 Make behaviours support alternative process registries Originally, OTP behaviours support local and global name registration. As there are alternative ways of registering, or identifying, processes (e.g. gproc, nproc), it is interesting to offer an alternative way to register and locate instances of OTP behaviours. We define an instance reference, {via, Module, Name}, where Module exports the functions register_name/2, unregister_name/1, and send/2. These function should have the same types as the corresponding functions in global.erl. This patch has been lying around for a while, and there was some (positive) discussion about it on the erlang-questions list. I have merged the current 'dev' branch, updated docs and verified it together with gproc, which is also prepared to support this functionality. BR, Ulf Ulf Wiger, CTO, Erlang Solutions, Ltd. http://erlang-solutions.com From henrik@REDACTED Fri Oct 28 16:29:38 2011 From: henrik@REDACTED (Henrik Nord) Date: Fri, 28 Oct 2011 16:29:38 +0200 Subject: [erlang-patches] What's cooking in erlang/otp (2011-10-28) Message-ID: <201110281429.p9SETZ2t025443@smaug.otp.ericsson.se> Read https://github.com/erlang/otp/wiki/Branches and https://github.com/erlang/otp/wiki/Submitting-patches New Branching strategy short version: The branch 'master' will be the upcoming major release (e.g. R15). Branch from this to submit patches for the next major release. (New features and major changes) New branch 'maint' will be introduced AFTER R15, and will be the next maintenance release (e.g. R15B01) Branch from this to submit patches for the next maintenance release. (Bug fixes and minor changes) The 'pu' branch will be based on 'master' and we will later add a 'maint-pu' for the 'maint' branch. ------------------------------------------------------------ [Graduated] * cf/simple_one_for_one_shutdown (otp, stdlib) (2011-09-14) 3 commits + Explain how dynamic child processes are stopped (0473132) + Stack errors when dynamic children are stopped (42c581d) + Explicitly kill dynamic children in supervisors (4775947) * cf/supervisor_shutdown_infinity (otp, stdlib) (2011-09-14) 2 commits + Add a warning to docs about workers' shutdown strategy (9679510) + Allow an infinite timeout to shutdown worker processes (2c4e984) * cg/fix-prng () (2010-10-06) 0 commits * fm/enif_is_number (erts) (2011-06-08) 1 commit + Add NIF function enif_is_number (8db78b0) * hl/fix-ms_transform-scope-warn (stdlib) (2011-08-26) 1 commit + ms_transform: Fix incorrect `variable shadowed' warnings (29610af) * pg/des-cfb-functions () (2011-09-06) 0 commits * rc/epp-include-path-fix (stdlib) (2011-06-14) 1 commit + Make epp search directory of current file first when including another file (36a4d64) * sa/callback-attr (compiler, inets, kernel, otp, stdlib) (2010-06-08) 8 commits + Add callback specs into 'application' module in kernel (ed72d05) + Add callback specs to tftp module following internet documentation (3ae8414) + Add callback specs to inets_service module following possibly deprecated comments (1d3544d) + Add '-callback' attributes in stdlib's behaviours (9bb4ba8) + Update primary bootstrap (570594d) + Update the documentation with information on the callback attribute (8ea0c7c) + Automatically generate 'behaviour_info' function from '-callback' attributes (493262e) + Add '-callback' attribute to language syntax (0edb6a4) ------------------------------------------------------------ [New topics] * hw/asn1rt_check-transform (asn1) (2011-10-15) 1 commit - asn1rt_check: Fix transform_to_EXTERNAL1990 for binary input (6a69602) * jw/gen_event (stdlib) (2011-10-18) 1 commit - General code clean up and clarity fixes (dbd14ea) * jw/release_handler-which-releases (sasl) (2011-10-18) 1 commit - Add release_handler:which_releases/1 (66be346) * sa/dialyzer-wunderspecs (dialyzer) (2011-10-04) 2 commits - Fix false warning about closure application (33f6f13) - Change category of 'might also return' warnings (7892a31) * ta/docs (erts, kernel, stdlib, test_server) (2011-10-21) 6 commits - file: correct make_link/2 and make_symlink/2 docs (80cec73) - Fix typo in test_server(3) (f5645ca) - Fix typos in io_protocol.xml (a5351af) - Fix typo in erlang(3) (88db908) - Fix typos in tar_SUITE (b8bd881) - Fix typos in erts/preloaded/src (bd31962) * ta/prim_archive-reloading-mfa (erts, kernel, stdlib) (2011-10-19) 2 commits - escript_SUITE: remove gratuitous space (3d89996) - [erts,kernel,stdlib] fix escript/primary archive reloading (4ac74ce) * ta/snmpc-warnings-option (snmp) (2011-10-05) 1 commit - snmpc: fix --warnings/--W option parsing (156b2ed) ------------------------------------------------------------ [Stalled] * bw/efile_exists (erts) (2010-10-07) 1 commit - prim_file:exists/{1,2} which is lightweight file existence check (7203932) Action expected from: Topic author * fm/posix-fallocate (erts, kernel) (2010-12-28) 1 commit - Added file:allocate/2 (682f39a) Action expected from: Topic author * jn/gen_stream (stdlib) (2011-04-15) 2 commits - Update gen_stream tests to conform with common_test standard (ce84daf) - Add gen_stream behaviour (6a089a4) Action expected from: OTP-Team * pr/mnesia_frag_hash (mnesia) (2011-04-27) 2 commits - add mnesia_frag_hash test (1d6762d) - Reduce calls to phash in key_to_frag_number (67a20c0) Action expected from: Topic author * tn/inet_drv-fix (erts) (2011-04-08) 1 commit - Use libdlpi to get physical address (e360563) Action expected from: Topic author ------------------------------------------------------------ [Cooking] * bg/temp-hipe-fixes (compiler, kernel) (2010-03-15) 5 commits - Avoid crash by skipping compilation_SUITE:on_load/1 (0198ee2) - Inline less aggressively for native-code compilation (41638df) - seq_trace_SUITE: Don't native-compile (fce2b79) - Disable native code if on_load is used (c8994f2) - andor_SUITE: Don't native-compile (531e5d9) This branch contains temporary workarounds to avoid failing test cases and is never intended to graduate. * fm/process_info_doc_fix (erts) (2011-09-20) 1 commit - Fix documentation for erlang:process_flag/2 (e88a46d) * gs/mod_log-fix (inets) (2011-09-24) 1 commit - Fix logging of content length in mod_log (166f4cc) * mh/create_cookie_error_msg (kernel) (2011-09-15) 1 commit - Specify file name and error on create_cookie failure (9319587) * mh/run_erl-exit-status (erts) (2011-09-02) 1 commit - run_erl.c: propagate exit status from child process (29364cf) * ms/epmd-IPv6-node-reg (erts, kernel) (2011-06-03) 1 commit - epmd: support IPv6 node registration (5523b21) * pg/fix-cover-leftover-down-msg (tools) (2011-08-29) 1 commit - [cover]fix leftover {'DOWN', ..} msg in callers queue (cc087c3) * rc/remote-shell-completion (kernel) (2010-10-22) 1 commit - make tab completion work in remote shells (73d1959) * rj/fix-debugger-msgs (debugger) (2011-09-25) 2 commits - Fixes "OK" spelling in debugger messages and variables (808629d) - Fixes debugger message with wx (e43aa85) * rj/fix-doctypos (kernel, otp) (2011-09-19) 3 commits - Adds missing spaces in Reference Manual in distributed section (0ac642f) - Fixes typo in heart doc, adds missing parenthesis (60ed9f9) - Fixes typo in Reference Manual in macros section (63c101d) * rj/fix-erlang-doc-style (erts) (2011-09-26) 1 commit - Fixes module erlang doc style: option description (283e3ab) * rj/fix-net_kernel-doc (kernel) (2011-09-28) 1 commit - Fixes net_kernel:get_net_ticktime() doc (bfa676a) * rj/fix-remove-exec-bit (asn1, common_test, debugger, dialyzer, docbuilder, erts, hipe, orber, otp, percept, public_key, sasl, snmp, ssh, wx, xmerl) (2011-09-24) 3 commits - Removes exec bit from files: info files, dat, bat (25d7dee) - Removes exec bit from files related to: XML, make, C (b414881) - Removes exec bit from: erl, hrl, xml, html, asn, gif, xpm (75a1021) * ta/nif-variadic-funs (erts) (2011-05-13) 1 commit - erts: convert variadic nif funs into inline funs (d76f146) * ta/sendfile (erts, kernel) (2011-01-13) 1 commit - Implement file:sendfile (cea7b65) * nox/xmerl-namespace-axis (xmerl) (2010-12-07) 12 commits . Implement namespace axis (27d791f) . Add `#xmlPI` support to xmerl_xpath:write_node/1 (75e67f5) . Fix processing-instruction(name?) (f05e78b) . Fix path filters (610df56) . Support more top-level primary expressions (770d6d9) . Accumulate comments in element nodes (e5b6b3a) . Add `default_attrs` option (18584c5) . Allow whole documents to be returned (aef3dea) . Track parents and namespace in `#xmlAttribute` nodes (dc9b220) . Track parents in `#xmlPI` nodes (5095331) . Set `vsn` field in `#xmlDecl` record (d712331) . Fix namespace-conformance constraints (e062270) ------------------------------------------------------------ [Dropped] * rj/typer-fix-delete (typer) (2011-09-24) 1 commit . Fixes TypEr crash when doing old files cleanup (189d095) From norton@REDACTED Fri Oct 28 16:35:45 2011 From: norton@REDACTED (Joseph Norton) Date: Fri, 28 Oct 2011 23:35:45 +0900 Subject: [erlang-patches] ei - decode functions without memory copy In-Reply-To: <4EA94479.4060800@erlang.org> References: <34B4E539-0795-4337-B459-FE403599A5E9@lovely.email.ne.jp> <4EA94479.4060800@erlang.org> Message-ID: <795AE6CC-B2A7-4EB6-B070-47A2C596A4AB@lovely.email.ne.jp> Henrik - Thank you for your reply. When and if needed, these functions and sample callers for these functions have been uploaded to GitHub: https://github.com/norton/lets/blob/master/c_src/lets_drv_lib.cc#L412 https://github.com/norton/lets/blob/master/c_src/lets_drv.cc#L545 thanks, Joseph Norton norton@REDACTED On Oct 27, 2011, at 8:46 PM, Henrik Nord wrote: > On 10/26/2011 02:36 PM, Joseph Wayne Norton wrote: >> I wanted to ask if there is interest in adding new decode functions to the ei application that do not perform any memory copying. >> >> The purpose is to avoid unnecessary memory copy by the ei functions themselves and to avoid unnecessary memory allocation by the decode function callers. >> >> Here are two sample implementations - one for atoms and one for binaries. >> >> I could prepare an git-based patch if someone can provide some feedback for additional functions that should be included and for a better naming convention for these new functions. >> >> thanks, >> >> - Joe N. > Hello > > We can not at this time give a definitive answer to this. > We will have to get back to you at a later date. > Thank you for the contribution! > > >> >> >> // This function inspects an atom from the binary format. The p >> // parameter is the name of the atom and the name should be >> // zero-terminated. If the name is equal to the atom in binary >> // format, returns 0. Otherwise, return -1. If name is NULL, no >> // comparison is done and returns 0. >> >> int >> ei_inspect_atom(const char *buf, int *index, char *p) >> { >> const char *s = buf + *index; >> const char *s0 = s; >> int len; >> >> if (get8(s) != ERL_ATOM_EXT) return -1; >> >> len = get16be(s); >> >> if (len> MAXATOMLEN) return -1; >> >> if (p) { >> if (len != (int) strlen(p)) return -1; >> if (memcmp(p, s, len)) return -1; >> } >> s += len; >> *index += s-s0; >> >> return 0; >> } >> >> // This function inspects a binary from the binary format. The p >> // parameter is set to the address of the binary. The len parameter >> // is set to the actual size of the binary. >> >> int >> ei_inspect_binary(const char *buf, int *index, void **p, long *lenp) >> { >> const char *s = buf + *index; >> const char *s0 = s; >> long len; >> >> if (get8(s) != ERL_BINARY_EXT) return -1; >> >> len = get32be(s); >> if (p) *p = (void*) s; >> s += len; >> >> if (lenp) *lenp = len; >> *index += s-s0; >> >> return 0; >> } >> >> >> Joseph Wayne Norton >> norton@REDACTED >> >> >> >> Joseph Wayne Norton >> norton@REDACTED >> >> >> >> _______________________________________________ >> erlang-patches mailing list >> erlang-patches@REDACTED >> http://erlang.org/mailman/listinfo/erlang-patches > > > -- > /Henrik Nord Erlang/OTP > From henrik@REDACTED Mon Oct 31 14:30:00 2011 From: henrik@REDACTED (Henrik Nord) Date: Mon, 31 Oct 2011 14:30:00 +0100 Subject: [erlang-patches] [PATCH] - extending behaviours to support alternative process registries In-Reply-To: <23E0C495-FCB1-42DC-B3A1-D130049D2C69@erlang-solutions.com> References: <23E0C495-FCB1-42DC-B3A1-D130049D2C69@erlang-solutions.com> Message-ID: <4EAEA2D8.9090603@erlang.org> On 10/28/2011 04:13 AM, Ulf Wiger wrote: > git fetch http://github.com/uwiger/otp.git uw_extending_gen > > Author: Ulf Wiger > Date: Thu Oct 27 18:56:54 2011 -0700 > > Make behaviours support alternative process registries > > Originally, OTP behaviours support local and global name registration. > As there are alternative ways of registering, or identifying, processes > (e.g. gproc, nproc), it is interesting to offer an alternative way to > register and locate instances of OTP behaviours. > > We define an instance reference, {via, Module, Name}, where Module exports > the functions register_name/2, unregister_name/1, and send/2. These function > should have the same types as the corresponding functions in global.erl. > > > This patch has been lying around for a while, and there was some (positive) discussion about it on the erlang-questions list. > > I have merged the current 'dev' branch, updated docs and verified it together with gproc, which is also prepared to support this functionality. > > BR, > Ulf > > Ulf Wiger, CTO, Erlang Solutions, Ltd. > http://erlang-solutions.com > > > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches Thank you I have now included your patch in 'pu' -- /Henrik Nord Erlang/OTP