From jan@REDACTED Wed Aug 1 09:34:58 2012 From: jan@REDACTED (Jan =?iso-8859-1?q?Kl=F6tzke?=) Date: Wed, 1 Aug 2012 09:34:58 +0200 Subject: [erlang-patches] Fix for filename:nativename/1 on Win32 Message-ID: <201208010934.58188.jan@kloetzke.net> Hi, I've stumbled upon an error in filename:nativename/1 on Win32. The function crashes when given a file name as binary. git fetch git://github.com/jkloetzke/otp.git fix-filename-nativename https://github.com/jkloetzke/otp/compare/fix-filename-nativename https://github.com/jkloetzke/otp/compare/fix-filename-nativename.patch The fix and a corresponding test case are based on the 'maint' branch and have been tested on WindowsXP. Regards, Jan _____________________________________________________________________________ PeerDrive - Beyond online storage Store, sync, backup and organize your http://peerdrive.org data everywhere without relying on a http://github.com/jkloetzke/peerdrive permanent network connection. From henrik@REDACTED Wed Aug 1 09:51:28 2012 From: henrik@REDACTED (Henrik Nord) Date: Wed, 1 Aug 2012 09:51:28 +0200 Subject: [erlang-patches] Fix for filename:nativename/1 on Win32 In-Reply-To: <201208010934.58188.jan@kloetzke.net> References: <201208010934.58188.jan@kloetzke.net> Message-ID: <5018E000.6070707@erlang.org> Thank you for your contribution, I have added your patch in 'pu' On 08/01/2012 09:34 AM, Jan Kl?tzke wrote: > git fetch git://github.com/jkloetzke/otp.git fix-filename-nativename -- /Henrik Nord Erlang/OTP From jan@REDACTED Wed Aug 1 09:53:57 2012 From: jan@REDACTED (Jan =?iso-8859-1?q?Kl=F6tzke?=) Date: Wed, 1 Aug 2012 09:53:57 +0200 Subject: [erlang-patches] Gracefully stop emulator on Windows shutdown when run as a service Message-ID: <201208010953.57466.jan@kloetzke.net> Hi, Currently, when running the emulator as a windows service, the emulator will be killed when Windows is shutting down instead of invoking the stop action for a graceful tear down. The following patch, based on 'maint' fixes the problem: git fetch git://github.com/jkloetzke/otp.git erlsrv-graceful-shutdown https://github.com/jkloetzke/otp/compare/erlsrv-graceful-shutdown https://github.com/jkloetzke/otp/compare/erlsrv-graceful-shutdown.patch The patch fixes erlsrv to gracefully stop the emulator on Windows shutdown. Windows will send the SERVICE_CONTROL_SHUTDOWN event to the service control handler when shutting down the system. Instead of ignoring the event, erlsrv will now invoke the stop action. Likewise, the Erlang emulator (and it's port drivers) must not quit upon reception of the CTRL_SHUTDOWN_EVENT event in the console control handler. Regards, Jan _____________________________________________________________________________ PeerDrive - Beyond online storage Store, sync, backup and organize your http://peerdrive.org data everywhere without relying on a http://github.com/jkloetzke/peerdrive permanent network connection. From henrik@REDACTED Wed Aug 1 10:16:40 2012 From: henrik@REDACTED (Henrik Nord) Date: Wed, 1 Aug 2012 10:16:40 +0200 Subject: [erlang-patches] Gracefully stop emulator on Windows shutdown when run as a service In-Reply-To: <201208010953.57466.jan@kloetzke.net> References: <201208010953.57466.jan@kloetzke.net> Message-ID: <5018E5E8.2080209@erlang.org> Thank you for your contribution! Patch added to 'pu' for testing On 08/01/2012 09:53 AM, Jan Kl?tzke wrote: > Hi, > > Currently, when running the emulator as a windows service, the emulator will > be killed when Windows is shutting down instead of invoking the stop action > for a graceful tear down. The following patch, based on 'maint' fixes the > problem: > > git fetch git://github.com/jkloetzke/otp.git erlsrv-graceful-shutdown > > https://github.com/jkloetzke/otp/compare/erlsrv-graceful-shutdown > https://github.com/jkloetzke/otp/compare/erlsrv-graceful-shutdown.patch > > The patch fixes erlsrv to gracefully stop the emulator on Windows shutdown. > Windows will send the SERVICE_CONTROL_SHUTDOWN event to the service control > handler when shutting down the system. Instead of ignoring the event, erlsrv > will now invoke the stop action. Likewise, the Erlang emulator (and it's port > drivers) must not quit upon reception of the CTRL_SHUTDOWN_EVENT event in the > console control handler. > > Regards, > Jan > _____________________________________________________________________________ > PeerDrive - Beyond online storage > > Store, sync, backup and organize your http://peerdrive.org > data everywhere without relying on a http://github.com/jkloetzke/peerdrive > permanent network connection. > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- /Henrik Nord Erlang/OTP From henrik@REDACTED Wed Aug 1 10:22:16 2012 From: henrik@REDACTED (Henrik Nord) Date: Wed, 1 Aug 2012 10:22:16 +0200 Subject: [erlang-patches] ODBC extended error information In-Reply-To: References: Message-ID: <5018E738.9050906@erlang.org> Thank you for your contribution! I have added your patch to 'pu' for further testing. On 07/25/2012 09:44 AM, Bernie Duggan wrote: > Hi all, > This patch adds an option to ODBC to allow for extended error reports. > The standard ODBC error reasons are, in some circumstances, not > sufficient for sophisticated error handling. Enabling the > 'extended_errors' option on an ODBC connection alters the error return > type from {error, Reason} to {error, {ODBCErrorCode, NativeErrorCode, > Reason}}. The NativeErrorCode is that returned by the underlying > database and can be useful when that database type is known and > specialised error handling is desired. > > I did my best to figure out how to add some tests for this change, but > from talking to a couple of other people I'm not alone in having > difficulty even getting the ODBC suite running :) Following the > instructions on the github wiki page just gives me a > port_program_executable_not_found error. I'm happy to try harder to > add some tests if someone can give me a hand with this. > > You can grab the changes with > > git fetch git://github.com/bernardd/otp.git odbc_extended_errors > > Cheers, > > Bernard > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- /Henrik Nord Erlang/OTP From henrik@REDACTED Wed Aug 1 10:28:48 2012 From: henrik@REDACTED (Henrik Nord) Date: Wed, 1 Aug 2012 10:28:48 +0200 Subject: [erlang-patches] Add support for RIPEMD-160 to the crypto module In-Reply-To: References: Message-ID: <5018E8C0.9080701@erlang.org> Thank you for your contribution! On 07/27/2012 11:06 PM, Alexander F?r?y wrote: > Hello, > > This patch adds support for the RIPEMD-160 hash function to the crypto module. > The patch includes both tests and documentation for the newly created > functions. > > git fetch git://github.com/ahf/otp.git feature-crypto-ripemd160 > > https://github.com/ahf/otp/compare/feature-crypto-ripemd160 > https://github.com/ahf/otp/compare/feature-crypto-ripemd160.patch > > Cheers, > Alex. > -- /Henrik Nord Erlang/OTP From stefan.zegenhagen@REDACTED Wed Aug 1 11:30:19 2012 From: stefan.zegenhagen@REDACTED (Stefan Zegenhagen) Date: Wed, 01 Aug 2012 11:30:19 +0200 Subject: [erlang-patches] SNMP/VACM: bugfix for vacmViewTreeFamilyMask Message-ID: <1343813419.29035.18.camel@ax-sze> Dear all, the implementation of SNMP-VIEW-BASED-ACM.mib assumes that the input for vacmViewTreeFamilyMask is an OID consisting of 1's and 0's only to form the mask. However, the MIB states that the input should be a bitstring. The OID representation of the mask is useful in the code as it speeds up time-critical code paths when checking access permissions for EACH SNMP access. Reading/writing the view mask objects is less time-critical. Therefore, to fix the issue, convert between OID representation and bitstring when the vacmViewTreeFamilyMask objects are accessed. This is done by the patch attached to this e-mail. Kind regards, -- Dr. Stefan Zegenhagen arcutronix GmbH Garbsener Landstr. 10 30419 Hannover Germany Tel: +49 511 277-2734 Fax: +49 511 277-2709 Email: stefan.zegenhagen@REDACTED Web: www.arcutronix.com *Synchronize the Ethernet* General Managers: Dipl. Ing. Juergen Schroeder, Dr. Josef Gfrerer - Legal Form: GmbH, Registered office: Hannover, HRB 202442, Amtsgericht Hannover; Ust-Id: DE257551767. Please consider the environment before printing this message. -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-SNMP-VACM-bugfix-for-vacmViewTreeFamilyMask.patch Type: text/x-patch Size: 4651 bytes Desc: not available URL: From stefan.zegenhagen@REDACTED Wed Aug 1 11:33:45 2012 From: stefan.zegenhagen@REDACTED (Stefan Zegenhagen) Date: Wed, 01 Aug 2012 11:33:45 +0200 Subject: [erlang-patches] SSH: re-activate auth_methods server option Message-ID: <1343813625.29035.22.camel@ax-sze> Dear all, This patch is being resubmitted as attachment so that it applies cleanly on the current "maint" branch. The auth_methods server option is still handled by the SSH server code in appropriate places, but it is rejected by the function that checks the options. The patch attached to this e-mail re-adds knowledge of this option to the option checking code so that it can be passed to the SSH server again. Kind regards, -- Dr. Stefan Zegenhagen arcutronix GmbH Garbsener Landstr. 10 30419 Hannover Germany Tel: +49 511 277-2734 Fax: +49 511 277-2709 Email: stefan.zegenhagen@REDACTED Web: www.arcutronix.com *Synchronize the Ethernet* General Managers: Dipl. Ing. Juergen Schroeder, Dr. Josef Gfrerer - Legal Form: GmbH, Registered office: Hannover, HRB 202442, Amtsgericht Hannover; Ust-Id: DE257551767. Please consider the environment before printing this message. -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-SSH-Make-auth_methods-server-option-re-usable.patch Type: text/x-patch Size: 1800 bytes Desc: not available URL: From stefan.zegenhagen@REDACTED Wed Aug 1 11:50:06 2012 From: stefan.zegenhagen@REDACTED (Stefan Zegenhagen) Date: Wed, 01 Aug 2012 11:50:06 +0200 Subject: [erlang-patches] SNMP: fix problems with empty table RowIndex Message-ID: <1343814606.29035.32.camel@ax-sze> Dear all, These patches are being resubmitted as attachment so that they apply cleanly on the current "maint" branch. During intensive testing it was found that it's possible to create table rows in, e.g., snmpTargetAddrTable that have an empty RowIndex and thereby violate the MIB's constraints on the row indices. To solve the issue, the function snmp_generic:split_index_to_keys/2 is modified to respect the minimum/maximum length of row index components as given in the corresponding #asn1_type{} by the first patch. The second patch modifies the SNMP set request handling to use the above mentioned function and verify that table row indices are syntactically correct even before calling the instrumentation functions. The same is *NOT* done for * get requests because these will not return anything useful if invalid rows can no longer be created, and * get-next requests because there, row indices have a different semantic and are allowed to be invalid. Kind regards, -- Dr. Stefan Zegenhagen arcutronix GmbH Garbsener Landstr. 10 30419 Hannover Germany Tel: +49 511 277-2734 Fax: +49 511 277-2709 Email: stefan.zegenhagen@REDACTED Web: www.arcutronix.com *Synchronize the Ethernet* General Managers: Dipl. Ing. Juergen Schroeder, Dr. Josef Gfrerer - Legal Form: GmbH, Registered office: Hannover, HRB 202442, Amtsgericht Hannover; Ust-Id: DE257551767. Please consider the environment before printing this message. -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-fix-snmp_generic-split_index_to_keys-2.patch Type: text/x-patch Size: 2531 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-verify-table-row-index-constraints-in-SNMP-set-reque.patch Type: text/x-patch Size: 5455 bytes Desc: not available URL: From yamt@REDACTED Thu Aug 2 02:54:00 2012 From: yamt@REDACTED (YAMAMOTO Takashi) Date: Thu, 2 Aug 2012 00:54:00 +0000 (UTC) Subject: [erlang-patches] fix a URL in REAMDE.md Message-ID: <20120802005400.D95A514A1A5@mail.netbsd.org> hi, http://www.erlang.org/faq.html looks stale. git fetch https://github.com/yamt/otp fix-url https://github.com/yamt/otp/compare/fix-url https://github.com/yamt/otp/compare/fix-url.patch YAMAMOTO Takashi From tomi@REDACTED Thu Aug 2 13:06:47 2012 From: tomi@REDACTED (=?utf-8?B?VG9tw6HFoSBKYW5vdcWhZWs=?=) Date: Thu, 2 Aug 2012 13:06:47 +0200 Subject: [erlang-patches] sys_pre_expand: Fix BASE never being set Message-ID: <20120802110647.GA5910@nomi.cz> Commit a612e99fb5aaa934fe5a8591db0f083d7fa0b20a turned module attributes from 2-tuples to 3-tuples but forgot to update get_base/1, breaking BASE for parametric modules. git fetch git://github.com/liskin/otp.git edoc-callback-attribute https://github.com/liskin/otp/compare/maint https://github.com/liskin/otp/compare/maint.patch Regards, -- Tom?? Janou?ek, a.k.a. Liskni_si, http://work.lisk.in/ From tomi@REDACTED Thu Aug 2 13:07:39 2012 From: tomi@REDACTED (=?utf-8?B?VG9tw6HFoSBKYW5vdcWhZWs=?=) Date: Thu, 2 Aug 2012 13:07:39 +0200 Subject: [erlang-patches] sys_pre_expand: Fix BASE never being set In-Reply-To: <20120802110647.GA5910@nomi.cz> References: <20120802110647.GA5910@nomi.cz> Message-ID: <20120802110739.GA5985@nomi.cz> On Thu, Aug 02, 2012 at 01:06:47PM +0200, Tom?? Janou?ek wrote: > git fetch git://github.com/liskin/otp.git edoc-callback-attribute s/edoc-callback-attribute/maint/ Terribly sorry. -- Tom?? Janou?ek, a.k.a. Liskni_si, http://work.lisk.in/ From henrik@REDACTED Thu Aug 2 13:15:06 2012 From: henrik@REDACTED (Henrik Nord) Date: Thu, 2 Aug 2012 13:15:06 +0200 Subject: [erlang-patches] SNMP/VACM: bugfix for vacmViewTreeFamilyMask In-Reply-To: <1343813419.29035.18.camel@ax-sze> References: <1343813419.29035.18.camel@ax-sze> Message-ID: <501A613A.30202@erlang.org> Thank you for your contribution your branch has been included in 'pu' On 08/01/2012 11:30 AM, Stefan Zegenhagen wrote: > Dear all, > > the implementation of SNMP-VIEW-BASED-ACM.mib assumes that the input for > vacmViewTreeFamilyMask is an OID consisting of 1's and 0's only to form > the mask. However, the MIB states that the input should be a bitstring. > > The OID representation of the mask is useful in the code as it speeds up > time-critical code paths when checking access permissions for EACH SNMP > access. Reading/writing the view mask objects is less time-critical. > > Therefore, to fix the issue, convert between OID representation and > bitstring when the vacmViewTreeFamilyMask objects are accessed. This is > done by the patch attached to this e-mail. > > > Kind regards, > > > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- /Henrik Nord Erlang/OTP -------------- next part -------------- An HTML attachment was scrubbed... URL: From henrik@REDACTED Thu Aug 2 13:15:12 2012 From: henrik@REDACTED (Henrik Nord) Date: Thu, 2 Aug 2012 13:15:12 +0200 Subject: [erlang-patches] SSH: re-activate auth_methods server option In-Reply-To: <1343813625.29035.22.camel@ax-sze> References: <1343813625.29035.22.camel@ax-sze> Message-ID: <501A6140.8060300@erlang.org> Thank you for your contribution your branch has been included in 'pu' On 08/01/2012 11:33 AM, Stefan Zegenhagen wrote: > Dear all, > > This patch is being resubmitted as attachment so that it applies cleanly > on the current "maint" branch. > > The auth_methods server option is still handled by the SSH server code > in appropriate places, but it is rejected by the function that checks > the options. > > The patch attached to this e-mail re-adds knowledge of this option to > the option checking code so that it can be passed to the SSH server > again. > > > Kind regards, > > > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- /Henrik Nord Erlang/OTP -------------- next part -------------- An HTML attachment was scrubbed... URL: From henrik@REDACTED Thu Aug 2 13:15:21 2012 From: henrik@REDACTED (Henrik Nord) Date: Thu, 2 Aug 2012 13:15:21 +0200 Subject: [erlang-patches] SNMP: fix problems with empty table RowIndex In-Reply-To: <1343814606.29035.32.camel@ax-sze> References: <1343814606.29035.32.camel@ax-sze> Message-ID: <501A6149.2030001@erlang.org> Thank you for your contribution your branch has been included in 'pu' On 08/01/2012 11:50 AM, Stefan Zegenhagen wrote: > Dear all, > > These patches are being resubmitted as attachment so that they apply > cleanly on the current "maint" branch. > > During intensive testing it was found that it's possible to create table > rows in, e.g., snmpTargetAddrTable that have an empty RowIndex and > thereby violate the MIB's constraints on the row indices. > > To solve the issue, the function snmp_generic:split_index_to_keys/2 is > modified to respect the minimum/maximum length of row index components > as given in the corresponding #asn1_type{} by the first patch. > > The second patch modifies the SNMP set request handling to use the above > mentioned function and verify that table row indices are syntactically > correct even before calling the instrumentation functions. > > The same is *NOT* done for > * get requests because these will not return anything useful if > invalid rows can no longer be created, and > * get-next requests because there, row indices have a different > semantic and are allowed to be invalid. > > > Kind regards, > > > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- /Henrik Nord Erlang/OTP -------------- next part -------------- An HTML attachment was scrubbed... URL: From henrik@REDACTED Thu Aug 2 13:44:16 2012 From: henrik@REDACTED (Henrik Nord) Date: Thu, 2 Aug 2012 13:44:16 +0200 Subject: [erlang-patches] fix a URL in REAMDE.md In-Reply-To: <20120802005400.D95A514A1A5@mail.netbsd.org> References: <20120802005400.D95A514A1A5@mail.netbsd.org> Message-ID: <501A6810.7050002@erlang.org> It might be a link for this page? http://www.erlang.org/faq/faq.html feel free to add that one aswell to the patch On 08/02/2012 02:54 AM, YAMAMOTO Takashi wrote: > hi, > > http://www.erlang.org/faq.html looks stale. > > git fetch https://github.com/yamt/otp fix-url > https://github.com/yamt/otp/compare/fix-url > https://github.com/yamt/otp/compare/fix-url.patch > > YAMAMOTO Takashi > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- /Henrik Nord Erlang/OTP From henrik@REDACTED Thu Aug 2 13:49:18 2012 From: henrik@REDACTED (Henrik Nord) Date: Thu, 2 Aug 2012 13:49:18 +0200 Subject: [erlang-patches] sys_pre_expand: Fix BASE never being set In-Reply-To: <20120802110739.GA5985@nomi.cz> References: <20120802110647.GA5910@nomi.cz> <20120802110739.GA5985@nomi.cz> Message-ID: <501A693E.3000607@erlang.org> I have added your branch to 'p' Thank you for your contribution! On 08/02/2012 01:07 PM, Tom?? Janou?ek wrote: > On Thu, Aug 02, 2012 at 01:06:47PM +0200, Tom?? Janou?ek wrote: >> git fetch git://github.com/liskin/otp.git edoc-callback-attribute > s/edoc-callback-attribute/maint/ > > Terribly sorry. > -- /Henrik Nord Erlang/OTP From henrik@REDACTED Thu Aug 2 14:02:56 2012 From: henrik@REDACTED (Henrik Nord) Date: Thu, 2 Aug 2012 14:02:56 +0200 Subject: [erlang-patches] minor improvements on observer table viewer In-Reply-To: References: Message-ID: <501A6C70.9040809@erlang.org> I have added your patches to 'pu' Thank you for your contribution! On 06/29/2012 06:54 PM, Peti G?m?ri wrote: > Hi, > > Here I send two minor improvements (based on maint): > - single line wxTextEntryDialog is too small to edit or inspect bigger > objects in tv so created a multiline version > - eliminated unnecessary lists:nth calls from search recursion - now > it works less slowly on larger tables > > thanks > Peter > > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- /Henrik Nord Erlang/OTP -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsvhome@REDACTED Thu Aug 2 17:14:12 2012 From: hsvhome@REDACTED (Sergey Shilov) Date: Thu, 2 Aug 2012 18:14:12 +0300 Subject: [erlang-patches] [erlang-bugs] missing function clause in ssl_connection:handle_alert patch In-Reply-To: References: <5019AF34.1060103@rabbitmq.com> <096783BB-5AD4-4EC7-85F5-03164C75AC40@mail.ru> Message-ID: <80B52F0E-7DEB-424E-8E25-0A353AD657E8@mail.ru> On Aug 2, 2012, at 4:55 PM, Ali Sabil wrote: > On Thu, Aug 2, 2012 at 9:09 AM, Sergey Shilov wrote: >> >> On Aug 2, 2012, at 1:35 AM, Matthias Radestock wrote: >> >>> We got the following process crash report from a user running R15B01 (trimmed somewhat to hide private key material): >>> >>> =CRASH REPORT==== 31-Jul-2012::11:49:27 === >>> crasher: >>> initial call: ssl_connection:init/1 >>> pid: <0.2005.0> >>> registered_name: [] >>> exception exit: {function_clause, >>> [{ssl_connection,handle_alert, >>> [{alert,1,41,{"ssl_connection.erl",1678}}, >>> certify, >>> {state,server, >>> {#Ref<0.0.0.3519>,<0.2004.0>}, >>> gen_tcp,tcp,tcp_closed,tcp_error,"localhost",5673, >>> #Port<0.6927>, >>> {ssl_options,[],verify_peer, >>> {#Fun, >>> #Fun}, >>> false,false,undefined,1, >>> "C:/certstore/server/cert.pem",undefined, >> >> >> The problem is old and (probably) well-known >> >> http://erlang.2086793.n4.nabble.com/ssl-connection-crash-on-client-connect-w-o-certificte-tt3570411.html#none >> >> A possible solution included >> >> > > Maybe you could submit the patch to erlang-patches? -------------- next part -------------- A non-text attachment was scrubbed... Name: otp-R15B-1c-ssl_crash_on_no_certificate.patch Type: application/octet-stream Size: 1830 bytes Desc: not available URL: -------------- next part -------------- Regards, Sergey. From yamt@REDACTED Fri Aug 3 04:48:00 2012 From: yamt@REDACTED (YAMAMOTO Takashi) Date: Fri, 3 Aug 2012 02:48:00 +0000 (UTC) Subject: [erlang-patches] fix a URL in REAMDE.md In-Reply-To: Your message of "Thu, 2 Aug 2012 13:44:16 +0200" <501A6810.7050002@erlang.org> References: <501A6810.7050002@erlang.org> Message-ID: <20120803024800.88EC014A245@mail.netbsd.org> hi, > It might be a link for this page? > > http://www.erlang.org/faq/faq.html [3] is about erlang-patches and, according to webarchive, the main contents of the page pointed by the old link seem to be a list of mailing lists. http://web.archive.org/web/20101122133432/http://erlang.org/faq.html YAMAMOTO Takashi > > feel free to add that one aswell to the patch > > On 08/02/2012 02:54 AM, YAMAMOTO Takashi wrote: >> hi, >> >> http://www.erlang.org/faq.html looks stale. >> >> git fetch https://github.com/yamt/otp fix-url >> https://github.com/yamt/otp/compare/fix-url >> https://github.com/yamt/otp/compare/fix-url.patch >> >> YAMAMOTO Takashi >> _______________________________________________ >> erlang-patches mailing list >> erlang-patches@REDACTED >> http://erlang.org/mailman/listinfo/erlang-patches > > -- > /Henrik Nord Erlang/OTP From henrik@REDACTED Fri Aug 3 10:58:32 2012 From: henrik@REDACTED (Henrik Nord) Date: Fri, 3 Aug 2012 10:58:32 +0200 Subject: [erlang-patches] [erlang-bugs] missing function clause in ssl_connection:handle_alert patch In-Reply-To: <80B52F0E-7DEB-424E-8E25-0A353AD657E8@mail.ru> References: <5019AF34.1060103@rabbitmq.com> <096783BB-5AD4-4EC7-85F5-03164C75AC40@mail.ru> <80B52F0E-7DEB-424E-8E25-0A353AD657E8@mail.ru> Message-ID: <501B92B8.2000509@erlang.org> Thank you for your contribution! I have included this in 'pu' On 08/02/2012 05:14 PM, Sergey Shilov wrote: > On Aug 2, 2012, at 4:55 PM, Ali Sabil wrote: > >> On Thu, Aug 2, 2012 at 9:09 AM, Sergey Shilov wrote: >>> On Aug 2, 2012, at 1:35 AM, Matthias Radestock wrote: >>> >>>> We got the following process crash report from a user running R15B01 (trimmed somewhat to hide private key material): >>>> >>>> =CRASH REPORT==== 31-Jul-2012::11:49:27 === >>>> crasher: >>>> initial call: ssl_connection:init/1 >>>> pid: <0.2005.0> >>>> registered_name: [] >>>> exception exit: {function_clause, >>>> [{ssl_connection,handle_alert, >>>> [{alert,1,41,{"ssl_connection.erl",1678}}, >>>> certify, >>>> {state,server, >>>> {#Ref<0.0.0.3519>,<0.2004.0>}, >>>> gen_tcp,tcp,tcp_closed,tcp_error,"localhost",5673, >>>> #Port<0.6927>, >>>> {ssl_options,[],verify_peer, >>>> {#Fun, >>>> #Fun}, >>>> false,false,undefined,1, >>>> "C:/certstore/server/cert.pem",undefined, >>> >>> The problem is old and (probably) well-known >>> >>> http://erlang.2086793.n4.nabble.com/ssl-connection-crash-on-client-connect-w-o-certificte-tt3570411.html#none >>> >>> A possible solution included >>> >>> >> Maybe you could submit the patch to erlang-patches? > > > > > Regards, > > Sergey. > > > > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- /Henrik Nord Erlang/OTP -------------- next part -------------- An HTML attachment was scrubbed... URL: From henrik@REDACTED Fri Aug 3 14:57:57 2012 From: henrik@REDACTED (Henrik Nord) Date: Fri, 3 Aug 2012 14:57:57 +0200 Subject: [erlang-patches] What's cooking in erlang/otp (2012-08-03) Message-ID: <201208031257.q73Cvtti010194@smaug.otp.ericsson.se> ------------------------------------------------------------ [Graduated to Master] * jv/filelib_recursion_wildcard (stdlib) (2012-02-20) 1 commit . Allow ** in filelib:wildcard (964649b) [Graduated] * at/fix_asn1_typo (asn1) (2012-05-17) 1 commit + Fix typo error in selected decode function (24367b7) * dc/dch-fix-win32-escript (erts) (2011-11-25) 1 commit + add escript win32 alternative invocation (thanks Pierre Rouleau) (a50b285) * jc/omit-undefined-start_phases () (2012-01-13) 0 commits * jn/inets_sup_start_link (inets) (2012-03-05) 1 commit + Add inets_sup:start_link/0 (7b9b7c1) * jv/forms-source (compiler) (2012-03-23) 1 commit + Allow the source to be set when compiling forms (2d785c0) * jv/on_load_docs (otp) (2012-02-20) 2 commits + Fix a typo on documentation. desciption -> description. (4bbff5f) + Mention on_load on module attributes section. (645e39f) * ks/compile_info-fix (compiler, hipe) (2012-01-16) 1 commit + Fix discrepancy in compile_info (34f7610) * mh/create_cookie_error_msg (kernel) (2011-09-15) 1 commit + Specify file name and error on create_cookie failure (9319587) * mh/remove-compilation-error-regexp (tools) (2012-06-08) 1 commit + Remove Erlang-specific compilation error regexp (a87a969) * mpe/hipe_arm-remove-dead-code () (2012-05-09) 0 commits * ms/correct-formating-in-exit (erts, kernel, runtime_tools) (2012-05-08) 1 commit + Correct formating in exit error messages (408e776) * ph/fix_enfile () (2012-01-04) 0 commits * ps/inet6-less-build-fix (erts) (2012-02-15) 1 commit + Add missing HAVE_IN6 && AF_INET6 ifdef (4f3dd18) * rj/add-space-spec_proc-doc (otp) (2012-02-14) 1 commit + Add missing white space in Special Process doc (ab83345) * rj/fix-eprof-doc (tools) (2012-06-01) 1 commit + Fix nonsense of eprof doc (0c01a34) * rj/fix-et-doc (et) (2012-06-05) 1 commit + Fix typo in ET doc (80b57b1) * rj/fix-gen_udp_tcp-leak () (2012-02-04) 0 commits * rj/fix-misc-doc-typos (otp, stdlib) (2012-02-15) 1 commit + Fix a code snippet and two typos in the doc (67c16b4) * ja/jl-httpc-doc-elaborate (inets) (2012-06-08) 1 commit . Elaborate on timeouts in the httpc documentation (1bc041b) * pg/ssl_dist-fixes (ssl) (2012-01-16) 1 commit . Robustness and improvement to distribution over SSL (71e9aa2) * sa/dialyzer-contract-variables (dialyzer, hipe) (2012-04-23) 3 commits + Correct handling of type names in contracts (56e3930) + Don't rewrite unchanged PLT (3ab2dd6) + Fix crash related to contract checking (20412ad) * sa/dialyzer-parallel (dialyzer, erts, typer) (2012-03-28) 54 commits + Logfile-like statistics (enabled with --resources) (49c6574) + Anonymous SCCtoPID ETS table (12b8ce0) + Anonymous time server (5c52ff6) + Regulate all kinds of running workers up to the number of schedulers (720b65d) + Relocate start and stop of timing server (4e1ed3a) + Better names for callgaph ETS tables (24c2c72) + Remove needless conversion (d24d65f) + Fix types and specs (76b7c72) + Inline a function in dialyzer_worker (19f4b40) + Remove unused function (4920bb6) + Change --time to --statistics and include more info (4a1fa04) + Better reflect side-effect based code in dialyzer_callgraph (49ccc5d) * slf/dtrace-nif-N-probes (runtime_tools) (2012-05-08) 2 commits + Remove crufty scaffolding code (978cdb3) + Add 1024 separate USDT probes to dyntrace.erl and dyntrace.c (44c68a7) * slf/dyntrace-comment-and-func-cleanup (runtime_tools) (2012-04-02) 1 commit + dyntrace.erl comment cleanup and unused function removal (78b3cb7) * sz/dtrace-message-send-fix (erts) (2012-05-09) 1 commit + DTrace bug in message-send (d032e09) * ta/docs-maint (common_test, erts, otp) (2012-01-07) 3 commits + Fix typos in ct getting_started_chapter.xml (1eca92e) + Fix typos in driver.xml and erl_driver.xml (1588a1d) + Fix typos in INSTALL-WIN32.md (7cdb7fe) * ta/prim_archive-reloading (erts, kernel, stdlib) (2011-10-19) 2 commits + escript_SUITE: remove gratuitous space (7875e98) + [erts,kernel,stdlib] fix escript/primary archive reloading (449a093) * tab/fix-indentation-records-emacs (tools) (2012-02-11) 1 commit + Fix indentation of record fields in Emacs (ad5f78a) * tc/rpc-call-fix (kernel) (2012-05-02) 1 commit + Fix rpc:call/5 for local calls with a finite Timeout (b991b99) * ts/no_hipe_ceach (hipe) (2012-01-01) 1 commit + Remove hipe_ceach from hipe.app.src to fix reltool-generated release startup (27d83b0) * ud/fix-return-do_get_disc_copy2 (mnesia) (2011-09-16) 1 commit + Fixes value returned by mnesia_loader:do_get_disc_copy2/4 (a85fe55) * uw/extending_gen (stdlib) (2011-01-17) 1 commit + Add plugin support for alternative name lookup (b042673) * ta/archive-script (erts, stdlib) (2012-05-01) 3 commits . escript: add test for ./archive_script workarounds (269778a) . erts: work around prim archive list_dir error (Co-Authored-by: Shunichi Shinohara) (0766132) . erts: work around prim archive read_file_info error (Co-Authored-by: Tuncer Ayaz) (87f6c54) * slf/dtrace (Makefile , dtrace, erts, kernel, otp) (2011-11-17) 4 commits . Add DTrace support for OS X, Solaris, and Linux (via SystemTap), 4/4 (2913fb9) . Add DTrace support for OS X, Solaris, and Linux (via SystemTap), 3/4 (ccf25b8) . Add DTrace support for OS X, Solaris, and Linux (via SystemTap), 2/4 (6bf92ea) . Add DTrace support for OS X, Solaris, and Linux (via SystemTap), 1/4 (538fee7) * ta/docs15 (common_test, erts, otp) (2012-01-07) 3 commits . Fix typos in ct getting_started_chapter.xml (e3c347c) . Fix typos in driver.xml and erl_driver.xml (4136021) . Fix typos in INSTALL-WIN32.md (1392462) ------------------------------------------------------------ [New topics] ------------------------------------------------------------ [Stalled] * bg/temp-hipe-fixes (compiler, kernel) (2010-03-15) 5 commits - Avoid crash by skipping compilation_SUITE:on_load/1 (497eae8) - Inline less aggressively for native-code compilation (5a5fffe) - seq_trace_SUITE: Don't native-compile (cac1991) - Disable native code if on_load is used (7c3d056) - andor_SUITE: Don't native-compile (8c513a4) This branch contains temporary workarounds to avoid failing test cases and is never intended to graduate. * cv/update-localtime-configuration (erts) (2011-11-18) 1 commit . erts: Fix localtime BIFs does not update system timezone configuration (c14ba7b) Action expected from: Topic author * fm/posix-fallocate (erts, kernel) (2010-12-28) 1 commit . Added file:allocate/2 (7b39f0f) Action expected from: Topic author * mh/run_erl-exit-status (erts) (2011-11-29) 1 commit . run_erl.c: propagate exit status from child process (bd15706) Action expected from: Topic author ------------------------------------------------------------ [Cooking] * hw/asn1rt_check-transform (asn1) (2011-10-15) 1 commit - asn1rt_check: Fix transform_to_EXTERNAL1990 for binary input (6a69602) * mp/fix-assembler-comment-char-for-hipe-ppc (erts) (2012-01-17) 1 commit - Fix assembler comment character for hipe on ppc (17ab3d9) * mz/odbc-support-param_query (odbc) (2011-12-19) 1 commit - Add support for NULL value in odbc:param_query (c6e01fe) * tab/fix-sctp-multihoming-IPv6 (erts, kernel) (2012-05-10) 4 commits - Allow mixed IPv4 and IPv6 addresses to sctp_bindx (4552cb6) - Add checks for in6addr_any and in6addr_loopback (c8ccd95) - Fix SCTP multihoming (e87b966) - inet_drv.c: Set sockaddr lengths in inet_set_[f]address (6d464a1) * tp/supervisor-pass-on-errors (sasl, stdlib) (2012-07-22) 2 commits - Have supervisor send errors up the chain (16d298e) - Test supervisor pass through error (a9e03ff) * af/feature-crypto-ripemd160 (crypto) (2012-07-27) 1 commit - Add RIPEMD-160 hash function(s) to the crypto module (eff7eea) * bp/fix_mnesia_index_drop (mnesia) (2012-06-18) 2 commits - Prevent index from being corrupted if a nonexistent item is deleted (0fcdb6f) - Add tests showing that trying to delete non-existing object may corrupt the table index (8490cb63) * fma/gb_difference (stdlib) (2012-04-11) 4 commits - andalso, not and (cb368d0) - No need to qualify the function (6da0bd0) - gb_sets:fold/3, not lists:foldl/3. (3d3538d) - Sane gb_sets:difference/2 and gb_sets:is_subset/2 (fe3f833) * gp/make_erlang_mode_elpa_friendly (tools) (2012-02-14) 1 commit - Make erlang-mode more compatible with package.el (59d3e59) * hm/wx-silent_start (wx) (2012-06-12) 1 commit - Enable silent start of wx (571ba06) * jkl/erlsrv-graceful-shutdown (erts) (2012-07-31) 1 commit - erlsrv: gracefully stop emulator on Windows shutdown (0398508) * jkl/fix-filename-nativename (stdlib) (2012-06-23) 2 commits - Fix filename:nativename/1 on Win32 (6a22e6b) - Add filename:nativename/1 binary argument test to suite (f2b8bdc) * kr/r15_ssh_test_ipv6_fix (ssh) (2012-06-25) 1 commit - Fix lib/src/test/ssh_basic_SUITE.erl to fix IPv6 option typos (a33b8c3) * mh/doc-now-vs-timestamp (erts) (2012-07-25) 1 commit - Doc fix: link from erlang:now/0 to os:timestamp/0 (6c6e745) * mpe/hipe_arm-fix-compile-warning (erts) (2012-05-08) 1 commit - hipe_arm.c: remove dead code (d05d8e4) * msp/double_middle_endian (erl_interface, erts, odbc, otp, wx) (2012-07-20) 3 commits - Revise the autoconf tests for double middle endianness. (eba4d24) - Add test for floating-point output to float_SUITE. (cab9edd) - Unbreak floating point on middle-endian machines. (933e701) * nk/jinterface-fix_compressed_binary (jinterface) (2012-06-12) 2 commits - add (de)compress roundtrip tests with larger values (a835771) - fix reading compressed binary terms from Java (a963b81) * nox/compile-column-numbers (compiler, stdlib) (2012-06-10) 7 commits - Fix messages ordering with column numbers (d932ad5) - Fix type compile:err_info/0 (198ef4b) - Test column number reporting in error_SUITE (c98bc0e) - Fix printing of errors with column numbers (5af6bd4) - Create a new "column" option in compile (f6dc9c0) - Allow setting of initial position in epp (26ad68f) - Export type erl_scan:location/0 (78553dc) * pg/fix-zip-multidisk (stdlib) (2012-06-18) 1 commit - Fix bug where zip archives wrongly have a first disk number set to 1 (da11eb7) * pg??/escape-control-chars-tv (observer) (2012-06-14) 3 commits - Fix Table Viewer search crash on new|changed|deleted rows (5d299de) - Escape control characters in Table Viewer (f530bdb) - Fix Table Viewer crash after a 'Found' -> 'Not found' search sequence (12db9a2) * pg??/observer-edit-table-row (observer) (2012-06-29) 2 commits - Make Table Viewer search a bit faster (913aba2) - Edit table row in a multiline text dialog (e223525) * psi/fix-clever-mktime (erts) (2012-07-14) 1 commit - Fix use of "clever" mktime (99f6356) * psi/fix-leap-seconds (erts) (2012-07-14) 1 commit - Fix support for leap seconds-aware timezones (9043843) * rc/fix-MP-compiler-flag (compiler, erts) (2012-03-08) 1 commit - Fix the erlc -MP flag (6dc4227) * sal/float_to_list_2 (erts, hipe, stdlib) (2012-05-24) 2 commits - Added type definition for float_to_list/2 (f9ddbed) - Implement float_to_list/2 accepting a list of formatting options (9fdc4af) * ssh/ssl_connection-handle_alert (ssl) (2012-08-03) 1 commit - fix bug in ssl_connection (d78a157) * sze/improve-interoperability-SSH-clients (ssh) (2012-07-20) 1 commit - Improve interoperability with SSH clients (9a73dd6) * sze/snmp_generic-split_index (snmp) (2012-07-04) 1 commit - fix snmp_generic:split_index_to_keys/2 (8f1a00e) * sze/ssh-auth_methods (ssh) (2012-08-01) 1 commit - SSH: Make "auth_methods" server option re-usable (d808864) * sze/usmUserTable (snmp) (2012-07-23) 1 commit - semantic fixes to SNMP-USER-BASED-SM_MIB (dd34659) * sze/vacmAccessTable (snmp) (2012-07-31) 1 commit - fix walk over vacmAccessTable (b0f5251) * sze/vacmAccessTable-RowStatus-handling (snmp) (2012-07-31) 1 commit - Errors in vacmAccessTable RowStatus handling (a75ecd1) * sze/verify-tabe-row-index (snmp) (2012-07-04) 1 commit - verify table row index constraints in SNMP set requests (031bbaf) * ta/docsmaint (common_test, compiler, erts, inets, kernel, reltool, ssl, tools) (2012-04-10) 2 commits - Fix various doc typos for R15B02 (541e986) - Fix various code typos for R15B02 (8af5bd5) * ta/observer-app (observer) (2012-07-03) 1 commit - observer: fix app file (Noticed-by: Motiejus Jakstys) (d763d58) * tja/fix-base (compiler) (2012-08-02) 1 commit - sys_pre_expand: Fix BASE never being set (18943e7) * uw/release_handler-find_script (sasl) (2012-05-01) 1 commit - release_handler:find_script/4 to use 're' matching in .appup scripts (4752892) * bm/ssl_npn (ssl) (2011-12-10) 2 commits . Update SSL docs for SSL Next Protocol Support (4d2ba8b) . Support for SSL Next Protocol Negotiation * http://technotes.googlecode.com/git/nextprotoneg.html (1173de0) ------------------------------------------------------------ [Master-pu] * jf/fix_sctp_peeloff_active_true (erts) (2012-07-20) 1 commit . Set new peeled off SCTP socket to nonblocking socket (7adbaf8) * bd/odbc_extended_errors (odbc) (2012-07-25) 1 commit . Add extended_errors option to ODBC (b8143e9) * jh/incomplete_packet_asn1 (asn1) (2012-07-24) 5 commits . Add a test case for {error, incomplete} (0cd2ad0) . Update documentation (8fb53cb) . Add case clause for {error, incomplete} in per encode modules (ab678b9) . Fix bug when undec-rest option is false (010bb43) . Modify asn1 generated decode/2 functions to return {error,incomplete} (ee95fc8) * rc/break-out-asserts (eunit, stdlib) (2012-05-19) 1 commit . Break out the assert macros in eunit.hrl to stdlib/include/assert.hrl (a5ecb2d) * ta/docsmaster (erts, otp) (2012-07-20) 2 commits . Fix various typos in HOWTO/ for R16 (bffc0a7) . Fix various comment typos for R16 (ad8e903) * vs/re_back_reference (stdlib) (2012-04-04) 1 commit . extend re back reference syntax with \g escape sequence (264e667) * wc/bind_port_to_scheduler (erts) (2012-07-06) 2 commits . Bind port to owner process's scheduler if owner is bound to a scheduler (787ff90) . Change pollset implementation to use one pollset for each scheduler (121afd0) * wc/pollset_per_scheduler (erts) (2012-07-06) 1 commit . Change pollset implementation to use one pollset for each scheduler (121afd0) Under consideration ------------------------------------------------------------ [Dropped] * bi/ssh_cli-tty_geometry (ssh) (2012-05-04) 1 commit . Fix 2 second delay after eval in shell running under ssh_cli (2a5ef29) More of a quickfix, Dropped untill a proper fix is submitted. * bw/efile_exists (erts) (2010-10-07) 1 commit . prim_file:exists/{1,2} which is lightweight file existence check (2759905) Outdated * fma/gb-delete_any (stdlib) (2012-06-18) 6 commits . Using exceptions in deletions for gb_{sets,trees} when key is missing (da626bd) . Merge branch 'master' into gb_delete_any (3b19930) . Fix gb_sets:delete_1/2 (92930ec) . Consistent naming in gb_sets and gb_trees (8b79bfe) . Fix gb_trees:delete_1/2, syntax fix in gb_sets (1a15a7f) . Fixed gb_{sets,trees}:delete_any/2 to traverse the tree once (abab896) Rejected breaks the documentation which says that it does nothing if the key is not present. * mh/eunit_surefire-fixture-errors (eunit) (2011-03-10) 1 commit . Include fixture setup and cleanup errors in Eunit Surefire report (7425075) included by Richard Carlsson * ms/epmd-IPv6-node-reg (erts, kernel) (2011-06-03) 1 commit . epmd: support IPv6 node registration (5523b21) Crashing windows, no action taken * pg/add-os-pid-to-port-info (dialyzer, erts, hipe) (2010-08-19) 1 commit . Extend erlang:port_info/1,2 to show the OS pid of a spawned process (336d1d1) Fixed in another way by OTP * rc/mnesia-lock-conflict-events (mnesia) (2011-11-28) 1 commit . Generate mnesia events for conflicting locks (f4d94ae) Not wanted by OTP * wc/fix-eunit-print-stacktrace (eunit) (2011-11-02) 1 commit . fix eunit to print stacktrace correctly if test cases throw any exception (73b94a9) Fixed by Richard Carlsson in another branch From magnus.henoch@REDACTED Mon Aug 6 12:25:27 2012 From: magnus.henoch@REDACTED (Magnus Henoch) Date: Mon, 06 Aug 2012 11:25:27 +0100 Subject: [erlang-patches] Fix highlighting of atoms ending with a dollar sign Message-ID: This patch fixes highlighting of atoms that look like 'this$' in the Emacs erlang mode. git fetch git://github.com/legoscia/otp.git atom-dollar https://github.com/legoscia/otp/compare/atom-dollar https://github.com/legoscia/otp/compare/atom-dollar.patch Regards, Magnus From stefan.zegenhagen@REDACTED Mon Aug 6 16:28:47 2012 From: stefan.zegenhagen@REDACTED (Stefan Zegenhagen) Date: Mon, 06 Aug 2012 16:28:47 +0200 Subject: [erlang-patches] SNMP/VACM: bugfix for vacmViewTreeFamilyMask In-Reply-To: <501A613A.30202@erlang.org> References: <1343813419.29035.18.camel@ax-sze> <501A613A.30202@erlang.org> Message-ID: <1344263327.4839.4.camel@ax-sze> Dear all, > > the implementation of SNMP-VIEW-BASED-ACM.mib assumes that the input for > > vacmViewTreeFamilyMask is an OID consisting of 1's and 0's only to form > > the mask. However, the MIB states that the input should be a bitstring. > > > > The OID representation of the mask is useful in the code as it speeds up > > time-critical code paths when checking access permissions for EACH SNMP > > access. Reading/writing the view mask objects is less time-critical. > > > > Therefore, to fix the issue, convert between OID representation and > > bitstring when the vacmViewTreeFamilyMask objects are accessed. This is > > done by the patch attached to this e-mail. I'm very sorry for the troubles that I am causing but it seems that the previous version of the patch did more than it should: the OID-bitstring conversion was also applied to other tables in the same MIB on get/get-next requests. The version of the patch that is attached to this e-mail restricts the OID-bitstring conversion to vacmViewTreeFamilyMask alone. Kind regards, -- Dr. Stefan Zegenhagen arcutronix GmbH Garbsener Landstr. 10 30419 Hannover Germany Tel: +49 511 277-2734 Fax: +49 511 277-2709 Email: stefan.zegenhagen@REDACTED Web: www.arcutronix.com *Synchronize the Ethernet* General Managers: Dipl. Ing. Juergen Schroeder, Dr. Josef Gfrerer - Legal Form: GmbH, Registered office: Hannover, HRB 202442, Amtsgericht Hannover; Ust-Id: DE257551767. Please consider the environment before printing this message. -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-bugfix-for-vacmViewTreeFamilyMask.patch Type: text/x-patch Size: 4709 bytes Desc: not available URL: From fredrik@REDACTED Tue Aug 7 14:36:44 2012 From: fredrik@REDACTED (Fredrik) Date: Tue, 7 Aug 2012 14:36:44 +0200 Subject: [erlang-patches] Fix highlighting of atoms ending with a dollar sign In-Reply-To: References: Message-ID: <50210BDC.1060101@erlang.org> Hi Magnus, We have included this patch in the 'pu' branch. Thank you for the contribution! BR Fredrik G Erlang/OTP Team On 08/06/2012 12:25 PM, Magnus Henoch wrote: > This patch fixes highlighting of atoms that look like 'this$' in the > Emacs erlang mode. > > git fetch git://github.com/legoscia/otp.git atom-dollar > > https://github.com/legoscia/otp/compare/atom-dollar > https://github.com/legoscia/otp/compare/atom-dollar.patch > > Regards, > Magnus > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches From carlsson.richard@REDACTED Tue Aug 7 23:21:44 2012 From: carlsson.richard@REDACTED (Richard Carlsson) Date: Wed, 08 Aug 2012 00:21:44 +0300 Subject: [erlang-patches] eunit 2.2.3 Message-ID: <502186E8.10001@gmail.com> This updates eunit in OTP to have all the changes from my development repo, bumping the version number. git fetch git://github.com/richcarl/otp.git eunit-2.2.3 (based on OTP master) Release notes: EUnit 2.2.3 - New option 'no_tty' to silent the default tty report. - Recognize the new stacktrace format introduced in R15, adding location information. (Thanks to Klas Johansson.) - Improve layout of error messages, printing the stack trace before the error term. - Heuristically detect and report bad return values from generators and instantiators. E.g., "ok" will not be interpreted as a module name, and a warning will be printed. - New test representation {test,M,F} for completeness along with {generator,M,F}. Tuples {M,F} are deprecated. - Use UTF-8 as encoding in Surefire output files. (Thanks to Lukas Larsson.) /Richard From carlsson.richard@REDACTED Tue Aug 7 23:46:34 2012 From: carlsson.richard@REDACTED (Richard Carlsson) Date: Wed, 08 Aug 2012 00:46:34 +0300 Subject: [erlang-patches] edoc 0.7.10 Message-ID: <50218CBA.4000807@gmail.com> This updates edoc in OTP to have all patches from the development version, bumping the version number. git fetch git://github.com/richcarl/otp.git edoc-0.7.10 Release notes: EDoc 0.7.10 - List behaviour callbacks in Edoc when using -callback attribute. (Thanks to Magnus Henoch.) - Added special case for file names under Windows. (Thanks to Beads Land-Trujillo.) /Richard From michael.santos@REDACTED Wed Aug 8 01:13:59 2012 From: michael.santos@REDACTED (Michael Santos) Date: Tue, 7 Aug 2012 19:13:59 -0400 Subject: [erlang-patches] [PATCH] epmd: support IPv6 node registration Message-ID: <20120807231358.GA30451@ioctl> Allow IPv6 nodes to register with and query epmd. On systems with IPv6 support: * epmd listens on the IPv4 and IPv6 ANY or loopback sockets * the epmd cli client connects to epmd using the IPv6 loopback * distributed nodes started with "-proto_dist inet6_tcp" will register with epmd over IPv6 --- erts/doc/src/epmd.xml | 2 +- erts/doc/src/erl.xml | 22 +++++ erts/epmd/src/epmd.c | 6 +- erts/epmd/src/epmd_cli.c | 11 ++- erts/epmd/src/epmd_int.h | 37 ++++---- erts/epmd/src/epmd_srv.c | 184 +++++++++++++++++++++++++------------ erts/epmd/test/epmd_SUITE.erl | 33 ++++++- lib/kernel/src/erl_epmd.erl | 18 ++-- lib/kernel/src/inet6_tcp_dist.erl | 2 +- 9 files changed, 222 insertions(+), 93 deletions(-) diff --git a/erts/doc/src/epmd.xml b/erts/doc/src/epmd.xml index 3e70054..3c9313e 100644 --- a/erts/doc/src/epmd.xml +++ b/erts/doc/src/epmd.xml @@ -36,7 +36,7 @@

Erlang Port Mapper Daemon

- +

Starts the port mapper daemon

diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 6221a23..09dc81e 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -381,6 +381,28 @@ similar to . See code(3).

+ + +

Specify a protocol for Erlang distribution.

+ + inet_tcp + +

TCP over IPv4 (the default)

+
+ inet_ssl + +

distribution over SSL

+
+ inet6_tcp + +

TCP over IPv6

+
+
+

For example, to start up IPv6 distributed nodes:

+
+% erl -name test@REDACTED -proto_dist inet6_tcp
+
+

Starts Erlang with a remote shell connected to .

diff --git a/erts/epmd/src/epmd.c b/erts/epmd/src/epmd.c index 2267f9b..e2bba09 100644 --- a/erts/epmd/src/epmd.c +++ b/erts/epmd/src/epmd.c @@ -335,10 +335,10 @@ static void run_daemon(EpmdVars *g) for (fd = 0; fd < g->max_conn ; fd++) /* close all files ... */ close(fd); /* Syslog on linux will try to write to whatever if we dont - inform it of that the log is closed. */ + inform it that the log is closed. */ closelog(); - /* These chouldn't be needed but for safety... */ + /* These shouldn't be needed but for safety... */ open("/dev/null", O_RDONLY); /* Order is important! */ open("/dev/null", O_WRONLY); @@ -379,7 +379,7 @@ static void run_daemon(EpmdVars *g) close(1); close(2); - /* These chouldn't be needed but for safety... */ + /* These shouldn't be needed but for safety... */ open("nul", O_RDONLY); open("nul", O_WRONLY); diff --git a/erts/epmd/src/epmd_cli.c b/erts/epmd/src/epmd_cli.c index 74408e3..e46a700 100644 --- a/erts/epmd/src/epmd_cli.c +++ b/erts/epmd/src/epmd_cli.c @@ -132,6 +132,7 @@ void epmd_call(EpmdVars *g,int what) static int conn_to_epmd(EpmdVars *g) { struct EPMD_SOCKADDR_IN address; + size_t salen = 0; int connect_sock; connect_sock = socket(FAMILY, SOCK_STREAM, 0); @@ -140,10 +141,16 @@ static int conn_to_epmd(EpmdVars *g) { /* store port number in unsigned short */ unsigned short sport = g->port; - SET_ADDR(address, EPMD_ADDR_LOOPBACK, sport); +#if defined(HAVE_IN6) && defined(AF_INET6) + SET_ADDR6(address, in6addr_loopback, sport); + salen = sizeof(struct sockaddr_in6); +#else + SET_ADDR(address, htonl(INADDR_LOOPBACK), sport); + salen = sizeof(struct sockaddr_in); +#endif } - if (connect(connect_sock, (struct sockaddr*)&address, sizeof address) < 0) + if (connect(connect_sock, (struct sockaddr*)&address, salen) < 0) goto error; return connect_sock; diff --git a/erts/epmd/src/epmd_int.h b/erts/epmd/src/epmd_int.h index 14d05c3..64973b6 100644 --- a/erts/epmd/src/epmd_int.h +++ b/erts/epmd/src/epmd_int.h @@ -165,33 +165,32 @@ /* ************************************************************************ */ /* Macros that let us use IPv6 */ -#if defined(HAVE_IN6) && defined(AF_INET6) && defined(EPMD6) +#define IS_ADDR_LOOPBACK(addr) ((addr).s_addr == htonl(INADDR_LOOPBACK)) + +#if defined(HAVE_IN6) && defined(AF_INET6) -#define EPMD_SOCKADDR_IN sockaddr_in6 -#define EPMD_IN_ADDR in6_addr -#define EPMD_S_ADDR s6_addr -#define EPMD_ADDR_LOOPBACK in6addr_loopback.s6_addr -#define EPMD_ADDR_ANY in6addr_any.s6_addr +#define EPMD_SOCKADDR_IN sockaddr_storage #define FAMILY AF_INET6 -#define SET_ADDR(dst, addr, port) do { \ - memset((char*)&(dst), 0, sizeof(dst)); \ - memcpy((char*)&(dst).sin6_addr.s6_addr, (char*)&(addr), 16); \ - (dst).sin6_family = AF_INET6; \ - (dst).sin6_flowinfo = 0; \ - (dst).sin6_port = htons(port); \ +#define SET_ADDR6(dst, addr, port) do { \ + struct sockaddr_in6 *sa = (struct sockaddr_in6 *)&(dst); \ + memset(sa, 0, sizeof(dst)); \ + sa->sin6_family = AF_INET6; \ + sa->sin6_addr = (addr); \ + sa->sin6_port = htons(port); \ } while(0) -#define IS_ADDR_LOOPBACK(addr) \ - (memcmp((addr).s6_addr, in6addr_loopback.s6_addr, 16) == 0) +#define SET_ADDR(dst, addr, port) do { \ + struct sockaddr_in *sa = (struct sockaddr_in *)&(dst); \ + memset(sa, 0, sizeof(dst)); \ + sa->sin_family = AF_INET; \ + sa->sin_addr.s_addr = (addr); \ + sa->sin_port = htons(port); \ + } while(0) #else /* Not IP v6 */ #define EPMD_SOCKADDR_IN sockaddr_in -#define EPMD_IN_ADDR in_addr -#define EPMD_S_ADDR s_addr -#define EPMD_ADDR_LOOPBACK htonl(INADDR_LOOPBACK) -#define EPMD_ADDR_ANY htonl(INADDR_ANY) #define FAMILY AF_INET #define SET_ADDR(dst, addr, port) do { \ @@ -201,8 +200,6 @@ (dst).sin_port = htons(port); \ } while(0) -#define IS_ADDR_LOOPBACK(addr) ((addr).s_addr == htonl(INADDR_LOOPBACK)) - #endif /* Not IP v6 */ /* ************************************************************************ */ diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c index da575af..538706b 100644 --- a/erts/epmd/src/epmd_srv.c +++ b/erts/epmd/src/epmd_srv.c @@ -69,6 +69,7 @@ static time_t current_time(EpmdVars*); static Connection *conn_init(EpmdVars*); static int conn_open(EpmdVars*,int); +static int conn_local_peer_check(EpmdVars*, int); static int conn_close_fd(EpmdVars*,int); static void node_init(EpmdVars*); @@ -92,7 +93,7 @@ void run(EpmdVars *g) { struct EPMD_SOCKADDR_IN iserv_addr[MAX_LISTEN_SOCKETS]; int listensock[MAX_LISTEN_SOCKETS]; - int num_sockets; + int num_sockets = 0; int i; int opt; unsigned short sport = g->port; @@ -105,64 +106,82 @@ void run(EpmdVars *g) if (g->addresses != NULL && /* String contains non-separator characters if: */ g->addresses[strspn(g->addresses," ,")] != '\000') { - char *tmp; - char *token; - int loopback_ok = 0; + char *tmp = NULL; + char *token = NULL; + + /* Always listen on the loopback. */ + SET_ADDR(iserv_addr[num_sockets],htonl(INADDR_LOOPBACK),sport); + num_sockets++; +#if defined(HAVE_IN6) && defined(AF_INET6) + SET_ADDR6(iserv_addr[num_sockets],in6addr_loopback,sport); + num_sockets++; +#endif - if ((tmp = (char *)malloc(strlen(g->addresses) + 1)) == NULL) + if ((tmp = strdup(g->addresses)) == NULL) { dbg_perror(g,"cannot allocate memory"); epmd_cleanup_exit(g,1); } - strcpy(tmp,g->addresses); - for(token = strtok(tmp,", "), num_sockets = 0; + for(token = strtok(tmp,", "); token != NULL; - token = strtok(NULL,", "), num_sockets++) + token = strtok(NULL,", ")) { - struct EPMD_IN_ADDR addr; -#ifdef HAVE_INET_PTON - int ret; + struct in_addr addr; +#if defined(HAVE_IN6) && defined(AF_INET6) + struct in6_addr addr6; + struct sockaddr_storage *sa = &iserv_addr[num_sockets]; - if ((ret = inet_pton(FAMILY,token,&addr)) == -1) + if (inet_pton(AF_INET,token,&addr) == 1) { - dbg_perror(g,"cannot convert IP address to network format"); - epmd_cleanup_exit(g,1); + SET_ADDR(iserv_addr[num_sockets],addr.s_addr,sport); + } + else if (inet_pton(AF_INET6,token,&addr6) == 1) + { + SET_ADDR6(iserv_addr[num_sockets],addr6,sport); + } + else +#else + if ((addr.s_addr = inet_addr(token)) != INADDR_NONE) + { + SET_ADDR(iserv_addr[num_sockets],addr.s_addr,sport); } - else if (ret == 0) -#elif !defined(EPMD6) - if ((addr.EPMD_S_ADDR = inet_addr(token)) == INADDR_NONE) + else #endif { dbg_tty_printf(g,0,"cannot parse IP address \"%s\"",token); epmd_cleanup_exit(g,1); } +#if defined(HAVE_IN6) && defined(AF_INET6) + if (sa->ss_family == AF_INET6 && IN6_IS_ADDR_LOOPBACK(&addr6)) + continue; + + if (sa->ss_family == AF_INET) +#endif if (IS_ADDR_LOOPBACK(addr)) - loopback_ok = 1; + continue; - if (num_sockets - loopback_ok == MAX_LISTEN_SOCKETS - 1) + num_sockets++; + + if (num_sockets >= MAX_LISTEN_SOCKETS) { dbg_tty_printf(g,0,"cannot listen on more than %d IP addresses", MAX_LISTEN_SOCKETS); epmd_cleanup_exit(g,1); } - - SET_ADDR(iserv_addr[num_sockets],addr.EPMD_S_ADDR,sport); } free(tmp); - - if (!loopback_ok) - { - SET_ADDR(iserv_addr[num_sockets],EPMD_ADDR_LOOPBACK,sport); - num_sockets++; - } } else { - SET_ADDR(iserv_addr[0],EPMD_ADDR_ANY,sport); - num_sockets = 1; + SET_ADDR(iserv_addr[num_sockets],htonl(INADDR_ANY),sport); + num_sockets++; +#if defined(HAVE_IN6) && defined(AF_INET6) + SET_ADDR6(iserv_addr[num_sockets],in6addr_any,sport); + num_sockets++; +#endif } #if !defined(__WIN32__) @@ -183,13 +202,33 @@ void run(EpmdVars *g) for (i = 0; i < num_sockets; i++) { - if ((listensock[i] = socket(FAMILY,SOCK_STREAM,0)) < 0) + struct sockaddr *sa = (struct sockaddr *)&iserv_addr[i]; +#if defined(HAVE_IN6) && defined(AF_INET6) + size_t salen = (sa->sa_family == AF_INET6 ? + sizeof(struct sockaddr_in6) : + sizeof(struct sockaddr_in)); +#else + size_t salen = sizeof(struct sockaddr_in); +#endif + + if ((listensock[i] = socket(sa->sa_family,SOCK_STREAM,0)) < 0) { dbg_perror(g,"error opening stream socket"); epmd_cleanup_exit(g,1); } g->listenfd[i] = listensock[i]; - + +#if defined(HAVE_IN6) && defined(AF_INET6) + opt = 1; + if (sa->sa_family == AF_INET6 && + setsockopt(listensock[i],IPPROTO_IPV6,IPV6_V6ONLY,&opt, + sizeof(opt)) <0) + { + dbg_perror(g,"can't set IPv6 only socket option"); + epmd_cleanup_exit(g,1); + } +#endif + /* * Note that we must not enable the SO_REUSEADDR on Windows, * because addresses will be reused even if they are still in use. @@ -221,8 +260,7 @@ void run(EpmdVars *g) dbg_perror(g,"failed to set non-blocking mode of listening socket %d", listensock[i]); - if (bind(listensock[i], (struct sockaddr*) &iserv_addr[i], - sizeof(iserv_addr[i])) < 0) + if (bind(listensock[i], (struct sockaddr*) &iserv_addr[i], salen) < 0) { if (errno == EADDRINUSE) { @@ -818,15 +856,6 @@ static int conn_open(EpmdVars *g,int fd) for (i = 0; i < g->max_conn; i++) { if (g->conn[i].open == EPMD_FALSE) { - struct sockaddr_in si; - struct sockaddr_in di; -#ifdef HAVE_SOCKLEN_T - socklen_t st; -#else - int st; -#endif - st = sizeof(si); - g->active_conn++; s = &g->conn[i]; @@ -837,20 +866,7 @@ static int conn_open(EpmdVars *g,int fd) s->open = EPMD_TRUE; s->keep = EPMD_FALSE; - /* Determine if connection is from localhost */ - if (getpeername(s->fd,(struct sockaddr*) &si,&st) || - st < sizeof(si)) { - /* Failure to get peername is regarded as non local host */ - s->local_peer = EPMD_FALSE; - } else { - /* Only 127.x.x.x and connections from the host's IP address - allowed, no false positives */ - s->local_peer = - (((((unsigned) ntohl(si.sin_addr.s_addr)) & 0xFF000000U) == - 0x7F000000U) || - (getsockname(s->fd,(struct sockaddr*) &di,&st) ? - EPMD_FALSE : si.sin_addr.s_addr == di.sin_addr.s_addr)); - } + s->local_peer = conn_local_peer_check(g, s->fd); dbg_tty_printf(g,2,(s->local_peer) ? "Local peer connected" : "Non-local peer connected"); @@ -858,7 +874,7 @@ static int conn_open(EpmdVars *g,int fd) s->got = 0; s->mod_time = current_time(g); /* Note activity */ - s->buf = (char *)malloc(INBUF_SIZE); + s->buf = malloc(INBUF_SIZE); if (s->buf == NULL) { dbg_printf(g,0,"epmd: Insufficient memory"); @@ -876,6 +892,60 @@ static int conn_open(EpmdVars *g,int fd) return EPMD_FALSE; } +static int conn_local_peer_check(EpmdVars *g, int fd) +{ + struct EPMD_SOCKADDR_IN si; + struct EPMD_SOCKADDR_IN di; + + struct sockaddr_in *si4 = (struct sockaddr_in *)&si; + struct sockaddr_in *di4 = (struct sockaddr_in *)&di; + +#if defined(HAVE_IN6) && defined(AF_INET6) + struct sockaddr_in6 *si6 = (struct sockaddr_in6 *)&si; + struct sockaddr_in6 *di6 = (struct sockaddr_in6 *)&di; +#endif + +#ifdef HAVE_SOCKLEN_T + socklen_t st; +#else + int st; +#endif + + st = sizeof(si); + + /* Determine if connection is from localhost */ + if (getpeername(fd,(struct sockaddr*) &si,&st) || + st > sizeof(si)) { + /* Failure to get peername is regarded as non local host */ + return EPMD_FALSE; + } + + /* Only 127.x.x.x and connections from the host's IP address + allowed, no false positives */ +#if defined(HAVE_IN6) && defined(AF_INET6) + if (si.ss_family == AF_INET6 && IN6_IS_ADDR_LOOPBACK(&(si6->sin6_addr))) + return EPMD_TRUE; + + if (si.ss_family == AF_INET) +#endif + if ((((unsigned) ntohl(si4->sin_addr.s_addr)) & 0xFF000000U) == + 0x7F000000U) + return EPMD_TRUE; + + if (getsockname(fd,(struct sockaddr*) &di,&st)) + return EPMD_FALSE; + +#if defined(HAVE_IN6) && defined(AF_INET6) + if (si.ss_family == AF_INET6) + return IN6_ARE_ADDR_EQUAL( &(si6->sin6_addr), &(di6->sin6_addr)); + if (si.ss_family == AF_INET) +#endif + return si4->sin_addr.s_addr == di4->sin_addr.s_addr; +#if defined(HAVE_IN6) && defined(AF_INET6) + return EPMD_FALSE; +#endif +} + static int conn_close_fd(EpmdVars *g,int fd) { int i; diff --git a/erts/epmd/test/epmd_SUITE.erl b/erts/epmd/test/epmd_SUITE.erl index 3f31cd9..5821cd8 100644 --- a/erts/epmd/test/epmd_SUITE.erl +++ b/erts/epmd/test/epmd_SUITE.erl @@ -42,6 +42,7 @@ -export( [ register_name/1, + register_name_ipv6/1, register_names_1/1, register_names_2/1, register_duplicate_name/1, @@ -106,7 +107,8 @@ suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> - [register_name, register_names_1, register_names_2, + [register_name, register_name_ipv6, + register_names_1, register_names_2, register_duplicate_name, get_port_nr, slow_get_port_nr, unregister_others_name_1, unregister_others_name_2, register_overflow, name_with_null_inside, @@ -162,6 +164,24 @@ register_name(Config) when is_list(Config) -> ?line ok = close(Sock), % Unregister ok. +register_name_ipv6(doc) -> + ["Register a name over IPv6"]; +register_name_ipv6(suite) -> + []; +register_name_ipv6(Config) when is_list(Config) -> + % Test if the host has an IPv6 loopback address + Res = gen_tcp:listen(0, [inet6, {ip, {0,0,0,0,0,0,0,1}}]), + case Res of + {ok,LSock} -> + gen_tcp:close(LSock), + ?line ok = epmdrun(), + ?line {ok,Sock} = register_node6("foobar6"), + ?line ok = close(Sock), % Unregister + ok; + _Error -> + {skip, "Host does not have an IPv6 loopback address"} + end. + register_names_1(doc) -> ["Register and unregister two nodes"]; register_names_1(suite) -> @@ -204,12 +224,17 @@ register_node(Name) -> register_node(Name,Port) -> register_node_v2(Port,$M,0,5,5,Name,""). +register_node6(Name) -> + register_node_v2({0,0,0,0,0,0,0,1},?DUMMY_PORT,$M,0,5,5,Name,""). + register_node_v2(Port, NodeType, Prot, HVsn, LVsn, Name, Extra) -> + register_node_v2("localhost", Port, NodeType, Prot, HVsn, LVsn, Name, Extra). +register_node_v2(Addr, Port, NodeType, Prot, HVsn, LVsn, Name, Extra) -> Req = [?EPMD_ALIVE2_REQ, put16(Port), NodeType, Prot, put16(HVsn), put16(LVsn), size16(Name), Name, size16(Extra), Extra], - case send_req(Req) of + case send_req(Req, Addr) of {ok,Sock} -> case recv(Sock,4) of {ok, [?EPMD_ALIVE2_RESP,_Res=0,_C0,_C1]} -> @@ -1092,7 +1117,9 @@ send_direct(Sock, Bytes) -> end. send_req(Req) -> - case connect() of + send_req(Req, "localhost"). +send_req(Req, Addr) -> + case connect(Addr) of {ok,Sock} -> case send(Sock, [size16(Req), Req]) of ok -> diff --git a/lib/kernel/src/erl_epmd.erl b/lib/kernel/src/erl_epmd.erl index 91af49f..21a3dec 100644 --- a/lib/kernel/src/erl_epmd.erl +++ b/lib/kernel/src/erl_epmd.erl @@ -31,7 +31,7 @@ %% External exports -export([start/0, start_link/0, stop/0, port_please/2, port_please/3, names/0, names/1, - register_node/2, open/0, open/1, open/2]). + register_node/2, register_node/3, open/0, open/1, open/2]). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, @@ -106,7 +106,9 @@ names1(HostName) -> register_node(Name, PortNo) -> - gen_server:call(erl_epmd, {register, Name, PortNo}, infinity). + register_node(Name, PortNo, inet). +register_node(Name, PortNo, Family) -> + gen_server:call(erl_epmd, {register, Name, PortNo, Family}, infinity). %%%---------------------------------------------------------------------- %%% Callback functions from gen_server @@ -124,10 +126,10 @@ init(_) -> -spec handle_call(calls(), term(), state()) -> {'reply', term(), state()} | {'stop', 'shutdown', 'ok', state()}. -handle_call({register, Name, PortNo}, _From, State) -> +handle_call({register, Name, PortNo, Family}, _From, State) -> case State#state.socket of P when P < 0 -> - case do_register_node(Name, PortNo) of + case do_register_node(Name, PortNo, Family) of {alive, Socket, Creation} -> S = State#state{socket = Socket, port_no = PortNo, @@ -210,8 +212,12 @@ open({A,B,C,D,E,F,G,H}=EpmdAddr, Timeout) when ?ip6(A,B,C,D,E,F,G,H) -> close(Socket) -> gen_tcp:close(Socket). -do_register_node(NodeName, TcpPort) -> - case open() of +do_register_node(NodeName, TcpPort, Family) -> + Localhost = case Family of + inet -> open({127,0,0,1}); + inet6 -> open({0,0,0,0,0,0,0,1}) + end, + case Localhost of {ok, Socket} -> Name = to_string(NodeName), Extra = "", diff --git a/lib/kernel/src/inet6_tcp_dist.erl b/lib/kernel/src/inet6_tcp_dist.erl index b9c4fa6..0b5fb44 100644 --- a/lib/kernel/src/inet6_tcp_dist.erl +++ b/lib/kernel/src/inet6_tcp_dist.erl @@ -71,7 +71,7 @@ listen(Name) -> {ok, Socket} -> TcpAddress = get_tcp_address(Socket), {_,Port} = TcpAddress#net_address.address, - {ok, Creation} = erl_epmd:register_node(Name, Port), + {ok, Creation} = erl_epmd:register_node(Name, Port, inet6), {ok, {Socket, TcpAddress, Creation}}; Error -> Error -- 1.7.9.5 From carlsson.richard@REDACTED Wed Aug 8 10:39:56 2012 From: carlsson.richard@REDACTED (Richard Carlsson) Date: Wed, 08 Aug 2012 11:39:56 +0300 Subject: [erlang-patches] syntax tools 1.6.9 Message-ID: <502225DC.3020608@gmail.com> This updates syntax tools in OTP to have all patches from the development version, bumping the version number. git fetch git://github.com/richcarl/otp.git syntax_tools-1.6.9 Release notes: Syntax Tools 1.6.9 - Minor bugfixes, spec annotations and documentation cleanup. /Richard From fredrik@REDACTED Wed Aug 8 10:49:05 2012 From: fredrik@REDACTED (Fredrik) Date: Wed, 8 Aug 2012 10:49:05 +0200 Subject: [erlang-patches] eunit 2.2.3 In-Reply-To: <502186E8.10001@gmail.com> References: <502186E8.10001@gmail.com> Message-ID: <50222801.90407@erlang.org> Hi Richard, We have included this patch in the 'pu' branch. Thank you for the contribution! BR Fredrik G Erlang/OTP Team On 08/07/2012 11:21 PM, Richard Carlsson wrote: > This updates eunit in OTP to have all the changes from my development > repo, bumping the version number. > > git fetch git://github.com/richcarl/otp.git eunit-2.2.3 > > (based on OTP master) > > Release notes: > > EUnit 2.2.3 > > - New option 'no_tty' to silent the default tty report. > > - Recognize the new stacktrace format introduced in R15, > adding location information. (Thanks to Klas Johansson.) > > - Improve layout of error messages, printing the stack trace > before the error term. > > - Heuristically detect and report bad return values from > generators and instantiators. E.g., "ok" will not be > interpreted as a module name, and a warning will be printed. > > - New test representation {test,M,F} for completeness along > with {generator,M,F}. Tuples {M,F} are deprecated. > > - Use UTF-8 as encoding in Surefire output files. (Thanks to > Lukas Larsson.) > > > /Richard > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches From fredrik@REDACTED Wed Aug 8 10:49:29 2012 From: fredrik@REDACTED (Fredrik) Date: Wed, 8 Aug 2012 10:49:29 +0200 Subject: [erlang-patches] edoc 0.7.10 In-Reply-To: <50218CBA.4000807@gmail.com> References: <50218CBA.4000807@gmail.com> Message-ID: <50222819.8010109@erlang.org> Hi Richard, We have included this patch in the 'pu' branch. Thank you for the contribution! BR Fredrik G Erlang/OTP Team On 08/07/2012 11:46 PM, Richard Carlsson wrote: > This updates edoc in OTP to have all patches from the development > version, bumping the version number. > > git fetch git://github.com/richcarl/otp.git edoc-0.7.10 > > Release notes: > > EDoc 0.7.10 > > - List behaviour callbacks in Edoc when using -callback > attribute. (Thanks to Magnus Henoch.) > > - Added special case for file names under Windows. (Thanks to > Beads Land-Trujillo.) > > > /Richard > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches From fredrik@REDACTED Wed Aug 8 11:04:03 2012 From: fredrik@REDACTED (Fredrik) Date: Wed, 8 Aug 2012 11:04:03 +0200 Subject: [erlang-patches] syntax tools 1.6.9 In-Reply-To: <502225DC.3020608@gmail.com> References: <502225DC.3020608@gmail.com> Message-ID: <50222B83.1010200@erlang.org> Hi Richard, We have included this patch in the 'pu' branch. Thank you for the contribution! BR Fredrik G Erlang/OTP Team On 08/08/2012 10:39 AM, Richard Carlsson wrote: > This updates syntax tools in OTP to have all patches from the > development version, bumping the version number. > > git fetch git://github.com/richcarl/otp.git syntax_tools-1.6.9 > > Release notes: > > Syntax Tools 1.6.9 > > - Minor bugfixes, spec annotations and documentation cleanup. > > > /Richard > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches From lukas@REDACTED Wed Aug 8 15:36:57 2012 From: lukas@REDACTED (Lukas Larsson) Date: Wed, 8 Aug 2012 15:36:57 +0200 Subject: [erlang-patches] Pollset per scheduler and bind port to scheduler In-Reply-To: References: <4FFD915C.2040804@erlang.org> Message-ID: <50226B79.9040708@erlang.org> Hello! Sorry for the lack of replies, I've been away from the office the last two weeks. We have done some changes in the master which could affect the performance of the work you did: https://github.com/erlang/otp/commit/8457bb3aeb335733d22ab6d517fe173cd90b4f55 Could you check and see if these changes affect any of your benchmarks? It would indeed be better to wake interrupt the poll less often if possible. However measuring time is generally quite time consuming, so we want to avoid it as much as possible, maybe use a scheduler specific counter? Its a fine balance though as we do not want to delay dealloc of memory for too long. Lukas On 24/07/12 11:57, Wei Cao wrote: > 2012/7/11 Lukas Larsson : >> Hi, >> >> The reason I'm skeptical about anything which binds processes/ports to >> scheduler is that it feels like a temporary solution and would much rather >> do a proper solution where the scheduler takes care of these things for you. >> But as I said, internally we need to talk this over when it is not in the >> middle of summer vacation. >> >> I did some benchmarking using ab and found basically the same figures as >> you. The below is with keep-alive and the values are requests per second: >> >> not-bound bound >> >> R15B01 44k 37k >> >> master 44k 35k >> >> master+mp 48k 49k >> >> master+mp+pb 49k 55k >> >> [mp]: multi-poll patch >> [pb]: port bind patch >> [bound]: Used {scheduler,I} to spread load >> >> Unfortunately I also found that when doing the non-keep alive benchmark the >> performance is seriously degraded. >> >> R15B01 not-bound 8255 >> master+mp+pb not-bound 7668 >> master+mp+pb bound 5765 >> > I found why performance degrates in non-keep alive benchmark. It's > caused by waking schedulers up to do aux works too frequently. > > After applying pollset per scheduler patch, each scheduler tends to > wait in poll operation if there is no heavy load. So if an aux work > arrives at this time, erts_check_io_interrupt() will be called and > write a byte to a pipe fd to wake up the scheduler from poll > operation. > > Unfortunately, there're quite a lot of aux works in Erlang VM, such as > delayed dealloc, so schedulers're frequently woken up from poll to > process these tasks, say, deallocate a memory block, and go into poll > again. > > In a non-keep alive benchmark with 15k QPS, schedulers're woken up > about 300k times per second (I hacked the code adding a atomic counter > to record it), it's really time cosuming. > > After commenting out the code which wakes up scheduler to process aux > work, the QPS increases to 20k, which proves above suspect. > > I think it's really CPU time wasting to wake up scheduler from polling > to deallocate some memory blocks etc, may be it's more suitable to > wake schedulers up periodically (say, 1 millisecond) to process them, > or doing aux tasks in the aux_thread only. Any ideas to fix this? > > >> I did some gprof runs but could not find anything obvious that is going >> wrong. >> >> Lukas >> >> >> On 11/07/12 04:21, Wei Cao wrote: >>> I added a macro to conditional compile the patch because I think it >>> can be more selectable, I can remove the macro, fix the compilation >>> error and test on mingw platform in later version. >>> >>> how about provide another BIF named port_flag (like process_flag) to >>> let user bind port to a given scheduler? >>> >>> > > From datacompboy@REDACTED Thu Aug 9 09:18:01 2012 From: datacompboy@REDACTED (Anton Fedorov) Date: Thu, 9 Aug 2012 14:18:01 +0700 Subject: [erlang-patches] extend default_prompt to include remote shell node Message-ID: Replace shell.erl with: default_prompt(N) -> %% Don't bother flattening the list irrespective of what the %% I/O-protocol states. case is_alive() of true -> case {node(erlang:group_leader()), node()} of {L,L} -> io_lib:format(<<"(~s)~w> ">>, [L, N]); {R,L} -> io_lib:format(<<"[~s](~s)~w> ">>, [R, L]) end; false -> io_lib:format(<<"~w> ">>, [N]) end. That will allow to distinguish when you connected locally and when you connected remotely to node. To prevent accidents with pressing Ctrl+C on local node, and running erlang:halt() on remote. -- Regards, Anton Fedorov Call2ru service E-Mail: datacompboy@REDACTED Jabber: datacompboy@REDACTED Skype: datacompboy ICQ: 272-35-262 Mobile: +7-913-925-7974 [SMS 24h, Call 05:00-19:00 MSKT (GMT+3)] From cyg.cao@REDACTED Mon Aug 13 08:46:44 2012 From: cyg.cao@REDACTED (Wei Cao) Date: Mon, 13 Aug 2012 14:46:44 +0800 Subject: [erlang-patches] Pollset per scheduler and bind port to scheduler In-Reply-To: <50226B79.9040708@erlang.org> References: <4FFD915C.2040804@erlang.org> <50226B79.9040708@erlang.org> Message-ID: 2012/8/8 Lukas Larsson : > Hello! > > Sorry for the lack of replies, I've been away from the office the last two > weeks. > > We have done some changes in the master which could affect the performance > of the work you did: > https://github.com/erlang/otp/commit/8457bb3aeb335733d22ab6d517fe173cd90b4f55 > Could you check and see if these changes affect any of your benchmarks? Awesome, in my pressure test to non-keepalive http server(reaching 15k requests per second), the total times schedulers be woken up from poll wait to processing aux works is reduced from 205k per second to 83k per second, a dramatical decrement. According to my profiling, the big saving primarily comes from using thread progress instead of scheduling misc aux work https://github.com/erlang/otp/commit/88126e785de24f5f41068c610bc13840dcab4a7d. However, compared to the times schedulers be woken up to handle actual io tasks (about 10k), 83k is still a big number, and I observed half of them, about 40k, is contributed by erts_alloc_notify_delayed_dealloc, Can you eliminate it further more? > > It would indeed be better to wake interrupt the poll less often if possible. > However measuring time is generally quite time consuming, so we want to > avoid it as much as possible, maybe use a scheduler specific counter? Its a > fine balance though as we do not want to delay dealloc of memory for too > long. > > Lukas > > > > On 24/07/12 11:57, Wei Cao wrote: >> >> 2012/7/11 Lukas Larsson : >>> >>> Hi, >>> >>> The reason I'm skeptical about anything which binds processes/ports to >>> scheduler is that it feels like a temporary solution and would much >>> rather >>> do a proper solution where the scheduler takes care of these things for >>> you. >>> But as I said, internally we need to talk this over when it is not in the >>> middle of summer vacation. >>> >>> I did some benchmarking using ab and found basically the same figures as >>> you. The below is with keep-alive and the values are requests per second: >>> >>> not-bound bound >>> >>> R15B01 44k 37k >>> >>> master 44k 35k >>> >>> master+mp 48k 49k >>> >>> master+mp+pb 49k 55k >>> >>> [mp]: multi-poll patch >>> [pb]: port bind patch >>> [bound]: Used {scheduler,I} to spread load >>> >>> Unfortunately I also found that when doing the non-keep alive benchmark >>> the >>> performance is seriously degraded. >>> >>> R15B01 not-bound 8255 >>> master+mp+pb not-bound 7668 >>> master+mp+pb bound 5765 >>> >> I found why performance degrates in non-keep alive benchmark. It's >> caused by waking schedulers up to do aux works too frequently. >> >> After applying pollset per scheduler patch, each scheduler tends to >> wait in poll operation if there is no heavy load. So if an aux work >> arrives at this time, erts_check_io_interrupt() will be called and >> write a byte to a pipe fd to wake up the scheduler from poll >> operation. >> >> Unfortunately, there're quite a lot of aux works in Erlang VM, such as >> delayed dealloc, so schedulers're frequently woken up from poll to >> process these tasks, say, deallocate a memory block, and go into poll >> again. >> >> In a non-keep alive benchmark with 15k QPS, schedulers're woken up >> about 300k times per second (I hacked the code adding a atomic counter >> to record it), it's really time cosuming. >> >> After commenting out the code which wakes up scheduler to process aux >> work, the QPS increases to 20k, which proves above suspect. >> >> I think it's really CPU time wasting to wake up scheduler from polling >> to deallocate some memory blocks etc, may be it's more suitable to >> wake schedulers up periodically (say, 1 millisecond) to process them, >> or doing aux tasks in the aux_thread only. Any ideas to fix this? >> >> >>> I did some gprof runs but could not find anything obvious that is going >>> wrong. >>> >>> Lukas >>> >>> >>> On 11/07/12 04:21, Wei Cao wrote: >>>> >>>> I added a macro to conditional compile the patch because I think it >>>> can be more selectable, I can remove the macro, fix the compilation >>>> error and test on mingw platform in later version. >>>> >>>> how about provide another BIF named port_flag (like process_flag) to >>>> let user bind port to a given scheduler? >>>> >>>> >> >> > -- Best, Wei Cao From lukas@REDACTED Tue Aug 14 09:56:07 2012 From: lukas@REDACTED (Lukas Larsson) Date: Tue, 14 Aug 2012 09:56:07 +0200 Subject: [erlang-patches] Pollset per scheduler and bind port to scheduler In-Reply-To: References: <4FFD915C.2040804@erlang.org> <50226B79.9040708@erlang.org> Message-ID: <502A0497.4050008@erlang.org> On 13/08/12 08:46, Wei Cao wrote: > 2012/8/8 Lukas Larsson : >> Hello! >> >> Sorry for the lack of replies, I've been away from the office the last two >> weeks. >> >> We have done some changes in the master which could affect the performance >> of the work you did: >> https://github.com/erlang/otp/commit/8457bb3aeb335733d22ab6d517fe173cd90b4f55 >> Could you check and see if these changes affect any of your benchmarks? > Awesome, in my pressure test to non-keepalive http server(reaching 15k > requests per second), the total times schedulers be woken up from poll > wait to processing aux works is reduced from 205k per second to 83k > per second, a dramatical decrement. > > According to my profiling, the big saving primarily comes from using > thread progress instead of scheduling misc aux work > https://github.com/erlang/otp/commit/88126e785de24f5f41068c610bc13840dcab4a7d. > > However, compared to the times schedulers be woken up to handle actual > io tasks (about 10k), 83k is still a big number, and I observed half > of them, about 40k, is contributed by > erts_alloc_notify_delayed_dealloc, Can you eliminate it further more? It is definitely possible to reduce this further. For instance you could introduce a reduction counter to limit the number of times which handle_delayed_aux_work_wakeup is called. Another idea might be to let the schedulers sleep in select and only wake them after a timeout or a certain number of reductions have happened. Or a combination of both. Unfortunately this is not prioritized work for us right now, but we would welcome any patches in the area. If you have any questions let me know and I'll do my best to dig out answers. Lukas > >> It would indeed be better to wake interrupt the poll less often if possible. >> However measuring time is generally quite time consuming, so we want to >> avoid it as much as possible, maybe use a scheduler specific counter? Its a >> fine balance though as we do not want to delay dealloc of memory for too >> long. >> >> Lukas >> >> >> >> On 24/07/12 11:57, Wei Cao wrote: >>> 2012/7/11 Lukas Larsson : >>>> Hi, >>>> >>>> The reason I'm skeptical about anything which binds processes/ports to >>>> scheduler is that it feels like a temporary solution and would much >>>> rather >>>> do a proper solution where the scheduler takes care of these things for >>>> you. >>>> But as I said, internally we need to talk this over when it is not in the >>>> middle of summer vacation. >>>> >>>> I did some benchmarking using ab and found basically the same figures as >>>> you. The below is with keep-alive and the values are requests per second: >>>> >>>> not-bound bound >>>> >>>> R15B01 44k 37k >>>> >>>> master 44k 35k >>>> >>>> master+mp 48k 49k >>>> >>>> master+mp+pb 49k 55k >>>> >>>> [mp]: multi-poll patch >>>> [pb]: port bind patch >>>> [bound]: Used {scheduler,I} to spread load >>>> >>>> Unfortunately I also found that when doing the non-keep alive benchmark >>>> the >>>> performance is seriously degraded. >>>> >>>> R15B01 not-bound 8255 >>>> master+mp+pb not-bound 7668 >>>> master+mp+pb bound 5765 >>>> >>> I found why performance degrates in non-keep alive benchmark. It's >>> caused by waking schedulers up to do aux works too frequently. >>> >>> After applying pollset per scheduler patch, each scheduler tends to >>> wait in poll operation if there is no heavy load. So if an aux work >>> arrives at this time, erts_check_io_interrupt() will be called and >>> write a byte to a pipe fd to wake up the scheduler from poll >>> operation. >>> >>> Unfortunately, there're quite a lot of aux works in Erlang VM, such as >>> delayed dealloc, so schedulers're frequently woken up from poll to >>> process these tasks, say, deallocate a memory block, and go into poll >>> again. >>> >>> In a non-keep alive benchmark with 15k QPS, schedulers're woken up >>> about 300k times per second (I hacked the code adding a atomic counter >>> to record it), it's really time cosuming. >>> >>> After commenting out the code which wakes up scheduler to process aux >>> work, the QPS increases to 20k, which proves above suspect. >>> >>> I think it's really CPU time wasting to wake up scheduler from polling >>> to deallocate some memory blocks etc, may be it's more suitable to >>> wake schedulers up periodically (say, 1 millisecond) to process them, >>> or doing aux tasks in the aux_thread only. Any ideas to fix this? >>> >>> >>>> I did some gprof runs but could not find anything obvious that is going >>>> wrong. >>>> >>>> Lukas >>>> >>>> >>>> On 11/07/12 04:21, Wei Cao wrote: >>>>> I added a macro to conditional compile the patch because I think it >>>>> can be more selectable, I can remove the macro, fix the compilation >>>>> error and test on mingw platform in later version. >>>>> >>>>> how about provide another BIF named port_flag (like process_flag) to >>>>> let user bind port to a given scheduler? >>>>> >>>>> >>> > > From fritchie@REDACTED Fri Aug 17 11:47:09 2012 From: fritchie@REDACTED (Scott Lystig Fritchie) Date: Fri, 17 Aug 2012 04:47:09 -0500 Subject: [erlang-patches] Relocate DTrace probes from NIF shared lib -> static executable Message-ID: <75588.1345196829@snookles.snookles.com> My apologies for not realizing that the probes hadn't been relocated as part of their R15B01 implementation. And many thanks to Macneil Shonle at Basho for doing most of the work. git fetch git://github.com/slfritchie/otp.git slf-relocate-dtrace-N-probes https://github.com/slfritchie/otp/compare/slf-relocate-dtrace-N-probes https://github.com/slfritchie/otp/compare/slf-relocate-dtrace-N-probes.patch -Scott From lukas@REDACTED Fri Aug 17 14:59:38 2012 From: lukas@REDACTED (Lukas Larsson) Date: Fri, 17 Aug 2012 14:59:38 +0200 Subject: [erlang-patches] Relocate DTrace probes from NIF shared lib -> static executable In-Reply-To: <75588.1345196829@snookles.snookles.com> References: <75588.1345196829@snookles.snookles.com> Message-ID: <502E403A.1020009@erlang.org> thanks Scott and Macneil! I've added the branch to our nightly tests. Lukas On 17/08/12 11:47, Scott Lystig Fritchie wrote: > My apologies for not realizing that the probes hadn't been relocated > as part of their R15B01 implementation. And many thanks to Macneil > Shonle at Basho for doing most of the work. > > git fetch git://github.com/slfritchie/otp.git slf-relocate-dtrace-N-probes > > https://github.com/slfritchie/otp/compare/slf-relocate-dtrace-N-probes > https://github.com/slfritchie/otp/compare/slf-relocate-dtrace-N-probes.patch > > -Scott > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches > From magnus.henoch@REDACTED Fri Aug 17 20:09:58 2012 From: magnus.henoch@REDACTED (Magnus Henoch) Date: Fri, 17 Aug 2012 19:09:58 +0100 Subject: [erlang-patches] Makefile target for testing erlang-mode indentation Message-ID: I created a Makefile target for automatically testing indentation in Emacs using the provided test files. To use it, go to lib/tools/emacs and run "make test_indentation". This currently fails because of a hard-to-indent 'catch'; that error is properly marked as "BUGBUG", though. My intention with this is just to support myself and others hacking erlang.el; I'm not sure if it's worth including this in a test suite. git fetch git://github.com/legoscia/otp.git emacs-test-indentation https://github.com/legoscia/otp/compare/emacs-test-indentation Regards, Magnus From tomas.abrahamsson@REDACTED Mon Aug 20 18:34:58 2012 From: tomas.abrahamsson@REDACTED (Tomas Abrahamsson) Date: Mon, 20 Aug 2012 18:34:58 +0200 Subject: [erlang-patches] [PATCH] Fix SCTP multihoming for IPv6 In-Reply-To: References: <1325275858-13477-1-git-send-email-tomas.abrahamsson@gmail.com> <20120423141635.GA6988@erix.ericsson.se> <20120424141107.GA23589@erix.ericsson.se> <20120507131749.GA8402@erix.ericsson.se> <20120508140228.GA4062@erix.ericsson.se> Message-ID: On Sun, May 13, 2012 at 11:52 PM, Tomas Abrahamsson wrote: > regarding the SCTP multihoming, here are three commits on a branch, > I think I've addressed all issues I know of, and hope I haven't introduced > any new issues :) > > https://github.com/tomas-abrahamsson/otp/compare/sctp-multihoming > https://github.com/tomas-abrahamsson/otp/compare/sctp-multihoming.patch Hi, please refetch! I have changed the second commit to also work on sles 10(.4) (I was notified off-list that there was a failure in one of the tests in gen_sctp_SUITE.erl, on SLES or SLED 10, and I believe that this change fixes it. I have tried SLES 10.4 and could reproduce the failing test.) > The second commit changes the way the inet_drv.c binds: > the first address is bound using bind, the subsequent addresses > are added one at a time using sctp_bindx. I have applied the change below: on SLES 10(.4), calling sctp_bindx with port 0 resulted in einval being returned from the os. Now, when opening an sctp socket on port 0, the code now uses the resulting port number from bind any the subsequent call to sctp_bindx. in inet.erl, the following change was made: @@ -1046,6 +1046,11 @@ bindx(S, [Addr], Port0) -> bindx(S, Addrs, Port0) -> [{IP, Port} | Rest] = [set_bindx_port(Addr, Port0) || Addr <- Addrs], case prim_inet:bind(S, IP, Port) of + {ok, AssignedPort} when Port =:= 0 -> + %% On newer Linux kernels, Solaris and FreeBSD, calling + %% bindx with port 0 is ok, but on SuSE 10, it results in einval + Rest2 = [change_bindx_0_port(Addr, AssignedPort) || Addr <- Rest], + prim_inet:bind(S, add, Rest2); {ok, _} -> prim_inet:bind(S, add, Rest); Error -> @@ -1057,6 +1062,11 @@ set_bindx_port({_IP, _Port}=Addr, _OtherPort) -> set_bindx_port(IP, Port) -> {IP, Port}. +change_bindx_0_port({IP, 0}, AssignedPort) -> + {IP, AssignedPort}; +change_bindx_0_port({_IP, _Port}=Addr, _AssignedPort) -> + Addr. + BRs Tomas From raimo+erlang-patches@REDACTED Tue Aug 21 10:20:55 2012 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Tue, 21 Aug 2012 10:20:55 +0200 Subject: [erlang-patches] [PATCH] Fix SCTP multihoming for IPv6 In-Reply-To: References: <1325275858-13477-1-git-send-email-tomas.abrahamsson@gmail.com> <20120423141635.GA6988@erix.ericsson.se> <20120424141107.GA23589@erix.ericsson.se> <20120507131749.GA8402@erix.ericsson.se> <20120508140228.GA4062@erix.ericsson.se> Message-ID: <20120821082055.GA26555@erix.ericsson.se> I think you missed one clause, see below. On Mon, Aug 20, 2012 at 06:34:58PM +0200, Tomas Abrahamsson wrote: > On Sun, May 13, 2012 at 11:52 PM, Tomas Abrahamsson > wrote: > > regarding the SCTP multihoming, here are three commits on a branch, > > I think I've addressed all issues I know of, and hope I haven't introduced > > any new issues :) > > > > https://github.com/tomas-abrahamsson/otp/compare/sctp-multihoming > > https://github.com/tomas-abrahamsson/otp/compare/sctp-multihoming.patch > > Hi, please refetch! > > I have changed the second commit to also work on sles 10(.4) > (I was notified off-list that there was a failure in one of the > tests in gen_sctp_SUITE.erl, on SLES or SLED 10, and I believe > that this change fixes it. I have tried SLES 10.4 and could > reproduce the failing test.) > > > The second commit changes the way the inet_drv.c binds: > > the first address is bound using bind, the subsequent addresses > > are added one at a time using sctp_bindx. > > I have applied the change below: on SLES 10(.4), calling > sctp_bindx with port 0 resulted in einval being returned from the os. > Now, when opening an sctp socket on port 0, the code now uses > the resulting port number from bind any the subsequent call to sctp_bindx. > > in inet.erl, the following change was made: > > @@ -1046,6 +1046,11 @@ bindx(S, [Addr], Port0) -> > bindx(S, Addrs, Port0) -> > [{IP, Port} | Rest] = [set_bindx_port(Addr, Port0) || Addr <- Addrs], > case prim_inet:bind(S, IP, Port) of > + {ok, AssignedPort} when Port =:= 0 -> > + %% On newer Linux kernels, Solaris and FreeBSD, calling > + %% bindx with port 0 is ok, but on SuSE 10, it results in einval > + Rest2 = [change_bindx_0_port(Addr, AssignedPort) || Addr <- Rest], > + prim_inet:bind(S, add, Rest2); > {ok, _} -> > prim_inet:bind(S, add, Rest); > Error -> > @@ -1057,6 +1062,11 @@ set_bindx_port({_IP, _Port}=Addr, _OtherPort) -> > set_bindx_port(IP, Port) -> > {IP, Port}. > > +change_bindx_0_port({IP, 0}, AssignedPort) -> > + {IP, AssignedPort}; > +change_bindx_0_port({_IP, _Port}=Addr, _AssignedPort) -> + Addr; +change_bindx_0_port(Addr, AssignedPort) -> + {Addr, AssignedPort}. > + > > > BRs > Tomas > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From tomas.abrahamsson@REDACTED Tue Aug 21 11:06:10 2012 From: tomas.abrahamsson@REDACTED (Tomas Abrahamsson) Date: Tue, 21 Aug 2012 11:06:10 +0200 Subject: [erlang-patches] [PATCH] Fix SCTP multihoming for IPv6 In-Reply-To: <20120821082055.GA26555@erix.ericsson.se> References: <1325275858-13477-1-git-send-email-tomas.abrahamsson@gmail.com> <20120423141635.GA6988@erix.ericsson.se> <20120424141107.GA23589@erix.ericsson.se> <20120507131749.GA8402@erix.ericsson.se> <20120508140228.GA4062@erix.ericsson.se> <20120821082055.GA26555@erix.ericsson.se> Message-ID: >> Hi, please refetch! > I think you missed one clause, see below. Hmm.. I fail to see why that clause would be needed. Every element in the list is already expected to be tuples of {Ip,Port}, as returned by the set_bindx_port function, which was unfortunately not included in full in the diff output -- maybe I ought to have increased the number of context lines. Below is the entire snippet of code. Is the extra clause to change_bindx_0_port still needed? https://github.com/tomas-abrahamsson/otp/compare/sctp-multihoming.patch +bindx(S, [Addr], Port0) -> + {IP, Port} = set_bindx_port(Addr, Port0), + prim_inet:bind(S, IP, Port); +bindx(S, Addrs, Port0) -> + [{IP, Port} | Rest] = [set_bindx_port(Addr, Port0) || Addr <- Addrs], + case prim_inet:bind(S, IP, Port) of + {ok, AssignedPort} when Port =:= 0 -> + %% On newer Linux kernels, Solaris and FreeBSD, calling + %% bindx with port 0 is ok, but on SuSE 10, it results in einval + Rest2 = [change_bindx_0_port(Addr, AssignedPort) || Addr <- Rest], + prim_inet:bind(S, add, Rest2); + {ok, _} -> + prim_inet:bind(S, add, Rest); + Error -> + Error + end. + +set_bindx_port({_IP, _Port}=Addr, _OtherPort) -> + Addr; +set_bindx_port(IP, Port) -> + {IP, Port}. + +change_bindx_0_port({IP, 0}, AssignedPort) -> + {IP, AssignedPort}; +change_bindx_0_port({_IP, _Port}=Addr, _AssignedPort) -> + Addr. (For completeness: change_bindx_0_port with the extra clause: >> +change_bindx_0_port({IP, 0}, AssignedPort) -> >> + {IP, AssignedPort}; >> +change_bindx_0_port({_IP, _Port}=Addr, _AssignedPort) -> > + Addr; > +change_bindx_0_port(Addr, AssignedPort) -> > + {Addr, AssignedPort}. ) BRs Tomas From fredrik@REDACTED Tue Aug 21 11:19:59 2012 From: fredrik@REDACTED (Fredrik) Date: Tue, 21 Aug 2012 11:19:59 +0200 Subject: [erlang-patches] Makefile target for testing erlang-mode indentation In-Reply-To: References: Message-ID: <503352BF.4060704@erlang.org> Hi Magnus, We have included this patch in the 'pu' branch. Thank you for the contribution! BR Fredrik G Erlang/OTP Team On 08/17/2012 08:09 PM, Magnus Henoch wrote: > I created a Makefile target for automatically testing indentation in > Emacs using the provided test files. To use it, go to lib/tools/emacs > and run "make test_indentation". > > This currently fails because of a hard-to-indent 'catch'; that error is > properly marked as "BUGBUG", though. My intention with this is just to > support myself and others hacking erlang.el; I'm not sure if it's worth > including this in a test suite. > > git fetch git://github.com/legoscia/otp.git emacs-test-indentation > > https://github.com/legoscia/otp/compare/emacs-test-indentation > > Regards, > Magnus > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches From raimo+erlang-patches@REDACTED Tue Aug 21 11:23:12 2012 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Tue, 21 Aug 2012 11:23:12 +0200 Subject: [erlang-patches] [PATCH] Fix SCTP multihoming for IPv6 In-Reply-To: References: <20120424141107.GA23589@erix.ericsson.se> <20120507131749.GA8402@erix.ericsson.se> <20120508140228.GA4062@erix.ericsson.se> <20120821082055.GA26555@erix.ericsson.se> Message-ID: <20120821092312.GA28009@erix.ericsson.se> On Tue, Aug 21, 2012 at 11:06:10AM +0200, Tomas Abrahamsson wrote: > >> Hi, please refetch! > > I think you missed one clause, see below. > > Hmm.. I fail to see why that clause would be needed. > Every element in the list is already expected to be > tuples of {Ip,Port}, as returned by the set_bindx_port > function, which was unfortunately not included in full > in the diff output -- maybe I ought to have increased the > number of context lines. > > Below is the entire snippet of code. Is the extra clause > to change_bindx_0_port still needed? > https://github.com/tomas-abrahamsson/otp/compare/sctp-multihoming.patch Nope. You are right. I missed that set_bindx_port/2 had been run on the list... > > +bindx(S, [Addr], Port0) -> > + {IP, Port} = set_bindx_port(Addr, Port0), > + prim_inet:bind(S, IP, Port); > +bindx(S, Addrs, Port0) -> > + [{IP, Port} | Rest] = [set_bindx_port(Addr, Port0) || Addr <- Addrs], > + case prim_inet:bind(S, IP, Port) of > + {ok, AssignedPort} when Port =:= 0 -> > + %% On newer Linux kernels, Solaris and FreeBSD, calling > + %% bindx with port 0 is ok, but on SuSE 10, it results in einval > + Rest2 = [change_bindx_0_port(Addr, AssignedPort) || Addr <- Rest], > + prim_inet:bind(S, add, Rest2); > + {ok, _} -> > + prim_inet:bind(S, add, Rest); > + Error -> > + Error > + end. > + > +set_bindx_port({_IP, _Port}=Addr, _OtherPort) -> > + Addr; > +set_bindx_port(IP, Port) -> > + {IP, Port}. > + > +change_bindx_0_port({IP, 0}, AssignedPort) -> > + {IP, AssignedPort}; > +change_bindx_0_port({_IP, _Port}=Addr, _AssignedPort) -> > + Addr. > > (For completeness: change_bindx_0_port with the extra clause: > >> +change_bindx_0_port({IP, 0}, AssignedPort) -> > >> + {IP, AssignedPort}; > >> +change_bindx_0_port({_IP, _Port}=Addr, _AssignedPort) -> > > + Addr; > > +change_bindx_0_port(Addr, AssignedPort) -> > > + {Addr, AssignedPort}. > ) > > BRs > Tomas -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From fredrik@REDACTED Tue Aug 21 11:24:20 2012 From: fredrik@REDACTED (Fredrik) Date: Tue, 21 Aug 2012 11:24:20 +0200 Subject: [erlang-patches] [PATCH] Fix SCTP multihoming for IPv6 In-Reply-To: References: <1325275858-13477-1-git-send-email-tomas.abrahamsson@gmail.com> <20120423141635.GA6988@erix.ericsson.se> <20120424141107.GA23589@erix.ericsson.se> <20120507131749.GA8402@erix.ericsson.se> <20120508140228.GA4062@erix.ericsson.se> <20120821082055.GA26555@erix.ericsson.se> Message-ID: <503353C4.3010609@erlang.org> Hello Tomas We have included this patch in the 'pu' branch. Thank you for the contribution! BR Fredrik G Erlang/OTP Team On 08/21/2012 11:06 AM, Tomas Abrahamsson wrote: >>> Hi, please refetch! >> I think you missed one clause, see below. > Hmm.. I fail to see why that clause would be needed. > Every element in the list is already expected to be > tuples of {Ip,Port}, as returned by the set_bindx_port > function, which was unfortunately not included in full > in the diff output -- maybe I ought to have increased the > number of context lines. > > Below is the entire snippet of code. Is the extra clause > to change_bindx_0_port still needed? > https://github.com/tomas-abrahamsson/otp/compare/sctp-multihoming.patch > > +bindx(S, [Addr], Port0) -> > + {IP, Port} = set_bindx_port(Addr, Port0), > + prim_inet:bind(S, IP, Port); > +bindx(S, Addrs, Port0) -> > + [{IP, Port} | Rest] = [set_bindx_port(Addr, Port0) || Addr<- Addrs], > + case prim_inet:bind(S, IP, Port) of > + {ok, AssignedPort} when Port =:= 0 -> > + %% On newer Linux kernels, Solaris and FreeBSD, calling > + %% bindx with port 0 is ok, but on SuSE 10, it results in einval > + Rest2 = [change_bindx_0_port(Addr, AssignedPort) || Addr<- Rest], > + prim_inet:bind(S, add, Rest2); > + {ok, _} -> > + prim_inet:bind(S, add, Rest); > + Error -> > + Error > + end. > + > +set_bindx_port({_IP, _Port}=Addr, _OtherPort) -> > + Addr; > +set_bindx_port(IP, Port) -> > + {IP, Port}. > + > +change_bindx_0_port({IP, 0}, AssignedPort) -> > + {IP, AssignedPort}; > +change_bindx_0_port({_IP, _Port}=Addr, _AssignedPort) -> > + Addr. > > (For completeness: change_bindx_0_port with the extra clause: >>> +change_bindx_0_port({IP, 0}, AssignedPort) -> >>> + {IP, AssignedPort}; >>> +change_bindx_0_port({_IP, _Port}=Addr, _AssignedPort) -> >> + Addr; >> +change_bindx_0_port(Addr, AssignedPort) -> >> + {Addr, AssignedPort}. > ) > > BRs > Tomas > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches From aharnly@REDACTED Tue Aug 21 15:24:09 2012 From: aharnly@REDACTED (Aaron Harnly) Date: Tue, 21 Aug 2012 13:24:09 +0000 Subject: [erlang-patches] Fix build on OS X 10.8 Message-ID: (Apologies if this is a dupe) Hi good people, I'm proposing a small change to the 'make_preload' script to fix builds on OS X 10.8. I have *not* tested this on a Linux or Windows machine, and would appreciate help confirming that it has no effect on those platforms. To view the change: https://github.com/aaronharnly/otp/compare/fix_make_preload https://github.com/aaronharnly/otp/compare/fix_make_preload.patch To fetch the change: git fetch git://github.com/aaronharnly/otp.git fix_make_preload I've never touched Erlang before (just trying to compile to get myself rabbitmq), so your feedback on the patch and this proposal are very welcome! Much thanks, ~aaron From tomas.abrahamsson@REDACTED Tue Aug 21 23:00:12 2012 From: tomas.abrahamsson@REDACTED (Tomas Abrahamsson) Date: Tue, 21 Aug 2012 23:00:12 +0200 Subject: [erlang-patches] [erlang-bugs] erlang.el indenter In-Reply-To: References: Message-ID: On Mon, Aug 6, 2012 at 7:42 PM, Tuncer Ayaz wrote: > There seems to be a bug in the indenter that mis-indents > rebar.erl:commands/0, if it's indented as part of a larger region. > The multi-line binary string seems to be the problem. > > rebar.erl:commands/0: > https://github.com/basho/rebar/blob/491d52298e2/src/rebar.erl#L275-311 > > It works correctly when indenting the function itself with C-c C-q. Hi, Here is a patch for indenting of multi-line strings, like the one previously reported by Tuncer Ayaz. git fetch git://github.com/tomas-abrahamsson/otp.git emacs-indent-multi-line-string https://github.com/tomas-abrahamsson/otp/compare/emacs-indent-multi-line-string https://github.com/tomas-abrahamsson/otp/compare/emacs-indent-multi-line-string.patch Here's an illustration of what the patch does, excerpt from the commit msg: Previously, typing C-M-\ or M-x indent-region RET on the following: somefunction() -> S = <<" text1 somemore1 text2 somemore2 ">>, io:put_chars(S). resulted in this (note the "text2" line): somefunction() -> S = <<" text1 somemore1 text2 somemore2 ">>, io:put_chars(S). Now, the indentation inside the multi-line string is left unchanged. This is in line with how the Emacs C and Lisp mode treats multi-line strings when indenting regions. BRs Tomas From fredrik@REDACTED Wed Aug 22 12:13:39 2012 From: fredrik@REDACTED (Fredrik) Date: Wed, 22 Aug 2012 12:13:39 +0200 Subject: [erlang-patches] Fix build on OS X 10.8 In-Reply-To: References: Message-ID: <5034B0D3.5030003@erlang.org> Hello Aaron, We have included this patch in the 'pu' branch. Thank you for the contribution! BR Fredrik G Erlang/OTP Team On 08/21/2012 03:24 PM, Aaron Harnly wrote: > (Apologies if this is a dupe) > Hi good people, I'm proposing a small change to the 'make_preload' script to fix builds on OS X 10.8. > > I have *not* tested this on a Linux or Windows machine, and would appreciate help confirming that it has no effect on those platforms. > > To view the change: > https://github.com/aaronharnly/otp/compare/fix_make_preload > https://github.com/aaronharnly/otp/compare/fix_make_preload.patch > > To fetch the change: > git fetch git://github.com/aaronharnly/otp.git fix_make_preload > > I've never touched Erlang before (just trying to compile to get myself rabbitmq), so your feedback on the patch and this proposal are very welcome! > > Much thanks, > ~aaron > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches From fredrik@REDACTED Wed Aug 22 12:14:17 2012 From: fredrik@REDACTED (Fredrik) Date: Wed, 22 Aug 2012 12:14:17 +0200 Subject: [erlang-patches] [erlang-bugs] erlang.el indenter In-Reply-To: References: Message-ID: <5034B0F9.2000007@erlang.org> Hello Tomas, We have included this patch in the 'pu' branch. Thank you for the contribution! BR Fredrik G Erlang/OTP Team On 08/21/2012 11:00 PM, Tomas Abrahamsson wrote: > On Mon, Aug 6, 2012 at 7:42 PM, Tuncer Ayaz wrote: >> There seems to be a bug in the indenter that mis-indents >> rebar.erl:commands/0, if it's indented as part of a larger region. >> The multi-line binary string seems to be the problem. >> >> rebar.erl:commands/0: >> https://github.com/basho/rebar/blob/491d52298e2/src/rebar.erl#L275-311 >> >> It works correctly when indenting the function itself with C-c C-q. > Hi, > > Here is a patch for indenting of multi-line strings, like the > one previously reported by Tuncer Ayaz. > > git fetch git://github.com/tomas-abrahamsson/otp.git > emacs-indent-multi-line-string > > https://github.com/tomas-abrahamsson/otp/compare/emacs-indent-multi-line-string > https://github.com/tomas-abrahamsson/otp/compare/emacs-indent-multi-line-string.patch > > Here's an illustration of what the patch does, > excerpt from the commit msg: > > Previously, typing C-M-\ or M-x indent-region RET on the following: > > somefunction() -> > S =<<" > text1 somemore1 > text2 somemore2 > ">>, > io:put_chars(S). > > resulted in this (note the "text2" line): > > somefunction() -> > S =<<" > text1 somemore1 > text2 somemore2 > ">>, > io:put_chars(S). > > Now, the indentation inside the multi-line string is left unchanged. > This is in line with how the Emacs C and Lisp mode treats multi-line > strings when indenting regions. > > > BRs > Tomas > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches From lukas@REDACTED Wed Aug 22 17:30:24 2012 From: lukas@REDACTED (Lukas Larsson) Date: Wed, 22 Aug 2012 17:30:24 +0200 Subject: [erlang-patches] Print column numbers when compiling In-Reply-To: References: <610BC6F9-18BF-46A2-B487-492A9B41E42A@gmail.com> <4FCE3186.3000202@erlang.org> Message-ID: <5034FB10.7090804@erlang.org> Hi, We have now looked at this patch and there are a couple of issues remaining which have to be solved. The patch changes the representation of the abstract format which has a couple of implications: * Any parse transform which uses the line number position might brake when this new option (this could include OTP parse transforms) * Any tool which depend on having an integer as the line number position will break (syntax tools might be one such tool) In order to mitigate this backwards incompatibility, we suggest making the line/column number an opaque datatype which is only accessible via an api and update the documentation to reflect this. In addition all of the different warnings/errors in erl_lint and friends have to be checked with the new column number so that they point to the correct position. Also the erl_lint, epp and any other suite which deal with error messages/warnings have to be updated to run tests with and without this option. I'm sure that I've forgotten some things which have to be done. This is a major change and will take some time to get correct. I hope I have not deterred you from getting this patch into the Erlang/OTP. If you have any questions about anything I will do what I can to help you. Lukas On 10/06/12 13:24, nox wrote: > I added a commit to correctly order locations in compile:messages_per_file/1 > which didn't take into account column numbers. > > git fetch https://github.com/nox/otp.git compile-column-numbers > > > The following changes since commit 9bbda97f63ba4ee7cd58c266ee69af1059352189: > > Merge branch 'raimo/tools/remove-fprof-tuple-funs/OTP-10091' into > maint (2012-05-23 16:15:58 +0200) > > are available in the git repository at: > > > https://github.com/nox/otp.git compile-column-numbers > > for you to fetch changes up to d932ad582676f1593d917f222b1d8dec71fe88b3: > > Fix messages ordering with column numbers (2012-06-10 13:01:50 +0200) > > ---------------------------------------------------------------- > Anthony Ramine (7): > Export type erl_scan:location/0 > Allow setting of initial position in epp > Create a new "column" option in compile > Fix printing of errors with column numbers > Test column number reporting in error_SUITE > Fix type compile:err_info/0 > Fix messages ordering with column numbers > > lib/compiler/doc/src/compile.xml | 5 +++++ > lib/compiler/src/compile.erl | 25 +++++++++++++++++---- > lib/compiler/test/error_SUITE.erl | 15 +++++++++++-- > lib/stdlib/doc/src/epp.xml | 2 ++ > lib/stdlib/src/epp.erl | 44 +++++++++++++++++++++++++++++-------- > lib/stdlib/src/erl_scan.erl | 2 +- > 6 files changed, 77 insertions(+), 16 deletions(-) > > -- > Anthony Ramine > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches > From lukas@REDACTED Wed Aug 22 18:01:44 2012 From: lukas@REDACTED (Lukas Larsson) Date: Wed, 22 Aug 2012 18:01:44 +0200 Subject: [erlang-patches] [patch] new float_to_list/2 In-Reply-To: <500704BE.1090709@aleynikov.org> References: <4D2D3FA8.1000009@aleynikov.org> <4D2DB65C.1090106@aleynikov.org> <4D2DE13E.7040404@aleynikov.org> <4D33B762.3080202@aleynikov.org> <4D90ABBD.8050100@erix.ericsson.se> <4F58F46A.5050701@aleynikov.org> <4F5F52FE.7060003@erlang.org> <4F5F8097.5060003@erix.ericsson.se> <4F8EE138.60402@aleynikov.org> <4F9129B5.6020304@erlang.org> <4F924348.6070400@aleynikov.org> <4FBDFCB2.2050402@erlang.org> <4FBE3F78.8050405@aleynikov.org> <50067F49.4020206@erlang.org> <500704BE.1090709@aleynikov.org> Message-ID: <50350268.8080704@erlang.org> Hello Serge! I think we have finally agreed how we want this functionality to work. float_to_list/1 should be left as it is now for backwards compatibility. float_to_list(1.0,[]) should give the same as float_to_list(1.0). float_to_list(1.0,[{decimals,X}]) should use your faster implementation (with the optional compact option). float_to_list(1.0,[{scientific,Y}]) should give the same as float_to_list(1.0) if Y is 20. We would also like the string rendering part of sys_double_to_chars_fast to be put into erts/lib_src/common/erl_printf_format.c:fmt_double. This way other parts of the vm which print floats will benefit from your changes! I hope our indecisiveness have not caused you to shy away from taking this feature into Erlang/OTP. If you have any further questions or ponderings just let me know. Lukas On 18/07/12 20:47, Serge Aleynikov wrote: > On 7/18/2012 5:18 AM, Lukas Larsson wrote: >> However, I would also like the fast functionality to be used by >> float_to_list_1 as well, is possible to do this and stay backwards >> compatible? Hopefully you just have to shift the comma and add e+XX at >> the end of the optimized case and call sys_double_to_chars for the >> unoptimized. > See my comments below regarding 'scientific' option. Since > float_to_list_2 is a new function I would think that you are questioning > the issue of backward compatibility only in terms of converting > float_to_list_1 to use float_to_list_2 implementation. However, I think > that this will have adverse performance tax on float_to_list_2, which > will diminish the benefit. It's been a while however, since I wrote > that patch, perhaps there's a way to retrofit scientific notation > without a performance penalty. > > It's more than simple shifting of the comma, since there's also rounding > involved. > > This case is easy: > > 4> float_to_list(1.01234). > "1.01234000000000001762e+00" > 5> float_to_list(1.01234, [{decimals, 20}]). > "1.01234000000000001762" > > This case is a bit more complex (illustration of rounding impact): > > 7> float_to_list(10123412345.0123451234). > "1.01234123450123443604e+10" > 8> float_to_list(10123412345.0123451234, [{decimals, 20}]). > "10123412345.01234436035156250000" > >> Also float_to_list(1.0) should return the same thing as >> float_to_list(1.0,[]), otherwise the API will be inconsistent with how >> other such APIs work. > Actually if you trace this subject back there was another request that > the default number of decimals is chosen to be consistent with what > printf() does, so I changed the implementation to accommodate that request: > > Eshell V5.9 (abort with ^G) > 1> float_to_list(1.0, []). > "1.000000" > > Which is different from the default of float_to_list/1: > > 2> float_to_list(1.0). > "1.00000000000000000000e+00" > > Maybe one could introduce a 'scientific' option to float_to_list/2, to > use the float_to_list/1 implementation? > > Serge > >> On 24/05/12 16:02, Serge Aleynikov wrote: >>> Henrik, >>> >>> Fetch: git fetch https://github.com/saleyn/otp/tree/float_to_list_2 >>> Diff: https://github.com/saleyn/otp/compare/float_to_list_2 >>> >>> I added the definition for the new BIF to make the type checker happy: >>> https://github.com/saleyn/otp/commit/f9ddbeda5426ca83cda03c06a9860220ea4a22c7 >>> >>> >>> Once you do the "otp_build tests", how do you execute all tests suites >>> in $ERL_TOP or if possible only tests in a given SUITE? I tried the >>> following but all tests fail: >>> >>> [otp/erts/emulator/test]$ ../../../bin/erl -noshell -s test_server_ctrl >>> run_test DIR "." -s erlang halt >>> >>> I did however run individual tests in bif_SUIT:types to make sure my >>> patch didn't break anything. >>> >>> >>> >>> Serge >>> >>> On 5/24/2012 5:17 AM, Henrik Nord wrote: >>>> Hi again. >>>> >>>> >>>> This test is not passing: emulator/bif_SUIT:types >>>> >>>> No type information: >>>> >>>> [{erlang,float_to_list,2}] >>>> >>>> >>>> >>>> On 04/21/2012 07:19 AM, Serge Aleynikov wrote: >>>>> git fetch https://github.com/saleyn/otp/tree/float_to_list_2 >>> _______________________________________________ >>> erlang-patches mailing list >>> erlang-patches@REDACTED >>> http://erlang.org/mailman/listinfo/erlang-patches >>> >> > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches > From magnus.henoch@REDACTED Wed Aug 22 19:09:45 2012 From: magnus.henoch@REDACTED (Magnus Henoch) Date: Wed, 22 Aug 2012 18:09:45 +0100 Subject: [erlang-patches] Makefile target for testing erlang-mode indentation In-Reply-To: (Magnus Henoch's message of "Fri, 17 Aug 2012 19:09:58 +0100") References: Message-ID: Magnus Henoch writes: > git fetch git://github.com/legoscia/otp.git emacs-test-indentation > > https://github.com/legoscia/otp/compare/emacs-test-indentation Please refetch; apparently the ignore-errors redefinition mysteriously fails for everyone but me. This improved version is mostly due to Dan Gudmundsson, and avoids the ignore-errors problem by calling (require 'cl), which is needed for Emacs 22 and earlier. Regards, Magnus From tuncer.ayaz@REDACTED Wed Aug 22 19:10:10 2012 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Wed, 22 Aug 2012 19:10:10 +0200 Subject: [erlang-patches] [erlang-bugs] erlang.el indenter In-Reply-To: <5034B0F9.2000007@erlang.org> References: <5034B0F9.2000007@erlang.org> Message-ID: On Wed, Aug 22, 2012 at 12:14 PM, Fredrik wrote: > Hello Tomas, > We have included this patch in the 'pu' branch. > Thank you for the contribution! A quick test revealed that erlang.el from 'pu' erroneously re-indents the already correctly indented rebar:option_spec_list/0 and also rebar:commands/0. Can you reproduce the regression? > On 08/21/2012 11:00 PM, Tomas Abrahamsson wrote: >> >> On Mon, Aug 6, 2012 at 7:42 PM, Tuncer Ayaz wrote: >>> >>> There seems to be a bug in the indenter that mis-indents >>> rebar.erl:commands/0, if it's indented as part of a larger region. >>> The multi-line binary string seems to be the problem. >>> >>> rebar.erl:commands/0: >>> https://github.com/basho/rebar/blob/491d52298e2/src/rebar.erl#L275-311 >>> >>> It works correctly when indenting the function itself with C-c C-q. >> >> Hi, >> >> Here is a patch for indenting of multi-line strings, like the >> one previously reported by Tuncer Ayaz. >> >> git fetch git://github.com/tomas-abrahamsson/otp.git >> emacs-indent-multi-line-string >> >> >> https://github.com/tomas-abrahamsson/otp/compare/emacs-indent-multi-line-string >> >> https://github.com/tomas-abrahamsson/otp/compare/emacs-indent-multi-line-string.patch >> >> Here's an illustration of what the patch does, >> excerpt from the commit msg: >> >> Previously, typing C-M-\ or M-x indent-region RET on the following: >> >> somefunction() -> >> S =<<" >> text1 somemore1 >> text2 somemore2 >> ">>, >> io:put_chars(S). >> >> resulted in this (note the "text2" line): >> >> somefunction() -> >> S =<<" >> text1 somemore1 >> text2 somemore2 >> ">>, >> io:put_chars(S). >> >> Now, the indentation inside the multi-line string is left unchanged. >> This is in line with how the Emacs C and Lisp mode treats multi-line >> strings when indenting regions. >> >> >> BRs >> Tomas From serge@REDACTED Wed Aug 22 21:17:03 2012 From: serge@REDACTED (Serge Aleynikov) Date: Wed, 22 Aug 2012 15:17:03 -0400 Subject: [erlang-patches] [patch] new float_to_list/2 In-Reply-To: <50350268.8080704@erlang.org> References: <4D2D3FA8.1000009@aleynikov.org> <4D2DB65C.1090106@aleynikov.org> <4D2DE13E.7040404@aleynikov.org> <4D33B762.3080202@aleynikov.org> <4D90ABBD.8050100@erix.ericsson.se> <4F58F46A.5050701@aleynikov.org> <4F5F52FE.7060003@erlang.org> <4F5F8097.5060003@erix.ericsson.se> <4F8EE138.60402@aleynikov.org> <4F9129B5.6020304@erlang.org> <4F924348.6070400@aleynikov.org> <4FBDFCB2.2050402@erlang.org> <4FBE3F78.8050405@aleynikov.org> <50067F49.4020206@erlang.org> <500704BE.1090709@aleynikov.org> <50350268.8080704@erlang.org> Message-ID: <5035302F.1070405@aleynikov.org> I am certainly very happy to hear that you finally agreed to include this in the distribution. The changes proposed below seem reasonable and simple. Will the OTP team be able to modify my patch to implement them? On 8/22/2012 12:01 PM, Lukas Larsson wrote: > Hello Serge! > > I think we have finally agreed how we want this functionality to work. > > float_to_list/1 should be left as it is now for backwards compatibility. > float_to_list(1.0,[]) should give the same as float_to_list(1.0). > float_to_list(1.0,[{decimals,X}]) should use your faster implementation > (with the optional compact option). > float_to_list(1.0,[{scientific,Y}]) should give the same as > float_to_list(1.0) if Y is 20. > > We would also like the string rendering part of sys_double_to_chars_fast > to be put into erts/lib_src/common/erl_printf_format.c:fmt_double. This > way other parts of the vm which print floats will benefit from your > changes! > > I hope our indecisiveness have not caused you to shy away from taking > this feature into Erlang/OTP. If you have any further questions or > ponderings just let me know. > > Lukas > > On 18/07/12 20:47, Serge Aleynikov wrote: >> On 7/18/2012 5:18 AM, Lukas Larsson wrote: >>> However, I would also like the fast functionality to be used by >>> float_to_list_1 as well, is possible to do this and stay backwards >>> compatible? Hopefully you just have to shift the comma and add e+XX at >>> the end of the optimized case and call sys_double_to_chars for the >>> unoptimized. >> See my comments below regarding 'scientific' option. Since >> float_to_list_2 is a new function I would think that you are questioning >> the issue of backward compatibility only in terms of converting >> float_to_list_1 to use float_to_list_2 implementation. However, I think >> that this will have adverse performance tax on float_to_list_2, which >> will diminish the benefit. It's been a while however, since I wrote >> that patch, perhaps there's a way to retrofit scientific notation >> without a performance penalty. >> >> It's more than simple shifting of the comma, since there's also rounding >> involved. >> >> This case is easy: >> >> 4> float_to_list(1.01234). >> "1.01234000000000001762e+00" >> 5> float_to_list(1.01234, [{decimals, 20}]). >> "1.01234000000000001762" >> >> This case is a bit more complex (illustration of rounding impact): >> >> 7> float_to_list(10123412345.0123451234). >> "1.01234123450123443604e+10" >> 8> float_to_list(10123412345.0123451234, [{decimals, 20}]). >> "10123412345.01234436035156250000" >> >>> Also float_to_list(1.0) should return the same thing as >>> float_to_list(1.0,[]), otherwise the API will be inconsistent with how >>> other such APIs work. >> Actually if you trace this subject back there was another request that >> the default number of decimals is chosen to be consistent with what >> printf() does, so I changed the implementation to accommodate that >> request: >> >> Eshell V5.9 (abort with ^G) >> 1> float_to_list(1.0, []). >> "1.000000" >> >> Which is different from the default of float_to_list/1: >> >> 2> float_to_list(1.0). >> "1.00000000000000000000e+00" >> >> Maybe one could introduce a 'scientific' option to float_to_list/2, to >> use the float_to_list/1 implementation? >> >> Serge >> >>> On 24/05/12 16:02, Serge Aleynikov wrote: >>>> Henrik, >>>> >>>> Fetch: git fetch https://github.com/saleyn/otp/tree/float_to_list_2 >>>> Diff: https://github.com/saleyn/otp/compare/float_to_list_2 >>>> >>>> I added the definition for the new BIF to make the type checker happy: >>>> https://github.com/saleyn/otp/commit/f9ddbeda5426ca83cda03c06a9860220ea4a22c7 >>>> >>>> >>>> >>>> Once you do the "otp_build tests", how do you execute all tests suites >>>> in $ERL_TOP or if possible only tests in a given SUITE? I tried the >>>> following but all tests fail: >>>> >>>> [otp/erts/emulator/test]$ ../../../bin/erl -noshell -s test_server_ctrl >>>> run_test DIR "." -s erlang halt >>>> >>>> I did however run individual tests in bif_SUIT:types to make sure my >>>> patch didn't break anything. >>>> >>>> >>>> >>>> Serge >>>> >>>> On 5/24/2012 5:17 AM, Henrik Nord wrote: >>>>> Hi again. >>>>> >>>>> >>>>> This test is not passing: emulator/bif_SUIT:types >>>>> >>>>> No type information: >>>>> >>>>> [{erlang,float_to_list,2}] >>>>> >>>>> >>>>> >>>>> On 04/21/2012 07:19 AM, Serge Aleynikov wrote: >>>>>> git fetch https://github.com/saleyn/otp/tree/float_to_list_2 >>>> _______________________________________________ >>>> erlang-patches mailing list >>>> erlang-patches@REDACTED >>>> http://erlang.org/mailman/listinfo/erlang-patches >>>> >>> >> _______________________________________________ >> erlang-patches mailing list >> erlang-patches@REDACTED >> http://erlang.org/mailman/listinfo/erlang-patches >> > From tomas.abrahamsson@REDACTED Wed Aug 22 23:42:07 2012 From: tomas.abrahamsson@REDACTED (Tomas Abrahamsson) Date: Wed, 22 Aug 2012 23:42:07 +0200 Subject: [erlang-patches] [erlang-bugs] erlang.el indenter In-Reply-To: References: <5034B0F9.2000007@erlang.org> Message-ID: >>> Here is a patch for indenting of multi-line strings > A quick test revealed that erlang.el from 'pu' erroneously > re-indents the already correctly indented rebar:option_spec_list/0 > and also rebar:commands/0. Can you reproduce the regression? I see what you mean. Will try to fix it. BRs Tomas From tuncer.ayaz@REDACTED Thu Aug 23 00:07:02 2012 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Thu, 23 Aug 2012 00:07:02 +0200 Subject: [erlang-patches] [erlang-bugs] erlang.el indenter In-Reply-To: References: <5034B0F9.2000007@erlang.org> Message-ID: On Wed, Aug 22, 2012 at 11:42 PM, Tomas Abrahamsson wrote: >>>> Here is a patch for indenting of multi-line strings > >> A quick test revealed that erlang.el from 'pu' erroneously >> re-indents the already correctly indented rebar:option_spec_list/0 >> and also rebar:commands/0. Can you reproduce the regression? > > I see what you mean. Will try to fix it. Thanks. Are the erlang.el changes in 'pu' susceptible to new mis-indentations by nature? The original issue is not important enough to introduce regressions if fixing it means erlang.el will get imprecise or hard to get right. Out of curiosity, what about using erl_parse, erl_scan, etc. via an escript instead? Does that sound viable and make sense? From rjefts@REDACTED Thu Aug 23 00:18:48 2012 From: rjefts@REDACTED (Richie Jefts) Date: Wed, 22 Aug 2012 17:18:48 -0500 Subject: [erlang-patches] Remove text length check in aes_cfb_128_encrypt Message-ID: crypto:aes_cfb_128_encrypt/3 currently throws a badarg when the Text parameter is not a multiple of 16. CFB mode does not require this restriction. The following patch removes this check. http://erlang.org/pipermail/erlang-questions/2012-January/063553.html git fetch git://github.com/buerkle/otp.git aes_cfb_128_encrypt_length https://github.com/buerkle/otp/compare/aes_cfb_128_encrypt_length https://github.com/buerkle/otp/compare/aes_cfb_128_encrypt_length.patch thank you richie From fredrik@REDACTED Thu Aug 23 09:33:20 2012 From: fredrik@REDACTED (Fredrik) Date: Thu, 23 Aug 2012 09:33:20 +0200 Subject: [erlang-patches] Makefile target for testing erlang-mode indentation In-Reply-To: References: Message-ID: <5035DCC0.9080106@erlang.org> Hello Magnus I have now re-fetched and included the patch in 'pu' once again. Thanks for your contribution BR Fredrik Gustafsson Erlang OTP Team On 08/22/2012 07:09 PM, Magnus Henoch wrote: > Magnus Henoch writes: > >> git fetch git://github.com/legoscia/otp.git emacs-test-indentation >> >> https://github.com/legoscia/otp/compare/emacs-test-indentation > Please refetch; apparently the ignore-errors redefinition mysteriously > fails for everyone but me. This improved version is mostly due to Dan > Gudmundsson, and avoids the ignore-errors problem by calling (require > 'cl), which is needed for Emacs 22 and earlier. > > Regards, > Magnus > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches From fredrik@REDACTED Thu Aug 23 09:34:13 2012 From: fredrik@REDACTED (Fredrik) Date: Thu, 23 Aug 2012 09:34:13 +0200 Subject: [erlang-patches] Remove text length check in aes_cfb_128_encrypt In-Reply-To: References: Message-ID: <5035DCF5.1050503@erlang.org> Hi Richie I have now included your patch in the 'pu' branch. Thanks for your contribution BR Fredrik Gustafsson Erlang OTP Team On 08/23/2012 12:18 AM, Richie Jefts wrote: > crypto:aes_cfb_128_encrypt/3 currently throws a badarg when the Text > parameter is not a multiple of 16. CFB mode does not require this > restriction. The following patch removes this check. > > http://erlang.org/pipermail/erlang-questions/2012-January/063553.html > > git fetch git://github.com/buerkle/otp.git aes_cfb_128_encrypt_length > > https://github.com/buerkle/otp/compare/aes_cfb_128_encrypt_length > https://github.com/buerkle/otp/compare/aes_cfb_128_encrypt_length.patch > > thank you > richie > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches From sverker.eriksson@REDACTED Thu Aug 23 10:45:53 2012 From: sverker.eriksson@REDACTED (Sverker Eriksson) Date: Thu, 23 Aug 2012 10:45:53 +0200 Subject: [erlang-patches] Remove text length check in aes_cfb_128_encrypt In-Reply-To: <5035DCF5.1050503@erlang.org> References: <5035DCF5.1050503@erlang.org> Message-ID: <5035EDC1.50608@erix.ericsson.se> Great initiative, Richie. You got in second place this time, however. The exact same patch has already been merged into maint branch for R15B02 and will soon be pushed to github as 6faad239766accdcc007540f0b8b38d4709cd435. /Sverker, Erlang/OTP Fredrik wrote: > Hi Richie > > I have now included your patch in the 'pu' branch. > Thanks for your contribution > > BR Fredrik Gustafsson > Erlang OTP Team > On 08/23/2012 12:18 AM, Richie Jefts wrote: > >> crypto:aes_cfb_128_encrypt/3 currently throws a badarg when the Text >> parameter is not a multiple of 16. CFB mode does not require this >> restriction. The following patch removes this check. >> >> http://erlang.org/pipermail/erlang-questions/2012-January/063553.html >> >> git fetch git://github.com/buerkle/otp.git aes_cfb_128_encrypt_length >> >> https://github.com/buerkle/otp/compare/aes_cfb_128_encrypt_length >> https://github.com/buerkle/otp/compare/aes_cfb_128_encrypt_length.patch >> >> thank you >> richie >> _______________________________________________ >> erlang-patches mailing list >> erlang-patches@REDACTED >> http://erlang.org/mailman/listinfo/erlang-patches >> > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches > > From lukas@REDACTED Thu Aug 23 11:10:26 2012 From: lukas@REDACTED (Lukas Larsson) Date: Thu, 23 Aug 2012 11:10:26 +0200 Subject: [erlang-patches] [patch] new float_to_list/2 In-Reply-To: <5035302F.1070405@aleynikov.org> References: <4D2D3FA8.1000009@aleynikov.org> <4D2DB65C.1090106@aleynikov.org> <4D2DE13E.7040404@aleynikov.org> <4D33B762.3080202@aleynikov.org> <4D90ABBD.8050100@erix.ericsson.se> <4F58F46A.5050701@aleynikov.org> <4F5F52FE.7060003@erlang.org> <4F5F8097.5060003@erix.ericsson.se> <4F8EE138.60402@aleynikov.org> <4F9129B5.6020304@erlang.org> <4F924348.6070400@aleynikov.org> <4FBDFCB2.2050402@erlang.org> <4FBE3F78.8050405@aleynikov.org> <50067F49.4020206@erlang.org> <500704BE.1090709@aleynikov.org> <50350268.8080704@erlang.org> <5035302F.1070405@aleynikov.org> Message-ID: <5035F382.5090203@erlang.org> Hi, I'll put it in the backlog and we'll see if it gets prioritized for R16B. As always if you (or someone else) wants make sure it gets in, the best way to ensure that is to send an updated patch. Lukas On 22/08/12 21:17, Serge Aleynikov wrote: > I am certainly very happy to hear that you finally agreed to include > this in the distribution. The changes proposed below seem reasonable > and simple. Will the OTP team be able to modify my patch to implement them? > > On 8/22/2012 12:01 PM, Lukas Larsson wrote: >> Hello Serge! >> >> I think we have finally agreed how we want this functionality to work. >> >> float_to_list/1 should be left as it is now for backwards compatibility. >> float_to_list(1.0,[]) should give the same as float_to_list(1.0). >> float_to_list(1.0,[{decimals,X}]) should use your faster implementation >> (with the optional compact option). >> float_to_list(1.0,[{scientific,Y}]) should give the same as >> float_to_list(1.0) if Y is 20. >> >> We would also like the string rendering part of sys_double_to_chars_fast >> to be put into erts/lib_src/common/erl_printf_format.c:fmt_double. This >> way other parts of the vm which print floats will benefit from your >> changes! >> >> I hope our indecisiveness have not caused you to shy away from taking >> this feature into Erlang/OTP. If you have any further questions or >> ponderings just let me know. >> >> Lukas >> >> On 18/07/12 20:47, Serge Aleynikov wrote: >>> On 7/18/2012 5:18 AM, Lukas Larsson wrote: >>>> However, I would also like the fast functionality to be used by >>>> float_to_list_1 as well, is possible to do this and stay backwards >>>> compatible? Hopefully you just have to shift the comma and add e+XX at >>>> the end of the optimized case and call sys_double_to_chars for the >>>> unoptimized. >>> See my comments below regarding 'scientific' option. Since >>> float_to_list_2 is a new function I would think that you are questioning >>> the issue of backward compatibility only in terms of converting >>> float_to_list_1 to use float_to_list_2 implementation. However, I think >>> that this will have adverse performance tax on float_to_list_2, which >>> will diminish the benefit. It's been a while however, since I wrote >>> that patch, perhaps there's a way to retrofit scientific notation >>> without a performance penalty. >>> >>> It's more than simple shifting of the comma, since there's also rounding >>> involved. >>> >>> This case is easy: >>> >>> 4> float_to_list(1.01234). >>> "1.01234000000000001762e+00" >>> 5> float_to_list(1.01234, [{decimals, 20}]). >>> "1.01234000000000001762" >>> >>> This case is a bit more complex (illustration of rounding impact): >>> >>> 7> float_to_list(10123412345.0123451234). >>> "1.01234123450123443604e+10" >>> 8> float_to_list(10123412345.0123451234, [{decimals, 20}]). >>> "10123412345.01234436035156250000" >>> >>>> Also float_to_list(1.0) should return the same thing as >>>> float_to_list(1.0,[]), otherwise the API will be inconsistent with how >>>> other such APIs work. >>> Actually if you trace this subject back there was another request that >>> the default number of decimals is chosen to be consistent with what >>> printf() does, so I changed the implementation to accommodate that >>> request: >>> >>> Eshell V5.9 (abort with ^G) >>> 1> float_to_list(1.0, []). >>> "1.000000" >>> >>> Which is different from the default of float_to_list/1: >>> >>> 2> float_to_list(1.0). >>> "1.00000000000000000000e+00" >>> >>> Maybe one could introduce a 'scientific' option to float_to_list/2, to >>> use the float_to_list/1 implementation? >>> >>> Serge >>> >>>> On 24/05/12 16:02, Serge Aleynikov wrote: >>>>> Henrik, >>>>> >>>>> Fetch: git fetch https://github.com/saleyn/otp/tree/float_to_list_2 >>>>> Diff: https://github.com/saleyn/otp/compare/float_to_list_2 >>>>> >>>>> I added the definition for the new BIF to make the type checker happy: >>>>> https://github.com/saleyn/otp/commit/f9ddbeda5426ca83cda03c06a9860220ea4a22c7 >>>>> >>>>> >>>>> >>>>> Once you do the "otp_build tests", how do you execute all tests suites >>>>> in $ERL_TOP or if possible only tests in a given SUITE? I tried the >>>>> following but all tests fail: >>>>> >>>>> [otp/erts/emulator/test]$ ../../../bin/erl -noshell -s test_server_ctrl >>>>> run_test DIR "." -s erlang halt >>>>> >>>>> I did however run individual tests in bif_SUIT:types to make sure my >>>>> patch didn't break anything. >>>>> >>>>> >>>>> >>>>> Serge >>>>> >>>>> On 5/24/2012 5:17 AM, Henrik Nord wrote: >>>>>> Hi again. >>>>>> >>>>>> >>>>>> This test is not passing: emulator/bif_SUIT:types >>>>>> >>>>>> No type information: >>>>>> >>>>>> [{erlang,float_to_list,2}] >>>>>> >>>>>> >>>>>> >>>>>> On 04/21/2012 07:19 AM, Serge Aleynikov wrote: >>>>>>> git fetch https://github.com/saleyn/otp/tree/float_to_list_2 >>>>> _______________________________________________ >>>>> erlang-patches mailing list >>>>> erlang-patches@REDACTED >>>>> http://erlang.org/mailman/listinfo/erlang-patches >>>>> >>> _______________________________________________ >>> erlang-patches mailing list >>> erlang-patches@REDACTED >>> http://erlang.org/mailman/listinfo/erlang-patches >>> > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches > From bgustavsson@REDACTED Thu Aug 23 14:50:07 2012 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Thu, 23 Aug 2012 14:50:07 +0200 Subject: [erlang-patches] Fix build on OS X 10.8 In-Reply-To: References: Message-ID: On Tue, Aug 21, 2012 at 3:24 PM, Aaron Harnly wrote: > (Apologies if this is a dupe) > Hi good people, I'm proposing a small change to the 'make_preload' script to fix builds on OS X 10.8. > > I have *not* tested this on a Linux or Windows machine, and would appreciate help confirming that it has no effect on those platforms. > There could be an issue running on an older version of Perl that doesn't have the 'bytes' pragma. Now I am not sure that we support such old version of Perl anyway, so that could be a moot issue. However, the man page for 'bytes' discourages its use except for debugging. I think that a safer and more portable change is this: diff --git a/erts/emulator/utils/make_preload b/erts/emulator/utils/make_preload index 13019d4..4e329b2 100755 --- a/erts/emulator/utils/make_preload +++ b/erts/emulator/utils/make_preload @@ -87,6 +87,7 @@ foreach $file (@ARGV) { my $comment = ''; open(FILE, $file) or error("failed to read $file: $!"); + binmode(FILE); $_ = ; $_ = beam_strip($_); close(FILE); We will test it in our daily builds, and if we find no problems we will include it in R15B02. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From lukas@REDACTED Thu Aug 23 14:55:01 2012 From: lukas@REDACTED (Lukas Larsson) Date: Thu, 23 Aug 2012 14:55:01 +0200 Subject: [erlang-patches] SNMP bugfix to usmUserTable In-Reply-To: <1343728392.29035.10.camel@ax-sze> References: <1343728392.29035.10.camel@ax-sze> Message-ID: <50362825.1080902@erlang.org> Hello, In the attached patch there are calls to lists:keydelete/2. They should be to lists:keydelete/3. Lukas On 31/07/12 11:53, Stefan Zegenhagen wrote: > Dear all, > > usmUserTable suffers from the problem that it doesn't support creating > new users (by cloning them) and changing their passwords in the same > operation. > > This is allowed by the MIB definition, and some SNMP test suites do > exactly that numerous times when they check the correctness of SNMPv3 > support. SNMP managers might also make use of that feature. > > The patch attached to this e-mail solves the issue and allows SNMPv3 > user creation to succeed if all required information is passed to the > agent in a single SNMP set request. > > Kind regards, > > > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -------------- next part -------------- An HTML attachment was scrubbed... URL: From kenneth.lundin@REDACTED Thu Aug 23 16:55:46 2012 From: kenneth.lundin@REDACTED (Kenneth Lundin) Date: Thu, 23 Aug 2012 16:55:46 +0200 Subject: [erlang-patches] Add specific return for incomplete asn.1 packets In-Reply-To: References: Message-ID: Hi Jeremy, I have looked at your patch and we will not include it as it is now. My comments: The task to check whether a data packet in this case encoded as PER or BER is complete should be done on a higher level instead of cluttering all the code with these checks. I think that this is already done in most implementations of protocols. What else would you do? Take a chance and try to decode and try again if you get error, incomplete? I don't think so. I think it is always possible to check that you have got the whole PDU before starting to decode the data. Then the decoding routines can just assume that you have all the data. I am not even sure that it is possible to determine in all places if a badmatch is because of incomplete data or faulty data. Another note is that the module asn1rt_ber_bin will soon be obsoleted and asn1rt_ber_bin_v2 will be the default. In that module it is possible to do a generic check for incomplete, and there are also NIF's involved which can get out of data and should the return incomplete. But you could not know that asn1rt_ber_bin will be obsoleted soon. Even if I am not convinced of the need of this check I might accept it if it has no negative impact on performance and does not increase the size of runtime modules and generated code significantly, and if it really is safe to tell that it failed because of incomplete data. /Regards Kenneth, Erlang/OTP Ericsson On Tue, Jul 24, 2012 at 5:15 PM, Jeremy Heater < jeremy.heater@REDACTED> wrote: > Hello all, > > We had already broached the subject a few years back (cf. > http://erlang.org/pipermail/erlang-patches/2009-December/000627.html) and > we modified our approach to take the comments made at the time into > account. Here follows a description of the changes: > > This patch's goal is to allow the user to determine if an incoming > asn.1 packet is incomplete. > To that end, the decode/2 functions of generated asn.1 files were > modified so as to return {error, incomplete} when the packet to be > decoded is incomplete instead of the generic > {error, {asn1, {badmatch, _}}} (or badarg) which is not distinguishable > from other errors. > > This would seem to us to be a necessary feature so as to be able to > determine if a packet received from a socket is complete (since overly > large messages are split). > It is also complementary to the undec_rest option where when decode/2 > is called on a packet containing more than one message, the function > returns the first message decoded and the rest of the packet > undecoded. > > The solution was implemented for all encoding rules, even though BER > encoding allows for simpler checking by manually parsing the first > bytes of the packet, for the sake of having a consistent API whatever > the encoding. > > The proposed patch can be found at: > git fetch git://github.com/Kwisatx/otp.git incomplete_packet_asn1 > > https://github.com/Kwisatx/otp/compare/master...incomplete_packet_asn1 > > https://github.com/Kwisatx/otp/compare/master...incomplete_packet_asn1.patch > > > Since the added tests inevitably add some overhead, we also tried to > link the changes to the undec_rest option > (incomplete_packet_asn1_duplicate_files branch), but since most of the > changes are in the runtime, it made duplicating the code necessary (as > the name of the branch suggests), which complicates the code. > > What are your thoughts on this change? Any ideas for how to improve it? > > Best regards, > > Jeremy Heater. > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches > -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincent.dephily@REDACTED Thu Aug 23 19:18:27 2012 From: vincent.dephily@REDACTED (Vincent de Phily) Date: Thu, 23 Aug 2012 19:18:27 +0200 Subject: [erlang-patches] Add specific return for incomplete asn.1 packets In-Reply-To: References: Message-ID: <1357694.7Q0FQYjFum@moltowork> Hi Kenneth On Thursday 23 August 2012 16:55:46 Kenneth Lundin wrote: > The task to check whether a data packet in this case encoded as PER or BER > is complete should be done on a higher level instead of > cluttering all the code with these checks. I think that this is already > done in most implementations of protocols. What else would you do? Take a > chance and > try to decode and try again if you get error, incomplete? I don't think so. > > I think it is always possible to check that you have got the whole PDU > before starting to decode the data. Then the decoding routines can just > assume > that you have all the data. That's a very reasonable assumption, and I a sure that it is the correct one in most cases. But not in our case (call us special :p). * Firstly, the protocol is already fully spec'ed and implemented (erlang and embedded C), and delivered on thousands of devices (soon increasing by an orders of magnitude or two). So there is no changing the protocol now by adding a byte size before every asn1 packet. * The reason why this protocol doesn't encapsulate asn1 packets is (appart from aestetics) a simple one of mobile data consumption scroogery. A large percentage of the packets are fairly small (2-10 bytes), and when you stuff many of those inside one tcp or udp packet, the overhead becomes important. You don't want to declare the size for multiple packets either, because that would delay treating the 5-bytes payload when there is a 2Mb payload right behind it. * Another hint that using the asn1 library to determine the size of the packet is a reasonable thing to do is that the functionality exists already in the form of the undec_rest option. If you know the size of your packet ahead of time, this option is of limited use. So much for the "this functionality is usefull" argument. > I am not even sure that it is possible to determine in all places if a > badmatch is because of incomplete data or faulty data. We've done our best to catch all cases, anything we've missed is a bug. There's no point in worring about the "faulty data mistakenly interpreted as incomplete data" case because as soon as you've let faulty data in, you've got a bigger problem on your hands than an "incomplete packet" false-positive. > Another note is that the module asn1rt_ber_bin will soon be obsoleted and > asn1rt_ber_bin_v2 will be the default. In that module it is possible to do > a generic check > for incomplete, and there are also NIF's involved which can get out of data > and should the return incomplete. > But you could not know that asn1rt_ber_bin will be obsoleted soon. Good to hear, the many code paths of the current lib is a maintenace burden. We'll be happy to adapt our patch to a leaner codebase, even if there are NIFs involved :) > Even if I am not convinced of the need of this check I might accept it if > it has no negative impact on performance and does not increase the size of > runtime modules and generated code significantly, and if it really is safe > to tell that it failed because of incomplete data. Thanks :) And I completely agree with the requirements. Cheers. -- Vincent de Phily Mobile Devices +33 (0) 142 119 325 +353 (0) 85 710 6320 Warning This message (and any associated files) is intended only for the use of its intended recipient and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not the intended recipient you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. Any views or opinions presented are solely those of the author vincent.dephily@REDACTED and do not necessarily represent those of the company. Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments. From n.oxyde@REDACTED Fri Aug 24 12:22:49 2012 From: n.oxyde@REDACTED (Anthony Ramine) Date: Fri, 24 Aug 2012 12:22:49 +0200 Subject: [erlang-patches] Print column numbers when compiling In-Reply-To: <5034FB10.7090804@erlang.org> References: <610BC6F9-18BF-46A2-B487-492A9B41E42A@gmail.com> <4FCE3186.3000202@erlang.org> <5034FB10.7090804@erlang.org> Message-ID: Most OTP (at least erl_lint, erl_parse and syntax_tools) already knows that locations can be a line or a line and a column; furthermore it is said in erl_parse itself that one should always use get_line/1 and set_line/3 instead of depending on having an integer there. If it is really that heavy of a change, why do we have erl_scan:set_attribute/3 and erl_scan:attributes_info/{1,2}? They obviously were coded to mitigate these issues. Can't this option be included as part of an experimental feature and bugs be fixed as they emerge? It's not like it is mandatory to use it, nor like there is not already experimental and dubious code in OTP (parameterized modules I'm looking at you). Any parse transform that break because of this change will break because it does AST manipulation wrong and their users will just have to not use the "column" option for it to continue to work. I'm not deterred at all from getting this patch into OTP and I would like to know exactly which tests should I update to make you guys happy. Regards, -- Anthony Ramine Le 22 ao?t 2012 ? 17:30, Lukas Larsson a ?crit : > Hi, > > We have now looked at this patch and there are a couple of issues remaining which have to be solved. > > The patch changes the representation of the abstract format which has a couple of implications: > > * Any parse transform which uses the line number position might brake when this new option (this could include OTP parse transforms) > * Any tool which depend on having an integer as the line number position will break (syntax tools might be one such tool) > > In order to mitigate this backwards incompatibility, we suggest making the line/column number an opaque datatype which is only accessible via an api and update the documentation to reflect this. > > In addition all of the different warnings/errors in erl_lint and friends have to be checked with the new column number so that they point to the correct position. > > Also the erl_lint, epp and any other suite which deal with error messages/warnings have to be updated to run tests with and without this option. > > I'm sure that I've forgotten some things which have to be done. This is a major change and will take some time to get correct. > > I hope I have not deterred you from getting this patch into the Erlang/OTP. If you have any questions about anything I will do what I can to help you. > > Lukas > > On 10/06/12 13:24, nox wrote: >> I added a commit to correctly order locations in compile:messages_per_file/1 >> which didn't take into account column numbers. >> >> git fetch https://github.com/nox/otp.git compile-column-numbers >> >> >> The following changes since commit 9bbda97f63ba4ee7cd58c266ee69af1059352189: >> >> Merge branch 'raimo/tools/remove-fprof-tuple-funs/OTP-10091' into >> maint (2012-05-23 16:15:58 +0200) >> >> are available in the git repository at: >> >> >> https://github.com/nox/otp.git compile-column-numbers >> >> for you to fetch changes up to d932ad582676f1593d917f222b1d8dec71fe88b3: >> >> Fix messages ordering with column numbers (2012-06-10 13:01:50 +0200) >> >> ---------------------------------------------------------------- >> Anthony Ramine (7): >> Export type erl_scan:location/0 >> Allow setting of initial position in epp >> Create a new "column" option in compile >> Fix printing of errors with column numbers >> Test column number reporting in error_SUITE >> Fix type compile:err_info/0 >> Fix messages ordering with column numbers >> >> lib/compiler/doc/src/compile.xml | 5 +++++ >> lib/compiler/src/compile.erl | 25 +++++++++++++++++---- >> lib/compiler/test/error_SUITE.erl | 15 +++++++++++-- >> lib/stdlib/doc/src/epp.xml | 2 ++ >> lib/stdlib/src/epp.erl | 44 +++++++++++++++++++++++++++++-------- >> lib/stdlib/src/erl_scan.erl | 2 +- >> 6 files changed, 77 insertions(+), 16 deletions(-) >> >> -- >> Anthony Ramine >> _______________________________________________ >> erlang-patches mailing list >> erlang-patches@REDACTED >> http://erlang.org/mailman/listinfo/erlang-patches >> > From n.oxyde@REDACTED Fri Aug 24 12:32:23 2012 From: n.oxyde@REDACTED (Anthony Ramine) Date: Fri, 24 Aug 2012 12:32:23 +0200 Subject: [erlang-patches] Print column numbers when compiling In-Reply-To: References: <610BC6F9-18BF-46A2-B487-492A9B41E42A@gmail.com> <4FCE3186.3000202@erlang.org> <5034FB10.7090804@erlang.org> Message-ID: Errata: get_line/1 doesn't exist, I'm talking about get_attribute/2, sorry. -- Anthony Ramine Le 24 ao?t 2012 ? 12:22, Anthony Ramine a ?crit : > Most OTP (at least erl_lint, erl_parse and syntax_tools) already knows that locations can be a line or a line and a column; furthermore it is said in erl_parse itself that one should always use get_line/1 and set_line/3 instead of depending on having an integer there. > > If it is really that heavy of a change, why do we have erl_scan:set_attribute/3 and erl_scan:attributes_info/{1,2}? They obviously were coded to mitigate these issues. > > Can't this option be included as part of an experimental feature and bugs be fixed as they emerge? It's not like it is mandatory to use it, nor like there is not already experimental and dubious code in OTP (parameterized modules I'm looking at you). > > Any parse transform that break because of this change will break because it does AST manipulation wrong and their users will just have to not use the "column" option for it to continue to work. > > I'm not deterred at all from getting this patch into OTP and I would like to know exactly which tests should I update to make you guys happy. > > Regards, > > -- > Anthony Ramine > > Le 22 ao?t 2012 ? 17:30, Lukas Larsson a ?crit : > >> Hi, >> >> We have now looked at this patch and there are a couple of issues remaining which have to be solved. >> >> The patch changes the representation of the abstract format which has a couple of implications: >> >> * Any parse transform which uses the line number position might brake when this new option (this could include OTP parse transforms) >> * Any tool which depend on having an integer as the line number position will break (syntax tools might be one such tool) >> >> In order to mitigate this backwards incompatibility, we suggest making the line/column number an opaque datatype which is only accessible via an api and update the documentation to reflect this. >> >> In addition all of the different warnings/errors in erl_lint and friends have to be checked with the new column number so that they point to the correct position. >> >> Also the erl_lint, epp and any other suite which deal with error messages/warnings have to be updated to run tests with and without this option. >> >> I'm sure that I've forgotten some things which have to be done. This is a major change and will take some time to get correct. >> >> I hope I have not deterred you from getting this patch into the Erlang/OTP. If you have any questions about anything I will do what I can to help you. >> >> Lukas >> >> On 10/06/12 13:24, nox wrote: >>> I added a commit to correctly order locations in compile:messages_per_file/1 >>> which didn't take into account column numbers. >>> >>> git fetch https://github.com/nox/otp.git compile-column-numbers >>> >>> >>> The following changes since commit 9bbda97f63ba4ee7cd58c266ee69af1059352189: >>> >>> Merge branch 'raimo/tools/remove-fprof-tuple-funs/OTP-10091' into >>> maint (2012-05-23 16:15:58 +0200) >>> >>> are available in the git repository at: >>> >>> >>> https://github.com/nox/otp.git compile-column-numbers >>> >>> for you to fetch changes up to d932ad582676f1593d917f222b1d8dec71fe88b3: >>> >>> Fix messages ordering with column numbers (2012-06-10 13:01:50 +0200) >>> >>> ---------------------------------------------------------------- >>> Anthony Ramine (7): >>> Export type erl_scan:location/0 >>> Allow setting of initial position in epp >>> Create a new "column" option in compile >>> Fix printing of errors with column numbers >>> Test column number reporting in error_SUITE >>> Fix type compile:err_info/0 >>> Fix messages ordering with column numbers >>> >>> lib/compiler/doc/src/compile.xml | 5 +++++ >>> lib/compiler/src/compile.erl | 25 +++++++++++++++++---- >>> lib/compiler/test/error_SUITE.erl | 15 +++++++++++-- >>> lib/stdlib/doc/src/epp.xml | 2 ++ >>> lib/stdlib/src/epp.erl | 44 +++++++++++++++++++++++++++++-------- >>> lib/stdlib/src/erl_scan.erl | 2 +- >>> 6 files changed, 77 insertions(+), 16 deletions(-) >>> >>> -- >>> Anthony Ramine >>> _______________________________________________ >>> erlang-patches mailing list >>> erlang-patches@REDACTED >>> http://erlang.org/mailman/listinfo/erlang-patches >>> >> > From kostis@REDACTED Fri Aug 24 17:12:22 2012 From: kostis@REDACTED (Kostis Sagonas) Date: Fri, 24 Aug 2012 17:12:22 +0200 Subject: [erlang-patches] Dialyzer fixes Message-ID: <503799D6.6020804@cs.ntua.gr> The following branch corrects a concurrency error (forgetting to stop a server process when the parallel analysis of dialyzer terminates) and corrects some unmatched return errors identified by running dialyzer on its code base. Please include in the upcoming release. git fetch git://github.com/kostis/otp.git dialyzer-R15B02-final-fixes Kostis From kostis@REDACTED Fri Aug 24 17:17:17 2012 From: kostis@REDACTED (Kostis Sagonas) Date: Fri, 24 Aug 2012 17:17:17 +0200 Subject: [erlang-patches] HiPE fixes Message-ID: <50379AFD.9010108@cs.ntua.gr> A set of small fixes for the HiPE application -- mostly correcting some types and doing minor cleanups. Please include. git fetch git://github.com/kostis/otp.git hipe-R15B02-fixes Kostis From fredrik@REDACTED Fri Aug 24 18:02:10 2012 From: fredrik@REDACTED (Fredrik) Date: Fri, 24 Aug 2012 18:02:10 +0200 Subject: [erlang-patches] HiPE fixes In-Reply-To: <50379AFD.9010108@cs.ntua.gr> References: <50379AFD.9010108@cs.ntua.gr> Message-ID: <5037A582.90808@erlang.org> Hello Kostis, I have included your patch in the 'pu' branch. Thank you for the contribution BR Fredrik Erlang OTP Team On 08/24/2012 05:17 PM, Kostis Sagonas wrote: > A set of small fixes for the HiPE application -- mostly correcting > some types and doing minor cleanups. Please include. > > git fetch git://github.com/kostis/otp.git hipe-R15B02-fixes > > Kostis > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches From n.oxyde@REDACTED Sat Aug 25 11:55:19 2012 From: n.oxyde@REDACTED (Anthony Ramine) Date: Sat, 25 Aug 2012 11:55:19 +0200 Subject: [erlang-patches] Print column numbers when compiling In-Reply-To: References: <610BC6F9-18BF-46A2-B487-492A9B41E42A@gmail.com> <4FCE3186.3000202@erlang.org> <5034FB10.7090804@erlang.org> Message-ID: <1D197A70-FE94-45D6-A986-6F2AF221D717@gmail.com> I've rewritten erl_lint_SUITE to handle column line numbers, doing so I found a bug in the handling of disallowed_nowarn_bif_clash which I fixed by creating a new "file" token attribute in erl_scan. Errors illegal_bin_pattern and unsized_binary_not_at_end column numbers could be improved. Test format_warn for error format_error hasn't been rewritten yet. Please refetch my branch. git fetch https://github.com/nox/otp.git compile-column-numbers https://github.com/nox/otp/tree/compile-column-numbers https://github.com/nox/otp/compare/9bbda97f63ba4ee7cd58c266ee69af1059352189...compile-column-numbers The following changes since commit 9bbda97f63ba4ee7cd58c266ee69af1059352189: Merge branch 'raimo/tools/remove-fprof-tuple-funs/OTP-10091' into maint (2012-05-23 16:15:58 +0200) are available in the git repository at: https://github.com/nox/otp.git compile-column-numbers for you to fetch changes up to 9fc46876d9e963e39d5743536a15c1f9ee97fd64: Rewrite the erl_lint_SUITE to handle column numbers (2012-08-25 11:42:36 +0200) ---------------------------------------------------------------- Anthony Ramine (9): Export type erl_scan:location/0 Allow setting of initial position in epp Create a new "column" option in compile Fix printing of errors with column numbers Test column number reporting in error_SUITE Fix type compile:err_info/0 Fix messages ordering with column numbers Create a new "file" token attribute in erl_scan Rewrite the erl_lint_SUITE to handle column numbers lib/compiler/doc/src/compile.xml | 5 + lib/compiler/src/compile.erl | 25 +- lib/compiler/test/error_SUITE.erl | 15 +- lib/stdlib/doc/src/epp.xml | 2 + lib/stdlib/src/epp.erl | 44 +- lib/stdlib/src/erl_lint.erl | 27 +- lib/stdlib/src/erl_scan.erl | 48 +- lib/stdlib/test/erl_lint_SUITE.erl | 4028 +++++++++++++++++++----------------- 8 files changed, 2250 insertions(+), 1944 deletions(-) -- Anthony Ramine Le 24 ao?t 2012 ? 12:32, Anthony Ramine a ?crit : > Errata: get_line/1 doesn't exist, I'm talking about get_attribute/2, sorry. > > -- > Anthony Ramine > > Le 24 ao?t 2012 ? 12:22, Anthony Ramine a ?crit : > >> Most OTP (at least erl_lint, erl_parse and syntax_tools) already knows that locations can be a line or a line and a column; furthermore it is said in erl_parse itself that one should always use get_line/1 and set_line/3 instead of depending on having an integer there. >> >> If it is really that heavy of a change, why do we have erl_scan:set_attribute/3 and erl_scan:attributes_info/{1,2}? They obviously were coded to mitigate these issues. >> >> Can't this option be included as part of an experimental feature and bugs be fixed as they emerge? It's not like it is mandatory to use it, nor like there is not already experimental and dubious code in OTP (parameterized modules I'm looking at you). >> >> Any parse transform that break because of this change will break because it does AST manipulation wrong and their users will just have to not use the "column" option for it to continue to work. >> >> I'm not deterred at all from getting this patch into OTP and I would like to know exactly which tests should I update to make you guys happy. >> >> Regards, >> >> -- >> Anthony Ramine >> >> Le 22 ao?t 2012 ? 17:30, Lukas Larsson a ?crit : >> >>> Hi, >>> >>> We have now looked at this patch and there are a couple of issues remaining which have to be solved. >>> >>> The patch changes the representation of the abstract format which has a couple of implications: >>> >>> * Any parse transform which uses the line number position might brake when this new option (this could include OTP parse transforms) >>> * Any tool which depend on having an integer as the line number position will break (syntax tools might be one such tool) >>> >>> In order to mitigate this backwards incompatibility, we suggest making the line/column number an opaque datatype which is only accessible via an api and update the documentation to reflect this. >>> >>> In addition all of the different warnings/errors in erl_lint and friends have to be checked with the new column number so that they point to the correct position. >>> >>> Also the erl_lint, epp and any other suite which deal with error messages/warnings have to be updated to run tests with and without this option. >>> >>> I'm sure that I've forgotten some things which have to be done. This is a major change and will take some time to get correct. >>> >>> I hope I have not deterred you from getting this patch into the Erlang/OTP. If you have any questions about anything I will do what I can to help you. >>> >>> Lukas >>> >>> On 10/06/12 13:24, nox wrote: >>>> I added a commit to correctly order locations in compile:messages_per_file/1 >>>> which didn't take into account column numbers. >>>> >>>> git fetch https://github.com/nox/otp.git compile-column-numbers >>>> >>>> >>>> The following changes since commit 9bbda97f63ba4ee7cd58c266ee69af1059352189: >>>> >>>> Merge branch 'raimo/tools/remove-fprof-tuple-funs/OTP-10091' into >>>> maint (2012-05-23 16:15:58 +0200) >>>> >>>> are available in the git repository at: >>>> >>>> >>>> https://github.com/nox/otp.git compile-column-numbers >>>> >>>> for you to fetch changes up to d932ad582676f1593d917f222b1d8dec71fe88b3: >>>> >>>> Fix messages ordering with column numbers (2012-06-10 13:01:50 +0200) >>>> >>>> ---------------------------------------------------------------- >>>> Anthony Ramine (7): >>>> Export type erl_scan:location/0 >>>> Allow setting of initial position in epp >>>> Create a new "column" option in compile >>>> Fix printing of errors with column numbers >>>> Test column number reporting in error_SUITE >>>> Fix type compile:err_info/0 >>>> Fix messages ordering with column numbers >>>> >>>> lib/compiler/doc/src/compile.xml | 5 +++++ >>>> lib/compiler/src/compile.erl | 25 +++++++++++++++++---- >>>> lib/compiler/test/error_SUITE.erl | 15 +++++++++++-- >>>> lib/stdlib/doc/src/epp.xml | 2 ++ >>>> lib/stdlib/src/epp.erl | 44 +++++++++++++++++++++++++++++-------- >>>> lib/stdlib/src/erl_scan.erl | 2 +- >>>> 6 files changed, 77 insertions(+), 16 deletions(-) >>>> >>>> -- >>>> Anthony Ramine >>>> _______________________________________________ >>>> erlang-patches mailing list >>>> erlang-patches@REDACTED >>>> http://erlang.org/mailman/listinfo/erlang-patches >>>> >>> >> > From fredrik@REDACTED Mon Aug 27 14:23:05 2012 From: fredrik@REDACTED (Fredrik) Date: Mon, 27 Aug 2012 14:23:05 +0200 Subject: [erlang-patches] Fwd: Silent start of wx In-Reply-To: <503B6529.2030708@erlang.org> References: <503B6529.2030708@erlang.org> Message-ID: <503B66A9.3040706@erlang.org> Hello H?kan, This patch fails testcases on windows: === Ended at 2012-08-27 05:39:08 === location {wx_basic_SUITE,silent_start} === reason = bad argument: foo in function wx:new/1 (wx.erl, line 114) in call from wx_basic_SUITE:'-silent_start/1-fun-4-'/0 (wx_basic_SUITE.erl, line 80) in call from test_server:ts_tc/3 (test_server.erl, line 1874) in call from test_server:run_test_case_eval1/6 (test_server.erl, line 1404) in call from test_server:run_test_case_eval/9 (test_server.erl, line 1342) Please fix this and mail us back, and we will re-fetch. BR Fredrik Gustafsson Erlang OTP Team On 08/27/2012 02:16 PM, Henrik Nord wrote: > > > > -------- Original Message -------- > Subject: [erlang-patches] Silent start of wx > Date: Wed, 13 Jun 2012 09:08:14 +0200 > From: H?kan Mattsson > To: Erlang patches > > > > I have added a new option to wx:new/1 in order to make it > possible to suppress printouts in case of errors at startup. > With wx:new([{silent_start,true}]) it is possible to silently > test if wx works and otherwise communicate with the user > by other means. > > The new feature can be fetched here > > git fetch git://github.com/hawk/otp.git > wx_silent_start > > or viewed here > > https://github.com/hawk/otp/compare/wx_silent_start > https://github.com/hawk/otp/compare/wx_silent_start.patch > > /H?kan > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan.zegenhagen@REDACTED Mon Aug 27 15:04:29 2012 From: stefan.zegenhagen@REDACTED (Stefan Zegenhagen) Date: Mon, 27 Aug 2012 15:04:29 +0200 Subject: [erlang-patches] SNMP bugfix to usmUserTable In-Reply-To: <50362825.1080902@erlang.org> References: <1343728392.29035.10.camel@ax-sze> <50362825.1080902@erlang.org> Message-ID: <1346072669.3122.5.camel@ax-sze> Dear Lukas, > In the attached patch there are calls to lists:keydelete/2. They > should be to lists:keydelete/3. Thank you very much for your report. I just noticed that the problem is solved on maint (by Micael Karlberg) -- does that mean I don't need to send an updated patch? Kind regards, -- Dr. Stefan Zegenhagen arcutronix GmbH Garbsener Landstr. 10 30419 Hannover Germany Tel: +49 511 277-2734 Fax: +49 511 277-2709 Email: stefan.zegenhagen@REDACTED Web: www.arcutronix.com *Synchronize the Ethernet* General Managers: Dipl. Ing. Juergen Schroeder, Dr. Josef Gfrerer - Legal Form: GmbH, Registered office: Hannover, HRB 202442, Amtsgericht Hannover; Ust-Id: DE257551767. Please consider the environment before printing this message. From henrik@REDACTED Mon Aug 27 15:11:29 2012 From: henrik@REDACTED (Henrik Nord) Date: Mon, 27 Aug 2012 15:11:29 +0200 Subject: [erlang-patches] SNMP bugfix to usmUserTable In-Reply-To: <1346072669.3122.5.camel@ax-sze> References: <1343728392.29035.10.camel@ax-sze> <50362825.1080902@erlang.org> <1346072669.3122.5.camel@ax-sze> Message-ID: <503B7201.2080108@erlang.org> Yes, If it is maint already then it is fixed. so you will not have to update it. Thank you for your consideration /Henrik On 08/27/2012 03:04 PM, Stefan Zegenhagen wrote: > Dear Lukas, > >> In the attached patch there are calls to lists:keydelete/2. They >> should be to lists:keydelete/3. > Thank you very much for your report. > > I just noticed that the problem is solved on maint (by Micael Karlberg) > -- does that mean I don't need to send an updated patch? > > > Kind regards, > -- /Henrik Nord Erlang/OTP From hm@REDACTED Mon Aug 27 16:11:17 2012 From: hm@REDACTED (=?ISO-8859-1?Q?H=E5kan_Mattsson?=) Date: Mon, 27 Aug 2012 16:11:17 +0200 Subject: [erlang-patches] Fwd: Silent start of wx In-Reply-To: <503B66A9.3040706@erlang.org> References: <503B6529.2030708@erlang.org> <503B66A9.3040706@erlang.org> Message-ID: Now it works for me. Please re-fetch. /H?kan On Mon, Aug 27, 2012 at 2:23 PM, Fredrik wrote: > Hello H?kan, > This patch fails testcases on windows: > > === Ended at 2012-08-27 05:39:08 > === location {wx_basic_SUITE,silent_start} > === reason = bad argument: foo > in function wx:new/1 (wx.erl, line 114) > in call from wx_basic_SUITE:'-silent_start/1-fun-4-'/0 (wx_basic_SUITE.erl, line 80) > in call from test_server:ts_tc/3 (test_server.erl, line 1874) > in call from test_server:run_test_case_eval1/6 (test_server.erl, line 1404) > in call from test_server:run_test_case_eval/9 (test_server.erl, line 1342) > > Please fix this and mail us back, and we will re-fetch. > > BR Fredrik Gustafsson > Erlang OTP Team > On 08/27/2012 02:16 PM, Henrik Nord wrote: > > > > > -------- Original Message -------- Subject: [erlang-patches] Silent > start of wx Date: Wed, 13 Jun 2012 09:08:14 +0200 From: H?kan Mattsson > To: Erlang patches > > > I have added a new option to wx:new/1 in order to make it > possible to suppress printouts in case of errors at startup. > With wx:new([{silent_start,true}]) it is possible to silently > test if wx works and otherwise communicate with the user > by other means. > > The new feature can be fetched here > > git fetch git://github.com/hawk/otp.git wx_silent_start > > or viewed here > > https://github.com/hawk/otp/compare/wx_silent_start > https://github.com/hawk/otp/compare/wx_silent_start.patch > > /H?kan > > > > > > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From henrik@REDACTED Mon Aug 27 16:58:17 2012 From: henrik@REDACTED (Henrik Nord) Date: Mon, 27 Aug 2012 16:58:17 +0200 Subject: [erlang-patches] Fwd: Silent start of wx In-Reply-To: References: <503B6529.2030708@erlang.org> <503B66A9.3040706@erlang.org> Message-ID: <503B8B09.7040702@erlang.org> You have made a git blooper I think. There is something strange about that branch now. You better take a look at that before I refetch it tomorrow. /Henrik On 08/27/2012 04:11 PM, H?kan Mattsson wrote: > Now it works for me. Please re-fetch. > > /H?kan > > On Mon, Aug 27, 2012 at 2:23 PM, Fredrik > wrote: > > Hello H?kan, > This patch fails testcases on windows: > > === Ended at 2012-08-27 05:39:08 > === location {wx_basic_SUITE,silent_start} > === reason = bad argument: foo > in function wx:new/1 (wx.erl, line 114) > in call from wx_basic_SUITE:'-silent_start/1-fun-4-'/0 (wx_basic_SUITE.erl, line 80) > in call from test_server:ts_tc/3 (test_server.erl, line 1874) > in call from test_server:run_test_case_eval1/6 (test_server.erl, line 1404) > in call from test_server:run_test_case_eval/9 (test_server.erl, line 1342) > > Please fix this and mail us back, and we will re-fetch. > > BR Fredrik Gustafsson > Erlang OTP Team > On 08/27/2012 02:16 PM, Henrik Nord wrote: >> >> >> >> -------- Original Message -------- >> Subject: [erlang-patches] Silent start of wx >> Date: Wed, 13 Jun 2012 09:08:14 +0200 >> From: H?kan Mattsson >> To: Erlang patches >> >> >> >> >> I have added a new option to wx:new/1 in order to make it >> possible to suppress printouts in case of errors at startup. >> With wx:new([{silent_start,true}]) it is possible to silently >> test if wx works and otherwise communicate with the user >> by other means. >> >> The new feature can be fetched here >> >> git fetch git://github.com/hawk/otp.git >> wx_silent_start >> >> or viewed here >> >> https://github.com/hawk/otp/compare/wx_silent_start >> https://github.com/hawk/otp/compare/wx_silent_start.patch >> >> /H?kan >> >> >> >> > > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches > > -- /Henrik Nord Erlang/OTP -------------- next part -------------- An HTML attachment was scrubbed... URL: From n.oxyde@REDACTED Mon Aug 27 19:12:13 2012 From: n.oxyde@REDACTED (Anthony Ramine) Date: Mon, 27 Aug 2012 19:12:13 +0200 Subject: [erlang-patches] Print column numbers when compiling In-Reply-To: <1D197A70-FE94-45D6-A986-6F2AF221D717@gmail.com> References: <610BC6F9-18BF-46A2-B487-492A9B41E42A@gmail.com> <4FCE3186.3000202@erlang.org> <5034FB10.7090804@erlang.org> <1D197A70-FE94-45D6-A986-6F2AF221D717@gmail.com> Message-ID: Hi, Please refetch my branch again, it now includes commits that patch the following test suites: * erl_lint * qlc * erl_scan * ms_transform Regards, -- Anthony Ramine Le 25 ao?t 2012 ? 11:55, Anthony Ramine a ?crit : > I've rewritten erl_lint_SUITE to handle column line numbers, doing so > I found a bug in the handling of disallowed_nowarn_bif_clash which I fixed > by creating a new "file" token attribute in erl_scan. > > Errors illegal_bin_pattern and unsized_binary_not_at_end column numbers > could be improved. > > Test format_warn for error format_error hasn't been rewritten yet. > > Please refetch my branch. > > git fetch https://github.com/nox/otp.git compile-column-numbers > https://github.com/nox/otp/tree/compile-column-numbers > https://github.com/nox/otp/compare/9bbda97f63ba4ee7cd58c266ee69af1059352189...compile-column-numbers > > The following changes since commit 9bbda97f63ba4ee7cd58c266ee69af1059352189: > > Merge branch 'raimo/tools/remove-fprof-tuple-funs/OTP-10091' into maint (2012-05-23 16:15:58 +0200) > > are available in the git repository at: > > > https://github.com/nox/otp.git compile-column-numbers > > for you to fetch changes up to 9fc46876d9e963e39d5743536a15c1f9ee97fd64: > > Rewrite the erl_lint_SUITE to handle column numbers (2012-08-25 11:42:36 +0200) > > ---------------------------------------------------------------- > Anthony Ramine (9): > Export type erl_scan:location/0 > Allow setting of initial position in epp > Create a new "column" option in compile > Fix printing of errors with column numbers > Test column number reporting in error_SUITE > Fix type compile:err_info/0 > Fix messages ordering with column numbers > Create a new "file" token attribute in erl_scan > Rewrite the erl_lint_SUITE to handle column numbers > > lib/compiler/doc/src/compile.xml | 5 + > lib/compiler/src/compile.erl | 25 +- > lib/compiler/test/error_SUITE.erl | 15 +- > lib/stdlib/doc/src/epp.xml | 2 + > lib/stdlib/src/epp.erl | 44 +- > lib/stdlib/src/erl_lint.erl | 27 +- > lib/stdlib/src/erl_scan.erl | 48 +- > lib/stdlib/test/erl_lint_SUITE.erl | 4028 +++++++++++++++++++----------------- > 8 files changed, 2250 insertions(+), 1944 deletions(-) > > -- > Anthony Ramine > > > > > Le 24 ao?t 2012 ? 12:32, Anthony Ramine a ?crit : > >> Errata: get_line/1 doesn't exist, I'm talking about get_attribute/2, sorry. >> >> -- >> Anthony Ramine >> >> Le 24 ao?t 2012 ? 12:22, Anthony Ramine a ?crit : >> >>> Most OTP (at least erl_lint, erl_parse and syntax_tools) already knows that locations can be a line or a line and a column; furthermore it is said in erl_parse itself that one should always use get_line/1 and set_line/3 instead of depending on having an integer there. >>> >>> If it is really that heavy of a change, why do we have erl_scan:set_attribute/3 and erl_scan:attributes_info/{1,2}? They obviously were coded to mitigate these issues. >>> >>> Can't this option be included as part of an experimental feature and bugs be fixed as they emerge? It's not like it is mandatory to use it, nor like there is not already experimental and dubious code in OTP (parameterized modules I'm looking at you). >>> >>> Any parse transform that break because of this change will break because it does AST manipulation wrong and their users will just have to not use the "column" option for it to continue to work. >>> >>> I'm not deterred at all from getting this patch into OTP and I would like to know exactly which tests should I update to make you guys happy. >>> >>> Regards, >>> >>> -- >>> Anthony Ramine >>> >>> Le 22 ao?t 2012 ? 17:30, Lukas Larsson a ?crit : >>> >>>> Hi, >>>> >>>> We have now looked at this patch and there are a couple of issues remaining which have to be solved. >>>> >>>> The patch changes the representation of the abstract format which has a couple of implications: >>>> >>>> * Any parse transform which uses the line number position might brake when this new option (this could include OTP parse transforms) >>>> * Any tool which depend on having an integer as the line number position will break (syntax tools might be one such tool) >>>> >>>> In order to mitigate this backwards incompatibility, we suggest making the line/column number an opaque datatype which is only accessible via an api and update the documentation to reflect this. >>>> >>>> In addition all of the different warnings/errors in erl_lint and friends have to be checked with the new column number so that they point to the correct position. >>>> >>>> Also the erl_lint, epp and any other suite which deal with error messages/warnings have to be updated to run tests with and without this option. >>>> >>>> I'm sure that I've forgotten some things which have to be done. This is a major change and will take some time to get correct. >>>> >>>> I hope I have not deterred you from getting this patch into the Erlang/OTP. If you have any questions about anything I will do what I can to help you. >>>> >>>> Lukas >>>> >>>> On 10/06/12 13:24, nox wrote: >>>>> I added a commit to correctly order locations in compile:messages_per_file/1 >>>>> which didn't take into account column numbers. >>>>> >>>>> git fetch https://github.com/nox/otp.git compile-column-numbers >>>>> >>>>> >>>>> The following changes since commit 9bbda97f63ba4ee7cd58c266ee69af1059352189: >>>>> >>>>> Merge branch 'raimo/tools/remove-fprof-tuple-funs/OTP-10091' into >>>>> maint (2012-05-23 16:15:58 +0200) >>>>> >>>>> are available in the git repository at: >>>>> >>>>> >>>>> https://github.com/nox/otp.git compile-column-numbers >>>>> >>>>> for you to fetch changes up to d932ad582676f1593d917f222b1d8dec71fe88b3: >>>>> >>>>> Fix messages ordering with column numbers (2012-06-10 13:01:50 +0200) >>>>> >>>>> ---------------------------------------------------------------- >>>>> Anthony Ramine (7): >>>>> Export type erl_scan:location/0 >>>>> Allow setting of initial position in epp >>>>> Create a new "column" option in compile >>>>> Fix printing of errors with column numbers >>>>> Test column number reporting in error_SUITE >>>>> Fix type compile:err_info/0 >>>>> Fix messages ordering with column numbers >>>>> >>>>> lib/compiler/doc/src/compile.xml | 5 +++++ >>>>> lib/compiler/src/compile.erl | 25 +++++++++++++++++---- >>>>> lib/compiler/test/error_SUITE.erl | 15 +++++++++++-- >>>>> lib/stdlib/doc/src/epp.xml | 2 ++ >>>>> lib/stdlib/src/epp.erl | 44 +++++++++++++++++++++++++++++-------- >>>>> lib/stdlib/src/erl_scan.erl | 2 +- >>>>> 6 files changed, 77 insertions(+), 16 deletions(-) >>>>> >>>>> -- >>>>> Anthony Ramine >>>>> _______________________________________________ >>>>> erlang-patches mailing list >>>>> erlang-patches@REDACTED >>>>> http://erlang.org/mailman/listinfo/erlang-patches >>>>> >>>> >>> >> > From henrik@REDACTED Tue Aug 28 09:10:48 2012 From: henrik@REDACTED (Henrik Nord) Date: Tue, 28 Aug 2012 09:10:48 +0200 Subject: [erlang-patches] Print column numbers when compiling In-Reply-To: References: <610BC6F9-18BF-46A2-B487-492A9B41E42A@gmail.com> <4FCE3186.3000202@erlang.org> <5034FB10.7090804@erlang.org> <1D197A70-FE94-45D6-A986-6F2AF221D717@gmail.com> Message-ID: <503C6EF8.7060608@erlang.org> I will refetch this and let it cook in 'pu' /Henrik On 08/27/2012 07:12 PM, Anthony Ramine wrote: > Hi, > > Please refetch my branch again, it now includes commits that patch the > following test suites: > > * erl_lint > * qlc > * erl_scan > * ms_transform > > Regards, > > -- > Anthony Ramine > > Le 25 ao?t 2012 ? 11:55, Anthony Ramine a ?crit : > >> I've rewritten erl_lint_SUITE to handle column line numbers, doing so >> I found a bug in the handling of disallowed_nowarn_bif_clash which I fixed >> by creating a new "file" token attribute in erl_scan. >> >> Errors illegal_bin_pattern and unsized_binary_not_at_end column numbers >> could be improved. >> >> Test format_warn for error format_error hasn't been rewritten yet. >> >> Please refetch my branch. >> >> git fetch https://github.com/nox/otp.git compile-column-numbers >> https://github.com/nox/otp/tree/compile-column-numbers >> https://github.com/nox/otp/compare/9bbda97f63ba4ee7cd58c266ee69af1059352189...compile-column-numbers >> >> The following changes since commit 9bbda97f63ba4ee7cd58c266ee69af1059352189: >> >> Merge branch 'raimo/tools/remove-fprof-tuple-funs/OTP-10091' into maint (2012-05-23 16:15:58 +0200) >> >> are available in the git repository at: >> >> >> https://github.com/nox/otp.git compile-column-numbers >> >> for you to fetch changes up to 9fc46876d9e963e39d5743536a15c1f9ee97fd64: >> >> Rewrite the erl_lint_SUITE to handle column numbers (2012-08-25 11:42:36 +0200) >> >> ---------------------------------------------------------------- >> Anthony Ramine (9): >> Export type erl_scan:location/0 >> Allow setting of initial position in epp >> Create a new "column" option in compile >> Fix printing of errors with column numbers >> Test column number reporting in error_SUITE >> Fix type compile:err_info/0 >> Fix messages ordering with column numbers >> Create a new "file" token attribute in erl_scan >> Rewrite the erl_lint_SUITE to handle column numbers >> >> lib/compiler/doc/src/compile.xml | 5 + >> lib/compiler/src/compile.erl | 25 +- >> lib/compiler/test/error_SUITE.erl | 15 +- >> lib/stdlib/doc/src/epp.xml | 2 + >> lib/stdlib/src/epp.erl | 44 +- >> lib/stdlib/src/erl_lint.erl | 27 +- >> lib/stdlib/src/erl_scan.erl | 48 +- >> lib/stdlib/test/erl_lint_SUITE.erl | 4028 +++++++++++++++++++----------------- >> 8 files changed, 2250 insertions(+), 1944 deletions(-) >> >> -- >> Anthony Ramine >> >> >> >> >> Le 24 ao?t 2012 ? 12:32, Anthony Ramine a ?crit : >> >>> Errata: get_line/1 doesn't exist, I'm talking about get_attribute/2, sorry. >>> >>> -- >>> Anthony Ramine >>> >>> Le 24 ao?t 2012 ? 12:22, Anthony Ramine a ?crit : >>> >>>> Most OTP (at least erl_lint, erl_parse and syntax_tools) already knows that locations can be a line or a line and a column; furthermore it is said in erl_parse itself that one should always use get_line/1 and set_line/3 instead of depending on having an integer there. >>>> >>>> If it is really that heavy of a change, why do we have erl_scan:set_attribute/3 and erl_scan:attributes_info/{1,2}? They obviously were coded to mitigate these issues. >>>> >>>> Can't this option be included as part of an experimental feature and bugs be fixed as they emerge? It's not like it is mandatory to use it, nor like there is not already experimental and dubious code in OTP (parameterized modules I'm looking at you). >>>> >>>> Any parse transform that break because of this change will break because it does AST manipulation wrong and their users will just have to not use the "column" option for it to continue to work. >>>> >>>> I'm not deterred at all from getting this patch into OTP and I would like to know exactly which tests should I update to make you guys happy. >>>> >>>> Regards, >>>> >>>> -- >>>> Anthony Ramine >>>> >>>> Le 22 ao?t 2012 ? 17:30, Lukas Larsson a ?crit : >>>> >>>>> Hi, >>>>> >>>>> We have now looked at this patch and there are a couple of issues remaining which have to be solved. >>>>> >>>>> The patch changes the representation of the abstract format which has a couple of implications: >>>>> >>>>> * Any parse transform which uses the line number position might brake when this new option (this could include OTP parse transforms) >>>>> * Any tool which depend on having an integer as the line number position will break (syntax tools might be one such tool) >>>>> >>>>> In order to mitigate this backwards incompatibility, we suggest making the line/column number an opaque datatype which is only accessible via an api and update the documentation to reflect this. >>>>> >>>>> In addition all of the different warnings/errors in erl_lint and friends have to be checked with the new column number so that they point to the correct position. >>>>> >>>>> Also the erl_lint, epp and any other suite which deal with error messages/warnings have to be updated to run tests with and without this option. >>>>> >>>>> I'm sure that I've forgotten some things which have to be done. This is a major change and will take some time to get correct. >>>>> >>>>> I hope I have not deterred you from getting this patch into the Erlang/OTP. If you have any questions about anything I will do what I can to help you. >>>>> >>>>> Lukas >>>>> >>>>> On 10/06/12 13:24, nox wrote: >>>>>> I added a commit to correctly order locations in compile:messages_per_file/1 >>>>>> which didn't take into account column numbers. >>>>>> >>>>>> git fetch https://github.com/nox/otp.git compile-column-numbers >>>>>> >>>>>> >>>>>> The following changes since commit 9bbda97f63ba4ee7cd58c266ee69af1059352189: >>>>>> >>>>>> Merge branch 'raimo/tools/remove-fprof-tuple-funs/OTP-10091' into >>>>>> maint (2012-05-23 16:15:58 +0200) >>>>>> >>>>>> are available in the git repository at: >>>>>> >>>>>> >>>>>> https://github.com/nox/otp.git compile-column-numbers >>>>>> >>>>>> for you to fetch changes up to d932ad582676f1593d917f222b1d8dec71fe88b3: >>>>>> >>>>>> Fix messages ordering with column numbers (2012-06-10 13:01:50 +0200) >>>>>> >>>>>> ---------------------------------------------------------------- >>>>>> Anthony Ramine (7): >>>>>> Export type erl_scan:location/0 >>>>>> Allow setting of initial position in epp >>>>>> Create a new "column" option in compile >>>>>> Fix printing of errors with column numbers >>>>>> Test column number reporting in error_SUITE >>>>>> Fix type compile:err_info/0 >>>>>> Fix messages ordering with column numbers >>>>>> >>>>>> lib/compiler/doc/src/compile.xml | 5 +++++ >>>>>> lib/compiler/src/compile.erl | 25 +++++++++++++++++---- >>>>>> lib/compiler/test/error_SUITE.erl | 15 +++++++++++-- >>>>>> lib/stdlib/doc/src/epp.xml | 2 ++ >>>>>> lib/stdlib/src/epp.erl | 44 +++++++++++++++++++++++++++++-------- >>>>>> lib/stdlib/src/erl_scan.erl | 2 +- >>>>>> 6 files changed, 77 insertions(+), 16 deletions(-) >>>>>> >>>>>> -- >>>>>> Anthony Ramine >>>>>> _______________________________________________ >>>>>> erlang-patches mailing list >>>>>> erlang-patches@REDACTED >>>>>> http://erlang.org/mailman/listinfo/erlang-patches >>>>>> > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- /Henrik Nord Erlang/OTP From lukas@REDACTED Tue Aug 28 15:28:59 2012 From: lukas@REDACTED (Lukas Larsson) Date: Tue, 28 Aug 2012 15:28:59 +0200 Subject: [erlang-patches] Print column numbers when compiling In-Reply-To: References: <610BC6F9-18BF-46A2-B487-492A9B41E42A@gmail.com> <4FCE3186.3000202@erlang.org> <5034FB10.7090804@erlang.org> Message-ID: <503CC79B.2020009@erlang.org> Hello, See responses inlined. Lukas On 24/08/12 12:22, Anthony Ramine wrote: > Most OTP (at least erl_lint, erl_parse and syntax_tools) already knows that locations can be a line or a line and a column; furthermore it is said in erl_parse itself that one should always use get_line/1 and set_line/3 instead of depending on having an integer there. It does indeed say so inside the code of erl_parse. But all of the visible documentation (here[1] and here[2]) say that it is an integer. So if you have only read the documentation (which I assume most people only have) you would assume that it is an integer. That documentation has to be updated so that LINE can be either an integer() or a tuple(integer(),integer()), and a reference to use erl_parse:set/get_attribute to manipulate it safely. The compiler should also be updated to use these API's, this includes the convention that a line number of -1 is used to say that something is compiler generated. To make sure that all uses of the non-api is eliminated, it might be a good idea to declare erl_scan:line as -opaque and let dialyzer search through the otp code for errors. [1]: http://www.erlang.org/doc/apps/erts/absform.html [2]: http://www.erlang.org/doc/man/erl_scan.html#type-line > > If it is really that heavy of a change, why do we have erl_scan:set_attribute/3 and erl_scan:attributes_info/{1,2}? They obviously were coded to mitigate these issues. We have indeed been working on getting this to work before, but the effort was left as you see it now because there were a number of issues which needed solving and more important things got in the way. The reason why I say it is a heavy change is that we want to feel that a good effort has been made to make sure that all error and warning column numbers point to the correct position. > > Can't this option be included as part of an experimental feature and bugs be fixed as they emerge? It's not like it is mandatory to use it, nor like there is not already experimental and dubious code in OTP (parameterized modules I'm looking at you). Just because we previously have made bad decisions in including experimental features, does not mean we should do it again. We want to be sure we have done everything we can to eliminate errors before releasing this. > > Any parse transform that break because of this change will break because it does AST manipulation wrong and their users will just have to not use the "column" option for it to continue to work. Strictly speaking parse transform is also an experimental/undocumented feature of Erlang/OTP. But unfortunately a lot of people seem to use them, so we have to take some backwards compatibility into consideration. The closest thing to a documentation is the example found here lib/stdlib/example/erl_id_trans.erl, and that does not deal with line numbers at all. We really really have to be sure that the fun2ms and qlc parse transforms work. > > I'm not deterred at all from getting this patch into OTP and I would like to know exactly which tests should I update to make you guys happy. Great to hear! I'll do my best to be quick and correct when responding to questions. > > Regards, > > -- > Anthony Ramine > > Le 22 ao?t 2012 ? 17:30, Lukas Larsson a ?crit : > >> Hi, >> >> We have now looked at this patch and there are a couple of issues remaining which have to be solved. >> >> The patch changes the representation of the abstract format which has a couple of implications: >> >> * Any parse transform which uses the line number position might brake when this new option (this could include OTP parse transforms) >> * Any tool which depend on having an integer as the line number position will break (syntax tools might be one such tool) >> >> In order to mitigate this backwards incompatibility, we suggest making the line/column number an opaque datatype which is only accessible via an api and update the documentation to reflect this. >> >> In addition all of the different warnings/errors in erl_lint and friends have to be checked with the new column number so that they point to the correct position. >> >> Also the erl_lint, epp and any other suite which deal with error messages/warnings have to be updated to run tests with and without this option. >> >> I'm sure that I've forgotten some things which have to be done. This is a major change and will take some time to get correct. >> >> I hope I have not deterred you from getting this patch into the Erlang/OTP. If you have any questions about anything I will do what I can to help you. >> >> Lukas >> >> On 10/06/12 13:24, nox wrote: >>> I added a commit to correctly order locations in compile:messages_per_file/1 >>> which didn't take into account column numbers. >>> >>> git fetch https://github.com/nox/otp.git compile-column-numbers >>> >>> >>> The following changes since commit 9bbda97f63ba4ee7cd58c266ee69af1059352189: >>> >>> Merge branch 'raimo/tools/remove-fprof-tuple-funs/OTP-10091' into >>> maint (2012-05-23 16:15:58 +0200) >>> >>> are available in the git repository at: >>> >>> >>> https://github.com/nox/otp.git compile-column-numbers >>> >>> for you to fetch changes up to d932ad582676f1593d917f222b1d8dec71fe88b3: >>> >>> Fix messages ordering with column numbers (2012-06-10 13:01:50 +0200) >>> >>> ---------------------------------------------------------------- >>> Anthony Ramine (7): >>> Export type erl_scan:location/0 >>> Allow setting of initial position in epp >>> Create a new "column" option in compile >>> Fix printing of errors with column numbers >>> Test column number reporting in error_SUITE >>> Fix type compile:err_info/0 >>> Fix messages ordering with column numbers >>> >>> lib/compiler/doc/src/compile.xml | 5 +++++ >>> lib/compiler/src/compile.erl | 25 +++++++++++++++++---- >>> lib/compiler/test/error_SUITE.erl | 15 +++++++++++-- >>> lib/stdlib/doc/src/epp.xml | 2 ++ >>> lib/stdlib/src/epp.erl | 44 +++++++++++++++++++++++++++++-------- >>> lib/stdlib/src/erl_scan.erl | 2 +- >>> 6 files changed, 77 insertions(+), 16 deletions(-) >>> >>> -- >>> Anthony Ramine >>> _______________________________________________ >>> erlang-patches mailing list >>> erlang-patches@REDACTED >>> http://erlang.org/mailman/listinfo/erlang-patches >>> > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches > From daniel.goertzen@REDACTED Tue Aug 28 22:31:53 2012 From: daniel.goertzen@REDACTED (Daniel Goertzen) Date: Tue, 28 Aug 2012 15:31:53 -0500 Subject: [erlang-patches] ssh synchronous eof Message-ID: When sending a large binary (say a couple of MB) followed by an eof through an ssh channel using the following... ssh_connection:send(Conn, Chan, BigBinary), ssh_connection:send_eof(Conn, Chan), ... the eof is transmitted asynchronously and any untransmitted portion of BigBinary will be lost. The patch linked below puts eofs through the existing data-send path so that all queued send data will be sent before the eof. The data-send pathway previously only carried {DataType, Data} tuples; it may now also carry 'eof' atoms. To abstractly represent both in the code I use the name "Cmd" (Command). Tested on Windows. git fetch git@REDACTED:goertzenator/otp.git ssh_sync_eof https://github.com/goertzenator/otp/compare/ssh_sync_eof https://github.com/goertzenator/otp/compare/ssh_sync_eof.patch Dan. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tomas.abrahamsson@REDACTED Tue Aug 28 23:10:25 2012 From: tomas.abrahamsson@REDACTED (Tomas Abrahamsson) Date: Tue, 28 Aug 2012 23:10:25 +0200 Subject: [erlang-patches] [erlang-bugs] erlang.el indenter In-Reply-To: References: <5034B0F9.2000007@erlang.org> Message-ID: On Thu, Aug 23, 2012 at 12:07 AM, Tuncer Ayaz wrote: > On Wed, Aug 22, 2012 at 11:42 PM, Tomas Abrahamsson wrote: >>>>> Here is a patch for indenting of multi-line strings >> >>> A quick test revealed that erlang.el from 'pu' erroneously >>> re-indents the already correctly indented rebar:option_spec_list/0 >>> and also rebar:commands/0. Can you reproduce the regression? >> >> I see what you mean. Will try to fix it. > > Thanks. Are the erlang.el changes in 'pu' susceptible to new > mis-indentations by nature? The original issue is not important > enough to introduce regressions if fixing it means erlang.el > will get imprecise or hard to get right. For the time being, would it be possible to back this patch out from pu? Not sure if I can fix it in time for the upcoming release. Apologies for any trouble this may cause. The solution path I ventured into was not a good one, I realized. I had only tried it with an older version of rebar, so didn't catch the mis-indentation. > Out of curiosity, what about using erl_parse, erl_scan, etc. via an > escript instead? Does that sound viable and make sense? That might be a possibility, although, it might require another grammar than the ordinary erlang grammar, there are some issues one would need to handle: being able to indent before the function is completely written, and being able to indent comments. Also, I guess macros could be a challenge. BRs Tomas From henrik@REDACTED Wed Aug 29 16:17:08 2012 From: henrik@REDACTED (Henrik Nord) Date: Wed, 29 Aug 2012 16:17:08 +0200 Subject: [erlang-patches] fix a URL in REAMDE.md In-Reply-To: <20120803024800.88EC014A245@mail.netbsd.org> References: <501A6810.7050002@erlang.org> <20120803024800.88EC014A245@mail.netbsd.org> Message-ID: <503E2464.4070900@erlang.org> Your patch has been included in R15B02 Thank you for the contribution and sorry for the misunderstanding there for a while. /Henrik On 08/03/2012 04:48 AM, YAMAMOTO Takashi wrote: > hi, > >> It might be a link for this page? >> >> http://www.erlang.org/faq/faq.html > [3] is about erlang-patches and, according to webarchive, > the main contents of the page pointed by the old link seem to be > a list of mailing lists. > http://web.archive.org/web/20101122133432/http://erlang.org/faq.html > > YAMAMOTO Takashi > >> feel free to add that one aswell to the patch >> >> On 08/02/2012 02:54 AM, YAMAMOTO Takashi wrote: >>> hi, >>> >>> http://www.erlang.org/faq.html looks stale. >>> >>> git fetch https://github.com/yamt/otp fix-url >>> https://github.com/yamt/otp/compare/fix-url >>> https://github.com/yamt/otp/compare/fix-url.patch >>> >>> YAMAMOTO Takashi >>> _______________________________________________ >>> erlang-patches mailing list >>> erlang-patches@REDACTED >>> http://erlang.org/mailman/listinfo/erlang-patches >> -- >> /Henrik Nord Erlang/OTP -- /Henrik Nord Erlang/OTP From henrik@REDACTED Wed Aug 29 16:23:18 2012 From: henrik@REDACTED (Henrik Nord) Date: Wed, 29 Aug 2012 16:23:18 +0200 Subject: [erlang-patches] [erlang-bugs] erlang.el indenter In-Reply-To: References: <5034B0F9.2000007@erlang.org> Message-ID: <503E25D6.3090701@erlang.org> On 08/28/2012 11:10 PM, Tomas Abrahamsson wrote: > On Thu, Aug 23, 2012 at 12:07 AM, Tuncer Ayaz wrote: >> On Wed, Aug 22, 2012 at 11:42 PM, Tomas Abrahamsson wrote: >>>>>> Here is a patch for indenting of multi-line strings >>>> A quick test revealed that erlang.el from 'pu' erroneously >>>> re-indents the already correctly indented rebar:option_spec_list/0 >>>> and also rebar:commands/0. Can you reproduce the regression? >>> I see what you mean. Will try to fix it. >> Thanks. Are the erlang.el changes in 'pu' susceptible to new >> mis-indentations by nature? The original issue is not important >> enough to introduce regressions if fixing it means erlang.el >> will get imprecise or hard to get right. > For the time being, would it be possible to > back this patch out from pu? Not sure if I can fix it > in time for the upcoming release. That's no problem, just get back to me when you have a new version. > > Apologies for any trouble this may cause. > > The solution path I ventured into was not a good one, > I realized. I had only tried it with an older version > of rebar, so didn't catch the mis-indentation. > >> Out of curiosity, what about using erl_parse, erl_scan, etc. via an >> escript instead? Does that sound viable and make sense? > That might be a possibility, although, it might > require another grammar than the ordinary erlang > grammar, there are some issues one would need > to handle: being able to indent before the function > is completely written, and being able to indent > comments. Also, I guess macros could be a > challenge. > > BRs > Tomas > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- /Henrik Nord Erlang/OTP From mloftis@REDACTED Wed Aug 29 16:28:12 2012 From: mloftis@REDACTED (Michael Loftis) Date: Wed, 29 Aug 2012 08:28:12 -0600 Subject: [erlang-patches] Crypto RIPEMD-160 Support Message-ID: I'd started to put together a RIPEMD-160 patch, when I took a moment to search the archives I found that someone had submitted one a year ago, and there'd been apparently no response...I don't see it in R15B01 nor in the pu branch either, what needs to be done to get this into the mainstream? http://erlang.org/pipermail/erlang-patches/2011-March/001930.html -- "Genius might be described as a supreme capacity for getting its possessors into trouble of all kinds." -- Samuel Butler From henrik@REDACTED Wed Aug 29 16:50:17 2012 From: henrik@REDACTED (Henrik Nord) Date: Wed, 29 Aug 2012 16:50:17 +0200 Subject: [erlang-patches] Crypto RIPEMD-160 Support In-Reply-To: References: Message-ID: <503E2C29.7080808@erlang.org> There is one in 'pu' actually it is just taking a small break outside of it. git fetch git://github.com/ahf/otp.git feature-crypto-ripemd160 af/feature-crypto-ripemd160 @Alexander: would you mind rebasing it on R15B02 after the release next week? On 08/29/2012 04:28 PM, Michael Loftis wrote: > I'd started to put together a RIPEMD-160 patch, when I took a moment > to search the archives I found that someone had submitted one a year > ago, and there'd been apparently no response...I don't see it in > R15B01 nor in the pu branch either, what needs to be done to get this > into the mainstream? > > http://erlang.org/pipermail/erlang-patches/2011-March/001930.html > > -- /Henrik Nord Erlang/OTP From daniel.goertzen@REDACTED Wed Aug 29 18:18:32 2012 From: daniel.goertzen@REDACTED (Daniel Goertzen) Date: Wed, 29 Aug 2012 11:18:32 -0500 Subject: [erlang-patches] ssh synchronous eof In-Reply-To: References: Message-ID: After looking through the SSH code and learning more about it, I feel this patch is solving the wrong problem. The REAL problem is that ssh_connection:send() is supposed to be synchronous, but is actually not in some cases. send() will be synchronous only if the given data will fit in the channel send window. Any data beyond that will be sent asynchronously. So if you send a very large binary, or repeatedly send smaller binaries you will run into this problem. The minimum ssh packet size mandated by the RFCs is 32kB, so the minimum window is the same. OpenSSH gives me a send window of approx 200kB. For most of the applications that people use SSH for, the send window never gets overrun and you never see asynchronous send behavior out of Erlang SSH. Ingela, I'm inclined to write some failing test cases for this and some other problems I've seen. Would this be helpful? I have some ideas about how to fix the problems, but I may not have time to actually fix them. Dan. On Tue, Aug 28, 2012 at 3:31 PM, Daniel Goertzen wrote: > When sending a large binary (say a couple of MB) followed by an eof > through an ssh channel using the following... > > > ssh_connection:send(Conn, Chan, BigBinary), > ssh_connection:send_eof(Conn, Chan), > > ... the eof is transmitted asynchronously and any untransmitted portion of > BigBinary will be lost. > > > The patch linked below puts eofs through the existing data-send path so > that all queued send data will be sent before the eof. > > The data-send pathway previously only carried {DataType, Data} tuples; it > may now also carry 'eof' atoms. To abstractly represent both in the code I > use the name "Cmd" (Command). > > > Tested on Windows. > > > git fetch git@REDACTED:goertzenator/otp.git ssh_sync_eof > > https://github.com/goertzenator/otp/compare/ssh_sync_eof > > https://github.com/goertzenator/otp/compare/ssh_sync_eof.patch > > > Dan. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mloftis@REDACTED Wed Aug 29 18:28:55 2012 From: mloftis@REDACTED (Michael Loftis) Date: Wed, 29 Aug 2012 10:28:55 -0600 Subject: [erlang-patches] Crypto RIPEMD-160 Support In-Reply-To: <503E2C29.7080808@erlang.org> References: <503E2C29.7080808@erlang.org> Message-ID: On Wed, Aug 29, 2012 at 8:50 AM, Henrik Nord wrote: > There is one in 'pu' actually it is just taking a small break outside of > it. > > git fetch git://github.com/ahf/otp.git feature-crypto-ripemd160 > > af/feature-crypto-ripemd160 > > @Alexander: would you mind rebasing it on R15B02 after the release next > week? Excellent, many thanks. I'll keep an eye out for it to make it onto the official crypto app! -- "Genius might be described as a supreme capacity for getting its possessors into trouble of all kinds." -- Samuel Butler