From aronisstav@REDACTED Thu Dec 1 10:29:55 2011 From: aronisstav@REDACTED (Stavros Aronis) Date: Thu, 1 Dec 2011 10:29:55 +0100 Subject: [erlang-patches] Dialyzer fixes In-Reply-To: <4ED3AAD4.7050707@erlang.org> References: <4ED3AAD4.7050707@erlang.org> Message-ID: I saw that this branch has already graduated. In the meantime, we have added a few more fixes in the branch. I have rebased everything on the latest master. git fetch git://github.com/aronisstav/otp.git dialyzer-fixes Stavros On Mon, Nov 28, 2011 at 4:37 PM, Henrik Nord wrote: > On 11/28/2011 11:30 AM, Stavros Aronis wrote: > > Suppression of some function underspecification-related warnings, small > fixes in Dialyzer and HiPE, repair broken typer and update of test suite > results: > > git fetch git://github.com/aronisstav/otp.git dialyzer-fixes > > Stavros > > > _______________________________________________ > erlang-patches mailing listerlang-patches@REDACTED://erlang.org/mailman/listinfo/erlang-patches > > Hi Stavros. > > Your patch is included in 'pu', and we aim for it to be in R15 > > -- > /Henrik Nord Erlang/OTP > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From henrik@REDACTED Thu Dec 1 10:59:16 2011 From: henrik@REDACTED (Henrik Nord) Date: Thu, 1 Dec 2011 10:59:16 +0100 Subject: [erlang-patches] Dialyzer fixes In-Reply-To: References: <4ED3AAD4.7050707@erlang.org> Message-ID: <4ED74FF4.3050102@erlang.org> Thank you Stavros, I will try to get this one in as fast as the last one. On 12/01/2011 10:29 AM, Stavros Aronis wrote: > git fetch git://github.com/aronisstav/otp.git > dialyzer-fixes -- /Henrik Nord Erlang/OTP -------------- next part -------------- An HTML attachment was scrubbed... URL: From bookjovi@REDACTED Fri Dec 2 08:10:42 2011 From: bookjovi@REDACTED (Jovi Zhang) Date: Fri, 2 Dec 2011 15:10:42 +0800 Subject: [erlang-patches] [erlang-patch] erts: Remove duplicate erts_unblock_fpe Message-ID: >From 3b9a1c605b2fe757e9fdbde031df6e3de6d2c981 Mon Sep 17 00:00:00 2001 From: Jovi Zhang Date: Fri, 25 Nov 2011 01:13:57 +0800 Subject: [PATCH] erts: Remove duplicate erts_unblock_fpe The second function erts_unblock_fpe is not needed in here. --- erts/emulator/beam/io.c | ? ?1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c index 132dc78..3056a0f 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -644,7 +644,6 @@ erts_open_driver(erts_driver_t* driver, ? ? /* Pointer to driver. */ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?name, opts); ? ? ? ?erts_unblock_fpe(fpe_was_unmasked); ? ? ? ?port->caller = NIL; - ? ? ? erts_unblock_fpe(fpe_was_unmasked); ? ? ? ?if (IS_TRACED_FL(port, F_TRACE_SCHED_PORTS)) { ? ? ? ? ? ?trace_sched_ports_where(port, am_out, am_start); ? ? ? ?} -- 1.7.2.3 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-erts-Remove-duplicate-erts_unblock_fpe.patch Type: application/octet-stream Size: 833 bytes Desc: not available URL: From onlyafly@REDACTED Fri Dec 2 09:52:52 2011 From: onlyafly@REDACTED (Kevin Albrecht) Date: Fri, 2 Dec 2011 09:52:52 +0100 Subject: [erlang-patches] [PATCH] Updated erlang-flymake to recognize "deps" directory Message-ID: I updated erlang-flymake.el to recognize the "deps" directory as an include directory by default. This makes erlang-flymake compatible with the rebar dependency management tool's default folder structure, which puts included dependencies in "deps". The patch can be fetched from: git fetch git://github.com/onlyafly/otp.git flymake_deps_support You can view the patch here: https://github.com/onlyafly/otp/compare/flymake_deps_support https://github.com/onlyafly/otp/compare/flymake_deps_support.patch Regards, Kevin Albrecht From henrik@REDACTED Mon Dec 5 17:17:32 2011 From: henrik@REDACTED (Henrik Nord) Date: Mon, 5 Dec 2011 17:17:32 +0100 Subject: [erlang-patches] [erlang-patch] erts: Remove duplicate erts_unblock_fpe In-Reply-To: References: Message-ID: <4EDCEE9C.7090108@erlang.org> This patch is merged to 'master' Thank you for the contribution! On 12/02/2011 08:10 AM, Jovi Zhang wrote: > > From 3b9a1c605b2fe757e9fdbde031df6e3de6d2c981 Mon Sep 17 00:00:00 2001 > From: Jovi Zhang > Date: Fri, 25 Nov 2011 01:13:57 +0800 > Subject: [PATCH] erts: Remove duplicate erts_unblock_fpe > > The second function erts_unblock_fpe is not needed in here. > --- > erts/emulator/beam/io.c | 1 - > 1 files changed, 0 insertions(+), 1 deletions(-) > > diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c > index 132dc78..3056a0f 100644 > --- a/erts/emulator/beam/io.c > +++ b/erts/emulator/beam/io.c > @@ -644,7 +644,6 @@ erts_open_driver(erts_driver_t* driver, /* > Pointer to driver. */ > name, opts); > erts_unblock_fpe(fpe_was_unmasked); > port->caller = NIL; > - erts_unblock_fpe(fpe_was_unmasked); > if (IS_TRACED_FL(port, F_TRACE_SCHED_PORTS)) { > trace_sched_ports_where(port, am_out, am_start); > } > -- > 1.7.2.3 > > > _______________________________________________ > 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 bookjovi@REDACTED Tue Dec 6 07:50:29 2011 From: bookjovi@REDACTED (Jovi Zhang) Date: Tue, 6 Dec 2011 14:50:29 +0800 Subject: [erlang-patches] [PATCH] erts: change SENDFILE_CHUNK_SIZE from signed to unsigned Message-ID: >From 918d76da1a8becd231bea92cbc26358dd5363ddf Mon Sep 17 00:00:00 2001 From: Jovi Zhang Date: Tue, 29 Nov 2011 02:04:04 +0800 Subject: [PATCH] erts: change SENDFILE_CHUNK_SIZE from signed to unsigned It's reasonable to use UL in SENDFILE_CHUNK_SIZE --- erts/emulator/drivers/unix/unix_efile.c | ? ?2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c index 7291164..eb2c5f5 100644 --- a/erts/emulator/drivers/unix/unix_efile.c +++ b/erts/emulator/drivers/unix/unix_efile.c @@ -1469,7 +1469,7 @@ efile_fadvise(Efile_error* errInfo, int fd, Sint64 offset, } #ifdef HAVE_SENDFILE -#define SENDFILE_CHUNK_SIZE ((1 << 30) -1) +#define SENDFILE_CHUNK_SIZE ((1UL << 30) -1) /* ?* sendfile: The implementation of the sendfile system call varies -- 1.7.2.3 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-erts-change-SENDFILE_CHUNK_SIZE-from-signed-to-unsig.patch Type: application/octet-stream Size: 879 bytes Desc: not available URL: From bookjovi@REDACTED Tue Dec 6 07:51:53 2011 From: bookjovi@REDACTED (Jovi Zhang) Date: Tue, 6 Dec 2011 14:51:53 +0800 Subject: [erlang-patches] [PATCH] erts: fix error logic in efile_sendfile Message-ID: >From 501b8f4ab78c752ff11a794984aad547b8717c5f Mon Sep 17 00:00:00 2001 From: Jovi Zhang Date: Tue, 29 Nov 2011 02:11:01 +0800 Subject: [PATCH] erts: fix error logic in efile_sendfile This commit fix two errors in efile_sendfile(linux env): 1) when *nbytes is 0, we should invoke sendfile with count *nbytes, not SENDFILE_CHUNK_SIZE 2) "while (retval != -1 && retval == SENDFILE_CHUNK_SIZE)" is pointless, ? replace it by "while (retval == SENDFILE_CHUNK_SIZE)" --- erts/emulator/drivers/unix/unix_efile.c | ? ?4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c index eb2c5f5..fe0a0e2 100644 --- a/erts/emulator/drivers/unix/unix_efile.c +++ b/erts/emulator/drivers/unix/unix_efile.c @@ -1492,7 +1492,7 @@ efile_sendfile(Efile_error* errInfo, int in_fd, int out_fd, ? ? ssize_t retval; ? ? do { ? ? ? // check if *nbytes is 0 or greater than the largest size_t - ? ? ?if (*nbytes == 0 || *nbytes > SENDFILE_CHUNK_SIZE) + ? ? ?if (*nbytes > SENDFILE_CHUNK_SIZE) ? ? ? ?retval = sendfile(out_fd, in_fd, offset, SENDFILE_CHUNK_SIZE); ? ? ? else ? ? ? ?retval = sendfile(out_fd, in_fd, offset, *nbytes); @@ -1500,7 +1500,7 @@ efile_sendfile(Efile_error* errInfo, int in_fd, int out_fd, ? ? ? ?written += retval; ? ? ? ?*nbytes -= retval; ? ? ? } - ? ?} while (retval != -1 && retval == SENDFILE_CHUNK_SIZE); + ? ?} while (retval == SENDFILE_CHUNK_SIZE); ? ? *nbytes = written; ? ? return check_error(retval == -1 ? -1 : 0, errInfo); #elif defined(DARWIN) -- 1.7.2.3 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-erts-fix-error-logic-in-efile_sendfile.patch Type: application/octet-stream Size: 1577 bytes Desc: not available URL: From henrik@REDACTED Tue Dec 6 09:51:27 2011 From: henrik@REDACTED (Henrik Nord) Date: Tue, 6 Dec 2011 09:51:27 +0100 Subject: [erlang-patches] [PATCH] erts: fix error logic in efile_sendfile In-Reply-To: References: Message-ID: <4EDDD78F.9000003@erlang.org> Hello! We can not get the tests to pass with this patch. can you rerun the test at your side and verify that they all pass? Thank you On 12/06/2011 07:51 AM, Jovi Zhang wrote: > > From 501b8f4ab78c752ff11a794984aad547b8717c5f Mon Sep 17 00:00:00 2001 > From: Jovi Zhang > Date: Tue, 29 Nov 2011 02:11:01 +0800 > Subject: [PATCH] erts: fix error logic in efile_sendfile > > This commit fix two errors in efile_sendfile(linux env): > 1) when *nbytes is 0, we should invoke sendfile with count *nbytes, > not SENDFILE_CHUNK_SIZE > 2) "while (retval != -1&& retval == SENDFILE_CHUNK_SIZE)" is pointless, > replace it by "while (retval == SENDFILE_CHUNK_SIZE)" > --- > erts/emulator/drivers/unix/unix_efile.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/erts/emulator/drivers/unix/unix_efile.c > b/erts/emulator/drivers/unix/unix_efile.c > index eb2c5f5..fe0a0e2 100644 > --- a/erts/emulator/drivers/unix/unix_efile.c > +++ b/erts/emulator/drivers/unix/unix_efile.c > @@ -1492,7 +1492,7 @@ efile_sendfile(Efile_error* errInfo, int in_fd, > int out_fd, > ssize_t retval; > do { > // check if *nbytes is 0 or greater than the largest size_t > - if (*nbytes == 0 || *nbytes> SENDFILE_CHUNK_SIZE) > + if (*nbytes> SENDFILE_CHUNK_SIZE) > retval = sendfile(out_fd, in_fd, offset, SENDFILE_CHUNK_SIZE); > else > retval = sendfile(out_fd, in_fd, offset, *nbytes); > @@ -1500,7 +1500,7 @@ efile_sendfile(Efile_error* errInfo, int in_fd, > int out_fd, > written += retval; > *nbytes -= retval; > } > - } while (retval != -1&& retval == SENDFILE_CHUNK_SIZE); > + } while (retval == SENDFILE_CHUNK_SIZE); > *nbytes = written; > return check_error(retval == -1 ? -1 : 0, errInfo); > #elif defined(DARWIN) > -- > 1.7.2.3 > > > _______________________________________________ > 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 Tue Dec 6 10:02:49 2011 From: henrik@REDACTED (Henrik Nord) Date: Tue, 6 Dec 2011 10:02:49 +0100 Subject: [erlang-patches] [PATCH] erts: change SENDFILE_CHUNK_SIZE from signed to unsigned In-Reply-To: References: Message-ID: <4EDDDA39.5090602@erlang.org> Thank you, I have included this patch in 'pu'. It is however unlikely that it will be included in the R15 release Thank you for the contribution! On 12/06/2011 07:50 AM, Jovi Zhang wrote: > > From 918d76da1a8becd231bea92cbc26358dd5363ddf Mon Sep 17 00:00:00 2001 > From: Jovi Zhang > Date: Tue, 29 Nov 2011 02:04:04 +0800 > Subject: [PATCH] erts: change SENDFILE_CHUNK_SIZE from signed to unsigned > > It's reasonable to use UL in SENDFILE_CHUNK_SIZE > --- > erts/emulator/drivers/unix/unix_efile.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/erts/emulator/drivers/unix/unix_efile.c > b/erts/emulator/drivers/unix/unix_efile.c > index 7291164..eb2c5f5 100644 > --- a/erts/emulator/drivers/unix/unix_efile.c > +++ b/erts/emulator/drivers/unix/unix_efile.c > @@ -1469,7 +1469,7 @@ efile_fadvise(Efile_error* errInfo, int fd, Sint64 offset, > } > > #ifdef HAVE_SENDFILE > -#define SENDFILE_CHUNK_SIZE ((1<< 30) -1) > +#define SENDFILE_CHUNK_SIZE ((1UL<< 30) -1) > > /* > * sendfile: The implementation of the sendfile system call varies > -- > 1.7.2.3 > > > _______________________________________________ > 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 bookjovi@REDACTED Tue Dec 6 10:49:51 2011 From: bookjovi@REDACTED (Jovi Zhang) Date: Tue, 6 Dec 2011 17:49:51 +0800 Subject: [erlang-patches] [PATCH] erts: fix error logic in efile_sendfile In-Reply-To: <4EDDD78F.9000003@erlang.org> References: <4EDDD78F.9000003@erlang.org> Message-ID: On Tue, Dec 6, 2011 at 4:51 PM, Henrik Nord wrote: > Hello! > > We can not get the tests to pass with this patch. > can you rerun the test at your side and verify that they all pass? > > Thank you > Sorry, I missed that "*nbytes == 0" have special meaning used by upper layer. I will take more carefully in next time. I have removed "*nbytes == 0" part, please try below new patch. >From cbfce8104b708e7df287b88783bf7bdc21dc1035 Mon Sep 17 00:00:00 2001 From: Jovi Zhang Date: Tue, 29 Nov 2011 05:23:56 +0800 Subject: [PATCH] erts: minor fix for unnecessary condition In "while (retval != -1 && retval == SENDFILE_CHUNK_SIZE)", "retval != -1" is pointless. --- erts/emulator/drivers/unix/unix_efile.c | ? ?2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c index eb2c5f5..ebc82e2 100644 --- a/erts/emulator/drivers/unix/unix_efile.c +++ b/erts/emulator/drivers/unix/unix_efile.c @@ -1500,7 +1500,7 @@ efile_sendfile(Efile_error* errInfo, int in_fd, int out_fd, ? ? ? ?written += retval; ? ? ? ?*nbytes -= retval; ? ? ? } - ? ?} while (retval != -1 && retval == SENDFILE_CHUNK_SIZE); + ? ?} while (retval == SENDFILE_CHUNK_SIZE); ? ? *nbytes = written; ? ? return check_error(retval == -1 ? -1 : 0, errInfo); #elif defined(DARWIN) -- 1.7.2.3 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-erts-minor-fix-for-unnecessary-condition.patch Type: application/octet-stream Size: 977 bytes Desc: not available URL: From michael.santos@REDACTED Tue Dec 6 17:57:55 2011 From: michael.santos@REDACTED (Michael Santos) Date: Tue, 6 Dec 2011 11:57:55 -0500 Subject: [erlang-patches] [PATCH] erts: fix error logic in efile_sendfile In-Reply-To: References: <4EDDD78F.9000003@erlang.org> Message-ID: <20111206165754.GA996@ecn.lan> On Tue, Dec 06, 2011 at 05:49:51PM +0800, Jovi Zhang wrote: > On Tue, Dec 6, 2011 at 4:51 PM, Henrik Nord wrote: > > Hello! > > > > We can not get the tests to pass with this patch. > > can you rerun the test at your side and verify that they all pass? > > > > Thank you > > > > Sorry, I missed that "*nbytes == 0" have special meaning used by upper layer. > I will take more carefully in next time. > > I have removed "*nbytes == 0" part, please try below new patch. > > > From cbfce8104b708e7df287b88783bf7bdc21dc1035 Mon Sep 17 00:00:00 2001 > From: Jovi Zhang > Date: Tue, 29 Nov 2011 05:23:56 +0800 > Subject: [PATCH] erts: minor fix for unnecessary condition > > In "while (retval != -1 && retval == SENDFILE_CHUNK_SIZE)", "retval != > -1" is pointless. - ? ?} while (retval != -1 && retval == SENDFILE_CHUNK_SIZE); + ? ?} while (retval == SENDFILE_CHUNK_SIZE); Looks ok, but the surrounding code looks sketchy. For Linux: erts/emulator/drivers/unix/unix_efile.c: do { // check if *nbytes is 0 or greater than the largest size_t if (*nbytes == 0 || *nbytes > SENDFILE_CHUNK_SIZE) retval = sendfile(out_fd, in_fd, offset, SENDFILE_CHUNK_SIZE); else retval = sendfile(out_fd, in_fd, offset, *nbytes); if (retval > 0) { written += retval; *nbytes -= retval; } } while (retval != -1 && retval == SENDFILE_CHUNK_SIZE); *nbytes = written; return check_error(retval == -1 ? -1 : 0, errInfo); Note the ternary check in check_error() is not required either: return check_error(retval, errInfo); On error, sendfile returns -1 and sets errno. So the function will return on error, including EAGAIN and EINTR. The calling function, invoke_sendfile(), ignores EAGAIN and EINTR: erts/emulator/drivers/common/efile_drv.c: } else if (result == 0 && (d->errInfo.posix_errno == EAGAIN || d->errInfo.posix_errno == EINTR)) { d->result_ok = 1; } For Darwin: erts/emulator/drivers/unix/unix_efile.c: int retval; off_t len; do { // check if *nbytes is 0 or greater than the largest off_t if(*nbytes > SENDFILE_CHUNK_SIZE) len = SENDFILE_CHUNK_SIZE; else len = *nbytes; retval = sendfile(in_fd, out_fd, *offset, &len, NULL, 0); if (retval != -1 || errno == EAGAIN || errno == EINTR) { *offset += len; *nbytes -= len; written += len; } } while (len == SENDFILE_CHUNK_SIZE); *nbytes = written; return check_error(retval, errInfo); If retval returns an error and errno is either EAGAIN or EINTR, the chunk is discarded and the offset moved to the next chunk. Probably the check should be: if (retval != -1) { In the case where len is set to SENDFILE_CHUNK_SIZE and sendfile returns an error other than EAGAIN/EINTR (for example, the fd is bad, etc), the driver will go into a loop. For FreeBSD: The code is similar to Darwin, so the same changes need to be applied. From bookjovi@REDACTED Wed Dec 7 03:45:56 2011 From: bookjovi@REDACTED (Jovi Zhang) Date: Wed, 7 Dec 2011 10:45:56 +0800 Subject: [erlang-patches] [PATCH] erts: fix error logic in efile_sendfile In-Reply-To: <20111206165754.GA996@ecn.lan> References: <4EDDD78F.9000003@erlang.org> <20111206165754.GA996@ecn.lan> Message-ID: On Wed, Dec 7, 2011 at 12:57 AM, Michael Santos wrote: > On Tue, Dec 06, 2011 at 05:49:51PM +0800, Jovi Zhang wrote: >> On Tue, Dec 6, 2011 at 4:51 PM, Henrik Nord wrote: >> > Hello! >> > >> > We can not get the tests to pass with this patch. >> > can you rerun the test at your side and verify that they all pass? >> > >> > Thank you >> > >> >> Sorry, I missed that "*nbytes == 0" have special meaning used by upper layer. >> I will take more carefully in next time. >> >> I have removed "*nbytes == 0" part, please try below new patch. >> >> >> From cbfce8104b708e7df287b88783bf7bdc21dc1035 Mon Sep 17 00:00:00 2001 >> From: Jovi Zhang >> Date: Tue, 29 Nov 2011 05:23:56 +0800 >> Subject: [PATCH] erts: minor fix for unnecessary condition >> >> In "while (retval != -1 && retval == SENDFILE_CHUNK_SIZE)", "retval != >> -1" is pointless. > > - ? ?} while (retval != -1 && retval == SENDFILE_CHUNK_SIZE); > + ? ?} while (retval == SENDFILE_CHUNK_SIZE); > > Looks ok, but the surrounding code looks sketchy. > > For Linux: > > erts/emulator/drivers/unix/unix_efile.c: > ? ?do { > ? ? ?// check if *nbytes is 0 or greater than the largest size_t > ? ? ?if (*nbytes == 0 || *nbytes > SENDFILE_CHUNK_SIZE) > ? ?retval = sendfile(out_fd, in_fd, offset, SENDFILE_CHUNK_SIZE); > ? ? ?else > ? ?retval = sendfile(out_fd, in_fd, offset, *nbytes); > ? ? ?if (retval > 0) { > ? ?written += retval; > ? ?*nbytes -= retval; > ? ? ?} > ? ?} while (retval != -1 && retval == SENDFILE_CHUNK_SIZE); > ? ?*nbytes = written; > ? ?return check_error(retval == -1 ? -1 : 0, errInfo); > > Note the ternary check in check_error() is not required either: > > ? ?return check_error(retval, errInfo); > > On error, sendfile returns -1 and sets errno. So the function will > return on error, including EAGAIN and EINTR. You are right, we can just return check_error(retval, errInfo) > > The calling function, invoke_sendfile(), ignores EAGAIN and EINTR: > > erts/emulator/drivers/common/efile_drv.c: > ? ?} else if (result == 0 && (d->errInfo.posix_errno == EAGAIN > ? ? ? ?|| d->errInfo.posix_errno == EINTR)) { > ? ? ? ?d->result_ok = 1; > ? ?} > > For Darwin: > > erts/emulator/drivers/unix/unix_efile.c: > ? ?int retval; > ? ?off_t len; > ? ?do { > ? ? ?// check if *nbytes is 0 or greater than the largest off_t > ? ? ?if(*nbytes > SENDFILE_CHUNK_SIZE) > ? ?len = SENDFILE_CHUNK_SIZE; > ? ? ?else > ? ?len = *nbytes; > ? ? ?retval = sendfile(in_fd, out_fd, *offset, &len, NULL, 0); > ? ? ?if (retval != -1 || errno == EAGAIN || errno == EINTR) { > ? ? ? ?*offset += len; > ? ?*nbytes -= len; > ? ?written += len; > ? ? ?} > ? ?} while (len == SENDFILE_CHUNK_SIZE); > ? ?*nbytes = written; > ? ?return check_error(retval, errInfo); > > If retval returns an error and errno is either EAGAIN or EINTR, the > chunk is discarded and the offset moved to the next chunk. Probably the > check should be: > > ? ? ?if (retval != -1) { > > In the case where len is set to SENDFILE_CHUNK_SIZE and sendfile returns > an error other than EAGAIN/EINTR (for example, the fd is bad, etc), > the driver will go into a loop. I'm not sure, I don't familiar with DARWIN and freebsd system, it's possible that len will be assign to 0 when sendfile return other error code(like bad file EBDF), so driver will not go into a loop. > > For FreeBSD: > > The code is similar to Darwin, so the same changes need to be applied. I don't know what's meaning about sendfile EAGAIN/EINTR in DARWIN and freebsd system, by mostly I agree with you comments, it's not reasonable move to next trunk if sendfile return EAGAIN. But it seems that non-blocking io and header/tailer work is just preliminary, so there might have more work and patch on that part. See below new patch, Thanks for you comments! >From 44b0b734128f9ffb61f9d66b2d44cc2c972a46fc Mon Sep 17 00:00:00 2001 From: Jovi Zhang Date: Tue, 29 Nov 2011 22:22:30 +0800 Subject: [PATCH] erts: remove useless check in efile_sendfile remove useless check for "retval != -1". Signed-off-by: Michael Santos --- erts/emulator/drivers/unix/unix_efile.c | ? ?4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c index eb2c5f5..3704eca 100644 --- a/erts/emulator/drivers/unix/unix_efile.c +++ b/erts/emulator/drivers/unix/unix_efile.c @@ -1500,9 +1500,9 @@ efile_sendfile(Efile_error* errInfo, int in_fd, int out_fd, ? ? ? ?written += retval; ? ? ? ?*nbytes -= retval; ? ? ? } - ? ?} while (retval != -1 && retval == SENDFILE_CHUNK_SIZE); + ? ?} while (retval == SENDFILE_CHUNK_SIZE); ? ? *nbytes = written; - ? ?return check_error(retval == -1 ? -1 : 0, errInfo); + ? ?return check_error(retval, errInfo); #elif defined(DARWIN) ? ? int retval; ? ? off_t len; -- 1.7.2.3 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-erts-remove-useless-check-in-efile_sendfile.patch Type: application/octet-stream Size: 1067 bytes Desc: not available URL: From onlyafly@REDACTED Wed Dec 7 08:46:48 2011 From: onlyafly@REDACTED (Kevin Albrecht) Date: Wed, 7 Dec 2011 08:46:48 +0100 Subject: [erlang-patches] [PATCH] Updated erlang-flymake to recognize "deps" directory In-Reply-To: References: Message-ID: Here is my updated patch suggestion based on input. I fixed a typo in the deps path and improved my commit message. I considered additionally adding deps/*/include, deps/*/ebin, and deps/*/src as include directories, but erlc's -I command line option does not support wildcards, so this is not possible. The updated patch can be fetched from: git fetch git://github.com/onlyafly/otp.git flymake_include_deps You can view the patch here: https://github.com/onlyafly/otp/compare/flymake_include_deps https://github.com/onlyafly/otp/compare/flymake_include_deps.patch Regards, Kevin Albrecht On Fri, Dec 2, 2011 at 9:52 AM, Kevin Albrecht wrote: > I updated erlang-flymake.el to recognize the "deps" directory as an > include directory by default. This makes erlang-flymake compatible > with the rebar dependency management tool's default folder structure, > which puts included dependencies in "deps". > > The patch can be fetched from: > git fetch git://github.com/onlyafly/otp.git flymake_deps_support > > You can view the patch here: > https://github.com/onlyafly/otp/compare/flymake_deps_support > https://github.com/onlyafly/otp/compare/flymake_deps_support.patch From carlsson.richard@REDACTED Wed Dec 7 13:06:18 2011 From: carlsson.richard@REDACTED (Richard Carlsson) Date: Wed, 07 Dec 2011 13:06:18 +0100 Subject: [erlang-patches] small fix to mnesia_log:ets2dcd() Message-ID: <4EDF56BA.9010305@gmail.com> Use the synchronous log_terms instead of alog_terms in mnesia_log:ets2dcd() This avoids the situation where mnesia could dump a very large ets table in its entirety into the message queue of the disk_log process, causing memory blowup and choking the disk logger. git fetch git://github.com/richcarl/otp.git mnesia_log-no-async /Richard From henrik@REDACTED Wed Dec 7 13:10:32 2011 From: henrik@REDACTED (Henrik Nord) Date: Wed, 7 Dec 2011 13:10:32 +0100 Subject: [erlang-patches] [PATCH] Updated erlang-flymake to recognize "deps" directory In-Reply-To: References: Message-ID: <4EDF57B8.8020306@erlang.org> Thank you, patch included in 'pu' Thank you for the contribution! On 12/07/2011 08:46 AM, Kevin Albrecht wrote: > Here is my updated patch suggestion based on input. I fixed a typo in > the deps path and improved my commit message. I considered > additionally adding deps/*/include, deps/*/ebin, and deps/*/src as > include directories, but erlc's -I command line option does not > support wildcards, so this is not possible. > > The updated patch can be fetched from: > git fetch git://github.com/onlyafly/otp.git flymake_include_deps > > You can view the patch here: > https://github.com/onlyafly/otp/compare/flymake_include_deps > https://github.com/onlyafly/otp/compare/flymake_include_deps.patch > > Regards, > Kevin Albrecht > > On Fri, Dec 2, 2011 at 9:52 AM, Kevin Albrecht wrote: >> I updated erlang-flymake.el to recognize the "deps" directory as an >> include directory by default. This makes erlang-flymake compatible >> with the rebar dependency management tool's default folder structure, >> which puts included dependencies in "deps". >> >> The patch can be fetched from: >> git fetch git://github.com/onlyafly/otp.git flymake_deps_support >> >> You can view the patch here: >> https://github.com/onlyafly/otp/compare/flymake_deps_support >> https://github.com/onlyafly/otp/compare/flymake_deps_support.patch > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- /Henrik Nord Erlang/OTP From carlsson.richard@REDACTED Wed Dec 7 13:32:16 2011 From: carlsson.richard@REDACTED (Richard Carlsson) Date: Wed, 07 Dec 2011 13:32:16 +0100 Subject: [erlang-patches] add events for lock conflicts to mnesia Message-ID: <4EDF5CD0.2050005@gmail.com> Generate mnesia events for conflicting locks This can help debugging situations where locks are causing problems. Must be explicitly enabled by setting the environment variable 'report_conflicting_locks' to true. git fetch git://github.com/richcarl/otp.git mnesia-lock-conflict-events /Richard From michael.santos@REDACTED Wed Dec 7 14:54:45 2011 From: michael.santos@REDACTED (Michael Santos) Date: Wed, 7 Dec 2011 08:54:45 -0500 Subject: [erlang-patches] [PATCH] erts: fix error logic in efile_sendfile In-Reply-To: References: <4EDDD78F.9000003@erlang.org> <20111206165754.GA996@ecn.lan> Message-ID: <20111207135445.GA4165@ecn.lan> On Wed, Dec 07, 2011 at 10:45:56AM +0800, Jovi Zhang wrote: > I'm not sure, I don't familiar with DARWIN and freebsd system, it's > possible that len will be assign > to 0 when sendfile return other error code(like bad file EBDF), so > driver will not go into a loop. You're right! I did not read the man page closely enough. The man page is not clear if sent bytes will be 0 on error but a small test program shows that is the behaviour. > I don't know what's meaning about sendfile EAGAIN/EINTR in DARWIN and > freebsd system, by > mostly I agree with you comments, it's not reasonable move to next > trunk if sendfile return EAGAIN. EAGAIN/EINTR has a special meaning for sendfile on FreeBSD/Mac OS X. A return value of 0 can mean EOF, EINTR (sendfile() may not return -1 in this case) [Mac OS X] or requested offset is beyond EOF. EAGAIN can mean either socket not ready or the requested number of bytes was not sent. tl;dr the code is correct > But it seems that non-blocking io and header/tailer work is just preliminary, > so there might have more work and patch on that part. > > See below new patch, Thanks for you comments! Looks fine, thanks! From henrik@REDACTED Wed Dec 7 15:00:54 2011 From: henrik@REDACTED (Henrik Nord) Date: Wed, 7 Dec 2011 15:00:54 +0100 Subject: [erlang-patches] small fix to mnesia_log:ets2dcd() In-Reply-To: <4EDF56BA.9010305@gmail.com> References: <4EDF56BA.9010305@gmail.com> Message-ID: <4EDF7196.1050604@erlang.org> Thank you for the contribution, your patch is included in 'pu' On 12/07/2011 01:06 PM, Richard Carlsson wrote: > Use the synchronous log_terms instead of alog_terms in > mnesia_log:ets2dcd() > > This avoids the situation where mnesia could dump a very large ets > table in its entirety into the message queue of the disk_log process, > causing memory blowup and choking the disk logger. > > git fetch git://github.com/richcarl/otp.git mnesia_log-no-async > > /Richard > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- /Henrik Nord Erlang/OTP From henrik@REDACTED Wed Dec 7 15:02:54 2011 From: henrik@REDACTED (Henrik Nord) Date: Wed, 7 Dec 2011 15:02:54 +0100 Subject: [erlang-patches] add events for lock conflicts to mnesia In-Reply-To: <4EDF5CD0.2050005@gmail.com> References: <4EDF5CD0.2050005@gmail.com> Message-ID: <4EDF720E.5040008@erlang.org> Thank you for the contribuion! patch included in 'pu' On 12/07/2011 01:32 PM, Richard Carlsson wrote: > Generate mnesia events for conflicting locks > > This can help debugging situations where locks are causing problems. > Must be explicitly enabled by setting the environment variable > 'report_conflicting_locks' to true. > > git fetch git://github.com/richcarl/otp.git mnesia-lock-conflict-events > > /Richard > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- /Henrik Nord Erlang/OTP From egil@REDACTED Thu Dec 8 18:17:41 2011 From: egil@REDACTED (=?ISO-8859-1?Q?Bj=F6rn-Egil_Dahlberg?=) Date: Thu, 8 Dec 2011 18:17:41 +0100 Subject: [erlang-patches] fix erl_interface crash In-Reply-To: <4EA7DB54.6040402@erlang.org> References: <4EA7DB54.6040402@erlang.org> Message-ID: <4EE0F135.3050100@erlang.org> On 2011-10-26 12:05, Henrik Nord wrote: > On 10/26/2011 10:14 AM, Wei Cao wrote: >> Fix a crash in erl_interface. >> >> erl_interface use linux select() to get notified on socket events, >> which works when fd is less than 1024. >> >> however, when fd is larger than 1024, the fd_set structure on stack >> gets corrupted and the process crashes soon, >> >> this is possible when there are lots of connections kept or the >> process keeps creating new connect and closing it. >> >> >> git fetch git://github.com/weicao/otp.git >> erl_interface_replace_select_ >> with_poll >> >> >> https://github.com/weicao/otp/compare/erl_interface_replace_select_with_poll >> >> https://github.com/weicao/otp/compare/erl_interface_replace_select_with_poll.patch Though poll would be nice here it isn't supported on all platforms. For this patch to be accepted a configure test needs to be done to determine if poll exists and have select as a fallback if doesn't. // Bj?rn-Egil >> >> >> -- >> >> Best, >> >> Wei Cao >> >> >> _______________________________________________ >> erlang-patches mailing list >> erlang-patches@REDACTED >> http://erlang.org/mailman/listinfo/erlang-patches > Hi > 1. The commit msg is not conforming to the guidelines on how to write > a proper commit msg. > https://github.com/erlang/otp/wiki/Writing-good-commit-messages > > 2. could you add tests for this? > > > Thank you for the contribution! > > > -- > /Henrik Nord Erlang/OTP > > > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -------------- next part -------------- An HTML attachment was scrubbed... URL: From kruber@REDACTED Thu Dec 8 18:40:22 2011 From: kruber@REDACTED (Nico Kruber) Date: Thu, 08 Dec 2011 18:40:22 +0100 Subject: [erlang-patches] Fix for: extremely slow Erlang to/from Java communication via JInterface In-Reply-To: <1926567.ACSj03UWza@csr-pc40.zib.de> References: <10958143.tlbGcITqxT@csr-pc40.zib.de> <1926567.ACSj03UWza@csr-pc40.zib.de> Message-ID: <6711394.86zYY7ld3v@csr-pc40.zib.de> I haven't heard anything in a while. Has this patch been included for R15B? Or is there still something to do? Regards Nico Kruber On Wednesday 30 November 2011 14:21:29 Nico Kruber wrote: > thank you for that tip - I wasn't even aware of Arrays.copyOf being Java6 > only. > I replaced it by your code in my branch. > > > Nico > > On Wednesday 30 November 2011 12:35:14 Vlad Dumitrescu wrote: > > Hi, > > > > I think that it's easy to fix, just replace that line with > > > > final byte[] tmp = new byte[super.count]; > > System.arraycopy(super.buf, 0, tmp, 0, > > super.count); > > super.buf = tmp; > > > > regards, > > Vlad > > > > > > On Wed, Nov 30, 2011 at 12:29, Raimo Niskanen > > > > wrote: > > > On Wed, Nov 30, 2011 at 12:16:29PM +0100, Vlad Dumitrescu wrote: > > >> Hi! > > >> > > >> 2011/11/30 Nico Kruber : > > >> > We discovered, that the communication between Erlang and Java > > >> > is > > >> > extremely slow when sending longer lists. > > >> > > > >> > git fetch git://github.com/NicoK/otp.git > > >> > jinterface_better_buffer_alloc > > >> > > > >> > https://github.com/NicoK/otp/compare/jinterface_better_buffer_ > > >> > allo > > >> > c > > >> > https://github.com/NicoK/otp/compare/jinterface_better_buffer_ > > >> > allo > > >> > c.patch>> > > >> > > >> This patch uses Java 6 features. Isn't jinterface supporting even > > >> Java > > >> 5?> > > > > > > That is correct. JDK 1.5 is the least common denominator. > > > > > > Then it will not pass our tests. > > > > > > Is it the java.util.Arrays.copyOf method that is too new, or is > > > it more? Can the patch be rewritten? > > > > > >> regards, > > >> Vlad -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: From henrik@REDACTED Fri Dec 9 13:24:30 2011 From: henrik@REDACTED (Henrik Nord) Date: Fri, 9 Dec 2011 13:24:30 +0100 Subject: [erlang-patches] Fix for: extremely slow Erlang to/from Java communication via JInterface In-Reply-To: <6711394.86zYY7ld3v@csr-pc40.zib.de> References: <10958143.tlbGcITqxT@csr-pc40.zib.de> <1926567.ACSj03UWza@csr-pc40.zib.de> <6711394.86zYY7ld3v@csr-pc40.zib.de> Message-ID: <4EE1FDFE.6060501@erlang.org> Yes this patch is included for the R15B release. Thank you for the contribution, and sorry for the lack of response On 12/08/2011 06:40 PM, Nico Kruber wrote: > I haven't heard anything in a while. > > Has this patch been included for R15B? > Or is there still something to do? > > > Regards > Nico Kruber > > On Wednesday 30 November 2011 14:21:29 Nico Kruber wrote: >> thank you for that tip - I wasn't even aware of Arrays.copyOf being Java6 >> only. >> I replaced it by your code in my branch. >> >> >> Nico >> >> On Wednesday 30 November 2011 12:35:14 Vlad Dumitrescu wrote: >>> Hi, >>> >>> I think that it's easy to fix, just replace that line with >>> >>> final byte[] tmp = new byte[super.count]; >>> System.arraycopy(super.buf, 0, tmp, 0, >>> super.count); >>> super.buf = tmp; >>> >>> regards, >>> Vlad >>> >>> >>> On Wed, Nov 30, 2011 at 12:29, Raimo Niskanen >>> >>> wrote: >>>> On Wed, Nov 30, 2011 at 12:16:29PM +0100, Vlad Dumitrescu wrote: >>>>> Hi! >>>>> >>>>> 2011/11/30 Nico Kruber: >>>>>> We discovered, that the communication between Erlang and Java >>>>>> is >>>>>> extremely slow when sending longer lists. >>>>>> >>>>>> git fetch git://github.com/NicoK/otp.git >>>>>> jinterface_better_buffer_alloc >>>>>> >>>>>> https://github.com/NicoK/otp/compare/jinterface_better_buffer_ >>>>>> allo >>>>>> c >>>>>> https://github.com/NicoK/otp/compare/jinterface_better_buffer_ >>>>>> allo >>>>>> c.patch>> >>>>> This patch uses Java 6 features. Isn't jinterface supporting even >>>>> Java >>>>> 5?> >>>> That is correct. JDK 1.5 is the least common denominator. >>>> >>>> Then it will not pass our tests. >>>> >>>> Is it the java.util.Arrays.copyOf method that is too new, or is >>>> it more? Can the patch be rewritten? >>>> >>>>> regards, >>>>> Vlad >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 klas.johansson@REDACTED Sat Dec 10 11:17:49 2011 From: klas.johansson@REDACTED (Klas Johansson) Date: Sat, 10 Dec 2011 11:17:49 +0100 Subject: [erlang-patches] [PATCH] Updated erlang-flymake to recognize "deps" directory In-Reply-To: References: Message-ID: Hi, On Wed, Dec 7, 2011 at 8:46 AM, Kevin Albrecht wrote: > Here is my updated patch suggestion based on input. I fixed a typo in > the deps path and improved my commit message. I considered > additionally adding deps/*/include, deps/*/ebin, and deps/*/src as > include directories, but erlc's -I command line option does not > support wildcards, so this is not possible. You could expand the wildcards on the elisp side, using file-expand-wildcards. From the elisp man pages: file-expand-wildcards is a compiled Lisp function in `files.el'. (file-expand-wildcards PATTERN &optional FULL) Expand wildcard pattern PATTERN. This returns a list of file names which match the pattern. If PATTERN is written as an absolute file name, the values are absolute also. If PATTERN is written as a relative file name, it is interpreted relative to the current default directory, `default-directory'. The file names returned are normally also relative to the current default directory. However, if FULL is non-nil, they are absolute. I wouldn't add deps/*/src as deps/*/ebin as *include* dirs, but rather add: - deps/*/include to erlang-flymake-get-include-dirs - deps/*/ebin to erlang-flymake-get-code-path-dirs I noticed a quirk with rebar and dependencies a while back. Let's say application A depends on application B which depends on application C. Also assume A uses include_lib to include a file from B and that B uses include_lib to include a file from C. Last time I checked (some weeks ago) rebar didn't resolve these transitive dependencies when running eunit tests (i.e. the code path to C wouldn't automatically be added to the test runs for A), so I had to make A dependent of C. Cheers, Klas From aschultz@REDACTED Sat Dec 10 17:10:33 2011 From: aschultz@REDACTED (Andreas Schultz) Date: Sat, 10 Dec 2011 17:10:33 +0100 (CET) Subject: [erlang-patches] RFC: experimental TLS-1.2 support In-Reply-To: <2bd09727-1246-4b69-b2f9-6a2fba6e9fa8@office> Message-ID: <0cacf689-e287-448d-b04a-37dd812c7a5e@office> Hi, I would like to get some feedback and directions for further development on TLS-1.2 support for the SSL application. The current state of my work can be found here: git fetch git://github.com/RoadRunnr/otp.git tls12 https://github.com/RoadRunnr/otp/compare/tls12 https://github.com/RoadRunnr/otp/compare/tls12.patch TLS-1.2 connections work, but have only been tested with RSA certificates and RSA cipher suites. Anything else is broken, I'll explain in a minute why. This is all very alpha and contains tons of debug output. Ecliptic curve support is somewhere in my old tree, I'll add it back once the general implementation is sane. The changes to the crypto application are not really important and can eventually be reverted. They are only implementing some additional hashes that I needed, but that have been added in the meantime. A quick run through the changes: ================================ ssl_tls1.erl ------------ - mostly support for the pseudo random functions (PRF) required by TLS-1.2 TLS-1.0 used MD5+SHA for everything, since TLS-1.2 the minimum is SHA-256 - layout of some key exchange structures has changed ssl_handshake.erl ----------------- - use variable PRF function in pre- and master secret calculation - hashes of the handshake are not longer calculated during handshake, instead the handshake is recorded and the hash is calculate when need, before TLS-1.2 the hash was always MD5+SHA1, now it can be negotiated and TLS-1.2 has a minimum requirement of SHA-256 (same as PRF) this breaks TLS-1.0: - signature structures are now pre-pended by hash and signature id, around line 1050 - server_key_exchange uses RSA signatures, before it used a digest, around line 363 ssl_connection.erl ------------------ - moved handshake hashes to handshake history - extract PRF hashes from negotiated cipher (get_current_connection_state_prf and get_pending_connection_state_prf need verification) ssl_cipher.erl -------------- - new chiphers - extended cipher info (breaks API) - new IV handling for TLS-1.2 block ciphers Here is what I really need suggestions for: =========================================== - general code review (please, no comments yet on the white space changes and debug stuff, I'll fix them up later) ssl_connection.erl ------------------ - get_current_connection_state_prf/get_pending_connection_state_prf - the PRF depends on the negotiated cipher suite, but I'm note sure what the right state is to get that info from - hashsign_algorithm argument in state - this is needed to later support negotiating the hash and signature algorithm, does this make sense or should it go somewhere else? breakage in ssl_handshake.erl - this is the biggest problem ----------------------------------------------------------- Currently the version of the connection is not passed down to key_exchange and enc_hs. What is the best way to make them version aware? Move them to ssl_tlsv1, add a TLS version parameter or a encoding type parameter? The negotiation of the hash signature algorithm depends on the key material we have, this is currently done implicitly, but if we ever wish to support negotiating it, then we need better approach. That includes support for multiple server certificates (RSA, DSA and EC). My initial idea would be to go through the list of available certificates, build a list of private key types we have and offer that in the negotiation (probably fall back to some primary certificate if the connection is lower that TLS-1.2). I have not yet investigated where that logic should go or if it even makes sense. ssl_cipher.erl -------------- cipher info's have been extended to include the PRF hash. For TLS < 1.1, sha256 is treated as md5+sha. Is that ok? It does break the cipherinfo API! Andreas -- -- Dipl. Inform. Andreas Schultz email: as@REDACTED ------------------ managed broadband access ------------------ Travelping GmbH phone: +49-391-8190990 Roentgenstr. 13 fax: +49-391-819099299 D-39108 Magdeburg email: info@REDACTED GERMANY web: http://www.travelping.com Company Registration: HRB21276 Handelsregistergericht Chemnitz Geschaeftsfuehrer: Holger Winkelmann | VAT ID No.: DE236673780 -------------------------------------------------------------- From benmmurphy@REDACTED Sun Dec 11 19:29:51 2011 From: benmmurphy@REDACTED (Ben Murphy) Date: Sun, 11 Dec 2011 18:29:51 +0000 Subject: [erlang-patches] SSL Next Protocol Negotiation Patch Message-ID: I have a branch that implements Next Protocol Negotiation for SSL (http://technotes.googlecode.com/git/nextprotoneg.html). The protocol is requirement for SPDY which is an alternative to HTTP that google is pushing. git fetch git://github.com/benmmurphy/otp.git ssl_npn https://github.com/benmmurphy/otp/compare/ssl_npn https://github.com/benmmurphy/otp/compare/ssl_npn.patch I ran the SSL tests against 'OpenSSL 0.9.8r 8 Feb 2011' and they all passed but my npn tests were skipped because that version does not support npn. When i ran my tests against 'OpenSSL SNAP-20111130' my npn tests ran fine but another test failed (erlang_server_openssl_client_no_wrap_sequence_number). If i run master against that version of OpenSSL that test fails as well. It appears that OpenSSL client for that version will send the current session id as the suggested session id and this results in the session id not changing during renegotiation. Also, some of the openssl NPN tests will fail if they are run with a version of openssl that supports NPN and has a broken NPN renegotiation implementation. I think the 1.0.x series is like this. (change set where it was fixed in openssl: http://cvs.openssl.org/chngview?cn=21760) From ingela@REDACTED Mon Dec 12 10:37:13 2011 From: ingela@REDACTED (Ingela Anderton Andin) Date: Mon, 12 Dec 2011 10:37:13 +0100 Subject: [erlang-patches] RFC: experimental TLS-1.2 support In-Reply-To: <0cacf689-e287-448d-b04a-37dd812c7a5e@office> References: <0cacf689-e287-448d-b04a-37dd812c7a5e@office> Message-ID: <4EE5CB49.507@erix.ericsson.se> Hi! Firstly thank you very much for your efforts. We will have a closer look and get back to you with some feedback. Regards Ingela Erlang/OTP team - Ericsson AB Andreas Schultz wrote: > Hi, > > I would like to get some feedback and directions for further development > on TLS-1.2 support for the SSL application. > > The current state of my work can be found here: > > git fetch git://github.com/RoadRunnr/otp.git tls12 > > https://github.com/RoadRunnr/otp/compare/tls12 > https://github.com/RoadRunnr/otp/compare/tls12.patch > > TLS-1.2 connections work, but have only been tested with RSA certificates > and RSA cipher suites. Anything else is broken, I'll explain in a minute why. > > This is all very alpha and contains tons of debug output. Ecliptic curve > support is somewhere in my old tree, I'll add it back once the general > implementation is sane. > > The changes to the crypto application are not really important and can > eventually be reverted. They are only implementing some additional hashes > that I needed, but that have been added in the meantime. > > A quick run through the changes: > ================================ > > ssl_tls1.erl > ------------ > > - mostly support for the pseudo random functions (PRF) required by TLS-1.2 > TLS-1.0 used MD5+SHA for everything, since TLS-1.2 the minimum is SHA-256 > - layout of some key exchange structures has changed > > ssl_handshake.erl > ----------------- > > - use variable PRF function in pre- and master secret calculation > - hashes of the handshake are not longer calculated during handshake, instead > the handshake is recorded and the hash is calculate when need, before > TLS-1.2 the hash was always MD5+SHA1, now it can be negotiated and TLS-1.2 > has a minimum requirement of SHA-256 (same as PRF) > > this breaks TLS-1.0: > - signature structures are now pre-pended by hash and signature id, > around line 1050 > - server_key_exchange uses RSA signatures, before it used a digest, > around line 363 > > ssl_connection.erl > ------------------ > - moved handshake hashes to handshake history > - extract PRF hashes from negotiated cipher (get_current_connection_state_prf > and get_pending_connection_state_prf need verification) > > ssl_cipher.erl > -------------- > - new chiphers > - extended cipher info (breaks API) > - new IV handling for TLS-1.2 block ciphers > > > Here is what I really need suggestions for: > =========================================== > > - general code review (please, no comments yet on the white space changes and debug stuff, > I'll fix them up later) > > ssl_connection.erl > ------------------ > - get_current_connection_state_prf/get_pending_connection_state_prf - the PRF depends on > the negotiated cipher suite, but I'm note sure what the right state is to get that info > from > - hashsign_algorithm argument in state - this is needed to later support negotiating the > hash and signature algorithm, does this make sense or should it go somewhere else? > > breakage in ssl_handshake.erl - this is the biggest problem > ----------------------------------------------------------- > > Currently the version of the connection is not passed down to key_exchange and enc_hs. > What is the best way to make them version aware? Move them to ssl_tlsv1, add a TLS version > parameter or a encoding type parameter? > > The negotiation of the hash signature algorithm depends on the key material we have, this > is currently done implicitly, but if we ever wish to support negotiating it, then we need > better approach. That includes support for multiple server certificates (RSA, DSA and EC). > My initial idea would be to go through the list of available certificates, build a list > of private key types we have and offer that in the negotiation (probably fall back to some > primary certificate if the connection is lower that TLS-1.2). I have not yet investigated > where that logic should go or if it even makes sense. > > ssl_cipher.erl > -------------- > > cipher info's have been extended to include the PRF hash. For TLS < 1.1, sha256 is treated as > md5+sha. Is that ok? It does break the cipherinfo API! > > > Andreas > > From ingela@REDACTED Mon Dec 12 11:17:35 2011 From: ingela@REDACTED (Ingela Anderton Andin) Date: Mon, 12 Dec 2011 11:17:35 +0100 Subject: [erlang-patches] SSL Next Protocol Negotiation Patch In-Reply-To: References: Message-ID: <4EE5D4BF.8070703@erix.ericsson.se> Hi! Thank you for you contribution. We think it is interesting for inclusion, we will take a closer look and come back to you with more feedback ( see also comments below). Ben Murphy wrote: > I have a branch that implements Next Protocol Negotiation for SSL > (http://technotes.googlecode.com/git/nextprotoneg.html). The protocol > is requirement for SPDY which is an alternative to HTTP that google is > pushing. > > git fetch git://github.com/benmmurphy/otp.git ssl_npn > https://github.com/benmmurphy/otp/compare/ssl_npn > https://github.com/benmmurphy/otp/compare/ssl_npn.patch > > I ran the SSL tests against 'OpenSSL 0.9.8r 8 Feb 2011' and they all > passed but my npn tests were skipped because that version does not > support npn. When i ran my tests against 'OpenSSL SNAP-20111130' my > npn tests ran fine but another test failed > (erlang_server_openssl_client_no_wrap_sequence_number). Yes apparently the behavior of openssl has changed and the test case should be rewritten. Our corresponding test case for erlang client vs erlang server will explicitly turn of the reuse_session capability in the client. It is also possible to make the erlang-server reject the suggested reuse of the session maybe that will be the best way. The reason we do not want to reuse sessions here is to make the test case code simpler. As this is not related to your pach we will see to this. > If i run > master against that version of OpenSSL that test fails as well. It > appears that OpenSSL client for that version will send the current > session id as the suggested session id and this results in the session > id not changing during renegotiation. Also, some of the openssl NPN > tests will fail if they are run with a version of openssl that > supports NPN and has a broken NPN renegotiation implementation. I > think the 1.0.x series is like this. (change set where it was fixed in > openssl: http://cvs.openssl.org/chngview?cn=21760) > ______________________________________________ > The sane thing to do here is to skip the test cases for those openssl-versions. It would not be the first time. Regards Ingela Erlang/OTP team - Ericsson AB From henrik@REDACTED Mon Dec 12 15:45:17 2011 From: henrik@REDACTED (Henrik Nord) Date: Mon, 12 Dec 2011 15:45:17 +0100 Subject: [erlang-patches] SSL Next Protocol Negotiation Patch In-Reply-To: References: Message-ID: <4EE6137D.3060504@erlang.org> Hi Thank you for the contribution, I have included this branch in 'pu' for testing On 12/11/2011 07:29 PM, Ben Murphy wrote: > I have a branch that implements Next Protocol Negotiation for SSL > (http://technotes.googlecode.com/git/nextprotoneg.html). The protocol > is requirement for SPDY which is an alternative to HTTP that google is > pushing. > > git fetch git://github.com/benmmurphy/otp.git ssl_npn > https://github.com/benmmurphy/otp/compare/ssl_npn > https://github.com/benmmurphy/otp/compare/ssl_npn.patch > > I ran the SSL tests against 'OpenSSL 0.9.8r 8 Feb 2011' and they all > passed but my npn tests were skipped because that version does not > support npn. When i ran my tests against 'OpenSSL SNAP-20111130' my > npn tests ran fine but another test failed > (erlang_server_openssl_client_no_wrap_sequence_number). If i run > master against that version of OpenSSL that test fails as well. It > appears that OpenSSL client for that version will send the current > session id as the suggested session id and this results in the session > id not changing during renegotiation. Also, some of the openssl NPN > tests will fail if they are run with a version of openssl that > supports NPN and has a broken NPN renegotiation implementation. I > think the 1.0.x series is like this. (change set where it was fixed in > openssl: http://cvs.openssl.org/chngview?cn=21760) > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- /Henrik Nord Erlang/OTP From henrik@REDACTED Mon Dec 12 16:40:11 2011 From: henrik@REDACTED (Henrik Nord) Date: Mon, 12 Dec 2011 16:40:11 +0100 Subject: [erlang-patches] [erlang-questions] A potential fix for escript on Windows In-Reply-To: References: Message-ID: <4EE6205B.3090000@erlang.org> Email has not yet arrived so resending, This is included in 'pu' Thank you for the contribution On 11/25/2011 10:06 AM, Dave Cottlehuber wrote: > Hi EP, > > escript currently only supports being started as "escript.exe" from > the Windows command shell. The far more common "escript" which when > called directly from the Windows cmd.exe shell does not parse the > remaining arguments correctly. For comparison, you'd not type in > "dir.exe" on Windows much. > > I've also hit the same issue as Pierre whilst using rebar on Windows, > and he's agreed to allow me to submit his straightforward patch, now > against the R15A master branch, to support both styles: > > git fetch git://github.com/dch/otp.git dch-fix-win32-escript > > https://github.com/dch/otp/compare/dch-fix-win32-escript > https://github.com/dch/otp/compare/dch-fix-win32-escript.patch > > Thanks > Dave > > On 5 June 2011 00:33, Pierre Rouleau wrote: >> OK, I think I know why escript is not accepting scrips unless it's invoked >> as escript.exe. >> I took a look at erts/etc/common/escript.c which I believe is the source for >> escript. >> I think one of the problem under Windows is the fact that when escript's >> main() is looking for the escript basename, it does not consider that, under >> Windows, it could very well be escript (just as much as escript.exe). If >> the invocation line is "escript the_scrip_file.erl arguments", then escript >> thinks the argv[0] is the name of the script (instead of escript executable) >> and appends ".escript" to it. >> One way to solve this problem under Windows, from what I can tell so far, >> would be to check for escript.exe as well as escript under Windows, as the >> following patch to escript does (from the R14B03 source taken at >> erlang.org): >> >> @@ -377,7 +377,8 @@ >> last_opt = argv; >> >> #ifdef __WIN32__ >> - if (_stricmp(basename, "escript.exe") == 0) { >> + if ( (_stricmp(basename, "escript.exe") == 0) >> + ||(_stricmp(basename, "escript") == 0)) { >> #else >> if (strcmp(basename, "escript") == 0) { >> #endif >> >> I have not yet tested that patch (I am still downloading Cygwin's >> development package to be able to build Erlang from source on the Windows >> box). >> If I get it working, should I (and where should I) submit a patch to >> escript.c? >> Also, is there a bug tracker for Erlang where one can browse through bug >> reports, submit one and identify patches or is everything done through the >> mailing lists? I did not see links to a bug tracker in the erlang.org site >> except for a mention about submitting patches via github. >> And finally, is there a documented process for development? >> Thanks >> -- Pierre Rouleau >> _______________________________________________ >> erlang-questions mailing list >> erlang-questions@REDACTED >> http://erlang.org/mailman/listinfo/erlang-questions >> >> > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- /Henrik Nord Erlang/OTP From henrik@REDACTED Mon Dec 12 16:41:39 2011 From: henrik@REDACTED (Henrik Nord) Date: Mon, 12 Dec 2011 16:41:39 +0100 Subject: [erlang-patches] What's cooking in erlang/otp (2011-12-12) Message-ID: <201112121541.pBCFfbiw031174@smaug.otp.ericsson.se> After the release of R15B we will introduce the new 'maint' branch and the new 'maint-pu' branch for patches. See the wiki for more information about what branch to base your patch-branches upon. https://github.com/erlang/otp/wiki ------------------------------------------------------------ [Graduated] * ac/xpath-scan (xmerl) (2011-11-21) 1 commit + Treat , as special in xmerl_xpath_scan. (15925c0) * ao/fix-change-time-inval-dates (kernel) (2011-11-01) 1 commit + Fix a crash when file:change_time/2,3 are called with invalid dates (cddc88d) * jz/erts-unblock-fpe () (2011-12-02) 0 commits * ka/flymake_include_deps (tools) (2011-12-07) 1 commit + Add deps as erlang-flymake include directory. (c0bd297) * nk/jinterface_better_buffer_alloc (jinterface) (2011-11-30) 2 commits + restore Java5 compatibility (607ba45) + JInterface: improve OtpOutputStream buffer allocation (864faca) * rc/mnesia_log-no-async (mnesia) (2011-12-02) 1 commit + Use the synchronous log_terms instead of alog_terms in mnesia_log:ets2dcd() (336d579) * sa/dialyzer-fixes (dialyzer, hipe, kernel, typer) (2011-11-30) 7 commits + Correct callback spec in application module (832ce20) + Refine warning about callback specs with extra ranges (feeaaad) + Cleanup autoimport compiler directives (cf40c6a) + Fix Dialyzer's warnings in typer (ed1b052) + Fix Dialyzer's warning for its own code (572bc40) + Fix bug in Dialyzer's behaviours analysis (3f55d39) + Fix crash in Dialyzer (9949c1e) * sa/dialyzer-fixes-r15 (dialyzer, hipe, typer) (2011-11-28) 6 commits + Update inets test results (804f817) + Add file/line info in a particular Dialyzer crash (42c3c03) + Fix Dialyzer's warnings in HiPE (94ab93b) + Fix Dialyzer's warning for its own code (ac61d22) + Fix crash in Typer (18427c8) + No warnings for underspecs with remote types (804df7a) * sv/http-gen_tcp-long-lines () (2011-11-24) * ta/docs (configure.in.src , crypto, erts, hipe, inets, kernel, megaco, otp, reltool, sasl, ssl, stdlib, test_server, xmerl) (2011-12-05) 15 commits + Fix misspelling of chosen (f3052a3) + Fix typos in erl(1) (d507bcb) + Fix misspelling of 'turn off' (7381015) + Fix typo in reltool(3) (de28313) + Fix typo in gen_sctp(3) (1033c3c) + Fix typo in mod_responsecontrol.erl (c64874d) + Fix typo in erts_alloc(3) (f4f52a7) + Fix typos in ssl_cipher.erl (bcb385e) + Fix typos in expressions.xml (42a6821) + file: correct make_link/2 and make_symlink/2 docs (6a223b0) + Fix typo in test_server(3) (3a6b8ea) + Fix typos in io_protocol.xml (682e602) * tn/inet_drv-fix () (2011-11-30) * ta/sendfile (erts, kernel) (2011-01-13) 1 commit . Implement file:sendfile (0514afb) * jz/remove-variable-processes_busy (erts) (2011-11-02) 1 commit . erts: remove variable processes_busy (d428f18) Rewritten by Bj??rn ------------------------------------------------------------ [New topics] * 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) * jz/error-logic-efile_sendfile (erts) (2011-11-29) 1 commit - erts: minor fix for unnecessary condition (6581e8b) * jz/sendfile_chunk_size (erts) (2011-11-29) 1 commit - erts: change SENDFILE_CHUNK_SIZE from signed to unsigned (a94aded) * rc/mnesia-lock-conflict-events (mnesia) (2011-11-28) 1 commit - Generate mnesia events for conflicting locks (1cad437) * vd/java-string-bug (jinterface) (2011-11-13) 2 commits - add test for Java string bug (e01d6f3) - workaround for Java bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6242664 (a30445c) ------------------------------------------------------------ [Stalled] * bw/efile_exists (erts) (2010-10-07) 1 commit - prim_file:exists/{1,2} which is lightweight file existence check (2759905) Action expected from: Topic author ------------------------------------------------------------ [Cooking] * bg/temp-hipe-fixes (compiler, kernel) (2010-03-15) 5 commits - Avoid crash by skipping compilation_SUITE:on_load/1 (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. * av/maint-memsup (os_mon) (2011-11-08) 1 commit - Fix segmentation fault in memsup (a95ebdd) * hw/asn1rt_check-transform (asn1) (2011-10-15) 1 commit - asn1rt_check: Fix transform_to_EXTERNAL1990 for binary input (6a69602) * mh/create_cookie_error_msg (kernel) (2011-09-15) 1 commit - Specify file name and error on create_cookie failure (9319587) * mh/eunit_surefire-fixture-errors (eunit) (2011-03-10) 1 commit - Include fixture setup and cleanup errors in Eunit Surefire report (7425075) * mh/run_erl-exit-status (erts) (2011-11-29) 1 commit - run_erl.c: propagate exit status from child process (bd15706) * sg/fix-snmp_note_store-timer (snmp) (2011-11-08) 2 commits - snmp: add regression test for GC timer (597ce3c) - snmp: fix GC timer in snmp_note_store (09816ca) * ta/prim_archive-reloading-mfa (erts, kernel, stdlib) (2011-10-19) 2 commits - escript_SUITE: remove gratuitous space (3d89996) - [erts,kernel,stdlib] fix escript/primary archive reloading (4ac74ce) * uw/extending_gen (stdlib) (2011-01-17) 1 commit - Add plugin support for alternative name lookup (b042673) * vd/jinterface-atom-message (jinterface) (2011-11-11) 1 commit - Improve error message when creating a too long OtpErlangAtom (334d636) * wc/fix-eunit-print-stacktrace (eunit) (2011-11-02) 1 commit - fix eunit to print stacktrace correctly if test cases throw any exception (73b94a9) * ws/erl-xcomp-avr32 (otp) (2011-11-01) 1 commit - Update xcomp config for AVR32/buildroot-v3.0.0 (e89c2af) ------------------------------------------------------------ [Dropped] * fm/posix-fallocate (erts, kernel) (2010-12-28) 1 commit . Added file:allocate/2 (7b39f0f) Temporary dropped due to massive merge conflicts Needs rebase, and testfixes. * 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) Temporary dropped, Needs some work * jn/gen_stream (stdlib) (2011-04-15) 2 commits . Update gen_stream tests to conform with common_test standard (ce84daf) . Add gen_stream behaviour (6a089a4) Technical board decision: Code is ok, but the functionality is not general enough to be included in OTP. It can without problems be maintained outside of OTP. * ms/epmd-IPv6-node-reg (erts, kernel) (2011-06-03) 1 commit . epmd: support IPv6 node registration (5523b21) Crashing windows From aidanhs@REDACTED Wed Dec 14 03:45:08 2011 From: aidanhs@REDACTED (Aidan Hobson Sayers) Date: Wed, 14 Dec 2011 02:45:08 +0000 Subject: [erlang-patches] Put gb_trees documentation into alphabetical order Message-ID: Puts lookup/2 in the gb_trees documentation in the correct place. git fetch git://github.com/aidanhs/otp.git fix_gb_trees_doc Aidan From carlos.varela.paz@REDACTED Fri Dec 16 09:58:47 2011 From: carlos.varela.paz@REDACTED (Carlos Varela) Date: Fri, 16 Dec 2011 09:58:47 +0100 Subject: [erlang-patches] Update timezone information before convert the Epoch time to reflect system configuration changes In-Reply-To: References: Message-ID: Hi, I sent this patch to the lists few weeks ago and I hadn't any feedback. Was this patch rejected? is not of interest? Regards, Carlos 2011/11/30 Carlos Varela > Details in the commit message: > > git fetch git://github.com/carlosvarelap/otp.gitupdate_localtime_configuration > > https://github.com/carlosvarelap/otp/compare/update_localtime_configuration > > https://github.com/carlosvarelap/otp/compare/update_localtime_configuration.patch > > Regards, > Carlos > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bookjovi@REDACTED Fri Dec 16 11:13:19 2011 From: bookjovi@REDACTED (Jovi Zhang) Date: Fri, 16 Dec 2011 18:13:19 +0800 Subject: [erlang-patches] [PATCH] erts: reduce smp locking time range in erts_garbage_collect Message-ID: >From f8bb268d962808c6e64545afbbd0d2b0257afdb7 Mon Sep 17 00:00:00 2001 From: Jovi Zhang Date: Fri, 9 Dec 2011 05:46:45 +0800 Subject: [PATCH] erts: reduce smp locking time range in erts_garbage_collect get_now should be use out of process status locking, then it can reduce smp locking time range in here. --- erts/emulator/beam/erl_gc.c | ? ?3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c index eb2b945..bcda3bf 100644 --- a/erts/emulator/beam/erl_gc.c +++ b/erts/emulator/beam/erl_gc.c @@ -357,10 +357,11 @@ erts_garbage_collect(Process* p, int need, Eterm* objv, int nobj) ? ? erts_smp_proc_lock(p, ERTS_PROC_LOCK_STATUS); ? ? p->gcstatus = p->status; ? ? p->status = P_GARBING; + ? ?erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS); + ? ? if (erts_system_monitor_long_gc != 0) { ? ? ? ?get_now(&ms1, &s1, &us1); ? ? } - ? ?erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS); ? ? ERTS_CHK_OFFHEAP(p); -- 1.7.2.3 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-erts-reduce-smp-locking-time-range-in-erts_garbage_c.patch Type: application/octet-stream Size: 1020 bytes Desc: not available URL: From henrik@REDACTED Mon Dec 19 16:47:56 2011 From: henrik@REDACTED (Henrik Nord) Date: Mon, 19 Dec 2011 16:47:56 +0100 Subject: [erlang-patches] Update timezone information before convert the Epoch time to reflect system configuration changes In-Reply-To: References: Message-ID: <4EEF5CAC.1010809@erlang.org> I have not merged any new patches to 'pu' as the release was in the works. I will take a look at this as soon as we are back up with the test builds. in the meantime you might want to correct the commit msg so that it conforms to the guidelines on the github wiki page: https://github.com/erlang/otp/wiki/Writing-good-commit-messages Thank you for the contribution! On 12/16/2011 09:58 AM, Carlos Varela wrote: > Hi, > > I sent this patch to the lists few weeks ago and I hadn't any > feedback. Was this patch rejected? is not of interest? > > Regards, > Carlos > > 2011/11/30 Carlos Varela > > > Details in the commit message: > > git fetch git://github.com/carlosvarelap/otp.git > > update_localtime_configuration > > https://github.com/carlosvarelap/otp/compare/update_localtime_configuration > https://github.com/carlosvarelap/otp/compare/update_localtime_configuration.patch > > Regards, > Carlos > > > > > _______________________________________________ > 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 spring.ru@REDACTED Mon Dec 19 18:35:21 2011 From: spring.ru@REDACTED (=?KOI8-R?B?7cHL08nNIPrSwdbF19PLyco=?=) Date: Mon, 19 Dec 2011 21:35:21 +0400 Subject: [erlang-patches] ODBC PATCH: supports param_query with 'null' Message-ID: Hello! I'm patched odbc application: 1) Support atom 'null' in odbc:param_query as database NULL value 2) Fix "ODBC: received unexpected info:{tcp_closed, ...}" when connection is terminating. 3) Fix possible access violation with 64bit ODBC. It was tested on Windows 7 32 and 64. -- ? ?????????, ?????????? ?????? ?????????????. Regards, Maxim Zrazhevskiy. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: odbc.patch Type: application/octet-stream Size: 9137 bytes Desc: not available URL: From henrik@REDACTED Tue Dec 20 11:21:33 2011 From: henrik@REDACTED (Henrik Nord) Date: Tue, 20 Dec 2011 11:21:33 +0100 Subject: [erlang-patches] Put gb_trees documentation into alphabetical order In-Reply-To: References: Message-ID: <4EF061AD.1070700@erlang.org> Thank you for the contribution, your patch is included in 'pu' On 12/14/2011 03:45 AM, Aidan Hobson Sayers wrote: > Puts lookup/2 in the gb_trees documentation in the correct place. > > git fetch git://github.com/aidanhs/otp.git fix_gb_trees_doc > > Aidan > _______________________________________________ > erlang-patches mailing list > erlang-patches@REDACTED > http://erlang.org/mailman/listinfo/erlang-patches -- /Henrik Nord Erlang/OTP From henrik@REDACTED Tue Dec 20 12:14:49 2011 From: henrik@REDACTED (Henrik Nord) Date: Tue, 20 Dec 2011 12:14:49 +0100 Subject: [erlang-patches] [PATCH] erts: reduce smp locking time range in erts_garbage_collect In-Reply-To: References: Message-ID: <4EF06E29.8090105@erlang.org> Thank you for the contribution! patch included in 'pu' for testing On 12/16/2011 11:13 AM, Jovi Zhang wrote: > > From f8bb268d962808c6e64545afbbd0d2b0257afdb7 Mon Sep 17 00:00:00 2001 > From: Jovi Zhang > Date: Fri, 9 Dec 2011 05:46:45 +0800 > Subject: [PATCH] erts: reduce smp locking time range in erts_garbage_collect > > get_now should be use out of process status locking, then > it can reduce smp locking time range in here. > --- > erts/emulator/beam/erl_gc.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c > index eb2b945..bcda3bf 100644 > --- a/erts/emulator/beam/erl_gc.c > +++ b/erts/emulator/beam/erl_gc.c > @@ -357,10 +357,11 @@ erts_garbage_collect(Process* p, int need, > Eterm* objv, int nobj) > erts_smp_proc_lock(p, ERTS_PROC_LOCK_STATUS); > p->gcstatus = p->status; > p->status = P_GARBING; > + erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS); > + > if (erts_system_monitor_long_gc != 0) { > get_now(&ms1,&s1,&us1); > } > - erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS); > > ERTS_CHK_OFFHEAP(p); > > -- > 1.7.2.3 > > > _______________________________________________ > 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 carlos.varela.paz@REDACTED Tue Dec 20 17:45:02 2011 From: carlos.varela.paz@REDACTED (Carlos Varela) Date: Tue, 20 Dec 2011 17:45:02 +0100 Subject: [erlang-patches] Update timezone information before convert the Epoch time to reflect system configuration changes In-Reply-To: <4EEF5CAC.1010809@erlang.org> References: <4EEF5CAC.1010809@erlang.org> Message-ID: Hi, The commit is corrected. I think now it conforms :) Carlos 2011/12/19 Henrik Nord > I have not merged any new patches to 'pu' as the release was in the > works. I will take a look at this as soon as we are back up with the test > builds. > > in the meantime you might want to correct the commit msg so that it > conforms to the guidelines on the github wiki page: > https://github.com/erlang/otp/wiki/Writing-good-commit-messages > > > Thank you for the contribution! > > > On 12/16/2011 09:58 AM, Carlos Varela wrote: > > Hi, > > I sent this patch to the lists few weeks ago and I hadn't any feedback. > Was this patch rejected? is not of interest? > > Regards, > Carlos > > 2011/11/30 Carlos Varela > >> Details in the commit message: >> >> git fetch git://github.com/carlosvarelap/otp.gitupdate_localtime_configuration >> >> >> https://github.com/carlosvarelap/otp/compare/update_localtime_configuration >> >> https://github.com/carlosvarelap/otp/compare/update_localtime_configuration.patch >> >> Regards, >> Carlos >> > > > > _______________________________________________ > erlang-patches mailing listerlang-patches@REDACTED://erlang.org/mailman/listinfo/erlang-patches > > > -- > /Henrik Nord Erlang/OTP > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bookjovi@REDACTED Wed Dec 21 09:59:37 2011 From: bookjovi@REDACTED (Jovi Zhang) Date: Wed, 21 Dec 2011 16:59:37 +0800 Subject: [erlang-patches] [PATCH] erts: Remove unused variable Message-ID: >From 6a4dce0c02fdbeface3b698e3ca32d5c474004ce Mon Sep 17 00:00:00 2001 From: Jovi Zhang Date: Wed, 14 Dec 2011 02:43:21 +0800 Subject: [PATCH] erts: Remove unused variable Remove unused variable erts_system_monitor_msg_queue_len --- erts/emulator/beam/erl_process.c | ? ?1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index b8c6b64..b420f90 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -228,7 +228,6 @@ static Uint last_reductions; static Uint last_exact_reductions; Uint erts_default_process_flags; Eterm erts_system_monitor; -Eterm erts_system_monitor_msg_queue_len; Eterm erts_system_monitor_long_gc; Eterm erts_system_monitor_large_heap; struct erts_system_monitor_flags_t erts_system_monitor_flags; -- 1.7.2.3 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-erts-Remove-unused-variable.patch Type: application/octet-stream Size: 878 bytes Desc: not available URL: From henrik@REDACTED Wed Dec 21 10:46:26 2011 From: henrik@REDACTED (Henrik Nord) Date: Wed, 21 Dec 2011 10:46:26 +0100 Subject: [erlang-patches] [PATCH] erts: Remove unused variable In-Reply-To: References: Message-ID: <4EF1AAF2.7070307@erlang.org> Thank you, I have included your patch in 'pu' On 12/21/2011 09:59 AM, Jovi Zhang wrote: > > From 6a4dce0c02fdbeface3b698e3ca32d5c474004ce Mon Sep 17 00:00:00 2001 > From: Jovi Zhang > Date: Wed, 14 Dec 2011 02:43:21 +0800 > Subject: [PATCH] erts: Remove unused variable > > Remove unused variable erts_system_monitor_msg_queue_len > --- > erts/emulator/beam/erl_process.c | 1 - > 1 files changed, 0 insertions(+), 1 deletions(-) > > diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c > index b8c6b64..b420f90 100644 > --- a/erts/emulator/beam/erl_process.c > +++ b/erts/emulator/beam/erl_process.c > @@ -228,7 +228,6 @@ static Uint last_reductions; > static Uint last_exact_reductions; > Uint erts_default_process_flags; > Eterm erts_system_monitor; > -Eterm erts_system_monitor_msg_queue_len; > Eterm erts_system_monitor_long_gc; > Eterm erts_system_monitor_large_heap; > struct erts_system_monitor_flags_t erts_system_monitor_flags; > -- > 1.7.2.3 > > > _______________________________________________ > 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 Wed Dec 21 15:17:59 2011 From: henrik@REDACTED (Henrik Nord) Date: Wed, 21 Dec 2011 15:17:59 +0100 Subject: [erlang-patches] Update timezone information before convert the Epoch time to reflect system configuration changes In-Reply-To: References: Message-ID: <4EF1EA97.4080509@erlang.org> Thank you for the changes, I have now included this patch in 'pu' On 11/30/2011 02:20 PM, Carlos Varela wrote: > Details in the commit message: > > git fetch git://github.com/carlosvarelap/otp.git > update_localtime_configuration > > https://github.com/carlosvarelap/otp/compare/update_localtime_configuration > https://github.com/carlosvarelap/otp/compare/update_localtime_configuration.patch > > Regards, > Carlos > > > _______________________________________________ > 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 Wed Dec 21 15:35:31 2011 From: henrik@REDACTED (Henrik Nord) Date: Wed, 21 Dec 2011 15:35:31 +0100 Subject: [erlang-patches] ODBC PATCH: supports param_query with 'null' In-Reply-To: References: Message-ID: <4EF1EEB3.8000107@erlang.org> Hi! After some work, I managed to apply your mailpatch. It would be better if you could send them as git fetch links in the future due to the extra effort needed for mail patches. I have now included this in 'pu' for initial testing. Thank you for the contribution! On 12/19/2011 06:35 PM, ?????? ?????????? wrote: > Hello! > I'm patched odbc application: > 1) Support atom 'null' in odbc:param_query as database NULL value > 2) Fix "ODBC: received unexpected info:{tcp_closed, ...}" when > connection is terminating. > 3) Fix possible access violation with 64bit ODBC. > > It was tested on Windows 7 32 and 64. > -- > ? ?????????, > ?????????? ?????? ?????????????. > > Regards, > Maxim Zrazhevskiy. > > > > > _______________________________________________ > 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 bookjovi@REDACTED Fri Dec 23 10:16:37 2011 From: bookjovi@REDACTED (Jovi Zhang) Date: Fri, 23 Dec 2011 17:16:37 +0800 Subject: [erlang-patches] [PATCH] erts: mtrace: use mutex lock correctly Message-ID: >From 6ef85dd92e7bbf9de4dbb4d676348023458481d8 Mon Sep 17 00:00:00 2001 From: Jovi Zhang Date: Fri, 16 Dec 2011 04:54:49 +0800 Subject: [PATCH] erts: mtrace: use mutex lock correctly mtrace_op_mutex and mtrace_buf_mutex should be use under protect of erts_mtrace_enabled --- erts/emulator/beam/erl_mtrace.c | ? 33 +++++++++++++++++++-------------- 1 files changed, 19 insertions(+), 14 deletions(-) diff --git a/erts/emulator/beam/erl_mtrace.c b/erts/emulator/beam/erl_mtrace.c index 358c67b..c97ac5b 100644 --- a/erts/emulator/beam/erl_mtrace.c +++ b/erts/emulator/beam/erl_mtrace.c @@ -641,9 +641,10 @@ erts_mtrace_install_wrapper_functions(void) void erts_mtrace_stop(void) { - ? ?erts_mtx_lock(&mtrace_op_mutex); - ? ?erts_mtx_lock(&mtrace_buf_mutex); ? ? if (erts_mtrace_enabled) { + ? ? ? ?erts_mtx_lock(&mtrace_op_mutex); + ? ? ? ?erts_mtx_lock(&mtrace_buf_mutex); + ? ? ? ?Uint32 ti = get_time_inc(); ? ? ? ?if (ti != INVALID_TIME_INC @@ -669,17 +670,18 @@ erts_mtrace_stop(void) ? ? ? ? ? ? ? ?socket_desc = ERTS_SOCK_INVALID_SOCKET; ? ? ? ? ? ?} ? ? ? ?} + ? ? ? ?erts_mtx_unlock(&mtrace_buf_mutex); + ? ? ? ?erts_mtx_unlock(&mtrace_op_mutex); ? ? } - ? ?erts_mtx_unlock(&mtrace_buf_mutex); - ? ?erts_mtx_unlock(&mtrace_op_mutex); } void erts_mtrace_exit(Uint32 exit_value) { - ? ?erts_mtx_lock(&mtrace_op_mutex); - ? ?erts_mtx_lock(&mtrace_buf_mutex); ? ? if (erts_mtrace_enabled) { + ? ? ? ?erts_mtx_lock(&mtrace_op_mutex); + ? ? ? ?erts_mtx_lock(&mtrace_buf_mutex); + ? ? ? ?Uint32 ti = get_time_inc(); ? ? ? ?if (ti != INVALID_TIME_INC @@ -709,9 +711,9 @@ erts_mtrace_exit(Uint32 exit_value) ? ? ? ? ? ? ? ?socket_desc = ERTS_SOCK_INVALID_SOCKET; ? ? ? ? ? ?} ? ? ? ?} + ? ? ? ?erts_mtx_unlock(&mtrace_buf_mutex); + ? ? ? ?erts_mtx_unlock(&mtrace_op_mutex); ? ? } - ? ?erts_mtx_unlock(&mtrace_buf_mutex); - ? ?erts_mtx_unlock(&mtrace_op_mutex); } static ERTS_INLINE void @@ -721,8 +723,9 @@ write_alloc_entry(byte tag, ? ? ? ? ? ? ? ? ?ErtsAlcType_t y, ? ? ? ? ? ? ? ? ?Uint size) { - ? ?erts_mtx_lock(&mtrace_buf_mutex); ? ? if (erts_mtrace_enabled) { + ? ? ? ?erts_mtx_lock(&mtrace_buf_mutex); + ? ? ? ?Uint32 ti = get_time_inc(); ? ? ? ?if (ti != INVALID_TIME_INC @@ -784,8 +787,8 @@ write_alloc_entry(byte tag, ? ? ? ?} + ? ? ? ?erts_mtx_unlock(&mtrace_buf_mutex); ? ? } - ? ?erts_mtx_unlock(&mtrace_buf_mutex); } @@ -797,8 +800,9 @@ write_realloc_entry(byte tag, ? ? ? ? ? ? ? ? ? ?void *ptr, ? ? ? ? ? ? ? ? ? ?Uint size) { - ? ?erts_mtx_lock(&mtrace_buf_mutex); ? ? if (erts_mtrace_enabled) { + ? ? ? ?erts_mtx_lock(&mtrace_buf_mutex); + ? ? ? ?Uint32 ti = get_time_inc(); ? ? ? ?if (ti != INVALID_TIME_INC @@ -864,8 +868,8 @@ write_realloc_entry(byte tag, #endif ? ? ? ?} + ? ? ? ?erts_mtx_unlock(&mtrace_buf_mutex); ? ? } - ? ?erts_mtx_unlock(&mtrace_buf_mutex); } static ERTS_INLINE void @@ -874,8 +878,9 @@ write_free_entry(byte tag, ? ? ? ? ? ? ? ? ErtsAlcType_t y, ? ? ? ? ? ? ? ? void *ptr) { - ? ?erts_mtx_lock(&mtrace_buf_mutex); ? ? if (erts_mtrace_enabled) { + ? ? ? ?erts_mtx_lock(&mtrace_buf_mutex); + ? ? ? ?Uint32 ti = get_time_inc(); ? ? ? ?if (ti != INVALID_TIME_INC @@ -931,8 +936,8 @@ write_free_entry(byte tag, #endif ? ? ? ?} + ? ? ? ?erts_mtx_unlock(&mtrace_buf_mutex); ? ? } - ? ?erts_mtx_unlock(&mtrace_buf_mutex); } static void * -- 1.7.2.3 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-erts-mtrace-use-mutex-lock-correctly.patch Type: application/octet-stream Size: 3199 bytes Desc: not available URL: From bookjovi@REDACTED Wed Dec 28 08:56:56 2011 From: bookjovi@REDACTED (Jovi Zhang) Date: Wed, 28 Dec 2011 15:56:56 +0800 Subject: [erlang-patches] [PATCH] erts: fix error handling in bif erlang:start_timer/3 Message-ID: >From 18612f43f0c8a6f217806c22c9f9bec8b0de4b26 Mon Sep 17 00:00:00 2001 From: Jovi Zhang Date: Wed, 21 Dec 2011 03:26:03 +0800 Subject: [PATCH] erts: fix error handling in bif erlang:start_timer/3 See below, When recevier pid is non-exist, start_timer/3 return a valid internal Ref, this is wrong, erlang should return badarg instead. Eshell V5.9 ?(abort with ^G) 1> A = erlang:start_timer(100*1000, pid(0, 9999, 0), {none}). Ref<0.0.0.29> 2> erlang:read_timer(A). false 3> --- erts/emulator/beam/erl_bif_timer.c | ? ?2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/erts/emulator/beam/erl_bif_timer.c b/erts/emulator/beam/erl_bif_timer.c index a922a33..7bd2b8e 100644 --- a/erts/emulator/beam/erl_bif_timer.c +++ b/erts/emulator/beam/erl_bif_timer.c @@ -414,7 +414,7 @@ setup_bif_timer(Uint32 xflags, ? ? ? ?rp = erts_pid2proc(c_p, ERTS_PROC_LOCK_MAIN, ? ? ? ? ? ? ? ? ? ? ? ? ? receiver, ERTS_PROC_LOCK_MSGQ); ? ? ? ?if (!rp) - ? ? ? ? ? return ref; + ? ? ? ? ? return THE_NON_VALUE; ? ? } ? ? if (timeout < ERTS_ALC_MIN_LONG_LIVED_TIME) { -- 1.7.2.3 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-erts-fix-error-handling-in-bif-erlang-start_timer-3.patch Type: application/octet-stream Size: 1061 bytes Desc: not available URL: From tomas.abrahamsson@REDACTED Fri Dec 30 21:10:58 2011 From: tomas.abrahamsson@REDACTED (Tomas Abrahamsson) Date: Fri, 30 Dec 2011 21:10:58 +0100 Subject: [erlang-patches] [PATCH] Fix SCTP multihoming for IPv6 Message-ID: <1325275858-13477-1-git-send-email-tomas.abrahamsson@gmail.com> Setting several ip addresses for an SCTP socket worked for IPv4, but for IPv6 the call to gen_sctp:open/1 failed with badarg. --- erts/emulator/drivers/common/inet_drv.c | 12 +++--- lib/kernel/test/gen_sctp_SUITE.erl | 64 ++++++++++++++++++++++++++++++- 2 files changed, 68 insertions(+), 8 deletions(-) diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c index eeaa4d2..f712653 100644 --- a/erts/emulator/drivers/common/inet_drv.c +++ b/erts/emulator/drivers/common/inet_drv.c @@ -10111,8 +10111,9 @@ static ErlDrvSSizeT packet_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf, /* Construct the list of addresses we bind to. The curr limit is 256 addrs. Buff structure: Flags(1), ListItem,...: */ - struct sockaddr addrs[256]; + inet_address addrs[256]; char* curr; + char* addr_dest; int add_flag, n, rflag; if (!IS_SCTP(desc)) @@ -10122,6 +10123,7 @@ static ErlDrvSSizeT packet_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf, add_flag = get_int8(curr); curr++; + addr_dest = (char *)addrs; for(n=0; n < 256 && curr < buf+len; n++) { /* List item format: Port(2), IP(4|16) -- compatible with @@ -10132,16 +10134,14 @@ static ErlDrvSSizeT packet_inet_ctl(ErlDrvData e, unsigned int cmd, char* buf, if (curr == NULL) return ctl_error(EINVAL, rbuf, rsize); - /* Now: we need to squeeze "tmp" into the size of "sockaddr", - which is smaller than "tmp" for IPv6 (extra IN6 info will - be cut off): */ - memcpy(addrs + n, &tmp, sizeof(struct sockaddr)); + memcpy(addr_dest, &tmp, alen); + addr_dest += alen; } /* Make the real flags: */ rflag = add_flag ? SCTP_BINDX_ADD_ADDR : SCTP_BINDX_REM_ADDR; /* Invoke the call: */ - if (p_sctp_bindx(desc->s, addrs, n, rflag) < 0) + if (p_sctp_bindx(desc->s, (struct sockaddr *)addrs, n, rflag) < 0) return ctl_error(sock_errno(), rbuf, rsize); desc->state = INET_STATE_BOUND; diff --git a/lib/kernel/test/gen_sctp_SUITE.erl b/lib/kernel/test/gen_sctp_SUITE.erl index 8f490b6..6d6b154 100644 --- a/lib/kernel/test/gen_sctp_SUITE.erl +++ b/lib/kernel/test/gen_sctp_SUITE.erl @@ -31,14 +31,16 @@ [basic/1, api_open_close/1,api_listen/1,api_connect_init/1,api_opts/1, xfer_min/1,xfer_active/1,def_sndrcvinfo/1,implicit_inet6/1, - basic_stream/1, xfer_stream_min/1, peeloff/1, buffers/1]). + basic_stream/1, xfer_stream_min/1, peeloff/1, buffers/1, + open_multihoming_ipv4_socket/1, open_multihoming_ipv6_socket/1]). suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> [basic, api_open_close, api_listen, api_connect_init, api_opts, xfer_min, xfer_active, def_sndrcvinfo, implicit_inet6, - basic_stream, xfer_stream_min, peeloff, buffers]. + basic_stream, xfer_stream_min, peeloff, buffers, + open_multihoming_ipv4_socket, open_multihoming_ipv6_socket]. groups() -> []. @@ -1329,3 +1331,61 @@ match_unless_solaris(A, B) -> {unix,sunos} -> B; _ -> A = B end. + +open_multihoming_ipv4_socket(doc) -> + "Test opening a multihoming ipv4 socket"; +open_multihoming_ipv4_socket(suite) -> + []; +open_multihoming_ipv4_socket(Config) when is_list(Config) -> + ?line Hostname = ok(inet:gethostname()), + ?line HostAddrIPv4 = ok(inet:getaddr(Hostname, inet)), + ?line S = ok(gen_sctp:open(0, [{ip,HostAddrIPv4},{ip,{127,0,0,1}}])), + ?line ok = gen_sctp:listen(S, true), + ?line setup_connection(S, HostAddrIPv4, inet), + ?line ok = gen_sctp:close(S). + +open_multihoming_ipv6_socket(doc) -> + "Test opening a multihoming ipv6 socket"; +open_multihoming_ipv6_socket(suite) -> + []; +open_multihoming_ipv6_socket(Config) when is_list(Config) -> + ?line Hostname = ok(inet:gethostname()), + ?line LoopbackIPv6 = {0,0,0,0,0,0,0,1}, + ?line + case inet:getaddr(Hostname, inet6) of + {ok,HostAddrIPv6} when HostAddrIPv6 =/= LoopbackIPv6 -> + ?line + case is_good_ipv6_address(HostAddrIPv6) of + true -> + ?line io:format("using ipv6 addresses ~p and ~p~n", + [HostAddrIPv6, LoopbackIPv6]), + ?line S = ok(gen_sctp:open( + 0, [{ip,HostAddrIPv6}, + {ip,LoopbackIPv6}, inet6])), + ?line ok = gen_sctp:listen(S, true), + ?line setup_connection(S, HostAddrIPv6, inet6), + ?line ok = gen_sctp:close(S); + false -> + {skip,"Need 2 good IPv6 addresses"} + end; + {ok,HostAddrIPv6} when HostAddrIPv6 =:= LoopbackIPv6 -> + {skip,"Need 2 different IPv6 addresses, found only ::1"}; + {error,eafnosupport} -> + {skip,"Can not look up IPv6 address"} + end. + +is_good_ipv6_address({0,0,0,0,0,16#ffff,_,_}) -> false; %% ipv4 mapped +is_good_ipv6_address({16#fe80,_,_,_,_,_,_,_}) -> false; %% link-local +is_good_ipv6_address(_) -> true. + +setup_connection(S1, Addr, IpFamily) -> + ?line P1 = ok(inet:port(S1)), + ?line S2 = ok(gen_sctp:open(0, [IpFamily])), + ?line P2 = ok(inet:port(S2)), + ?line #sctp_assoc_change{state=comm_up} = + ok(gen_sctp:connect(S2, Addr, P1, [])), + ?line case ok(gen_sctp:recv(S1)) of + {Addr,P2,[],#sctp_assoc_change{state=comm_up}} -> + ok + end, + ?line ok = gen_sctp:close(S2). -- 1.7.5.4 From jimenezrick@REDACTED Sat Dec 31 20:26:35 2011 From: jimenezrick@REDACTED (Ricardo Catalinas =?iso-8859-1?Q?Jim=E9nez?=) Date: Sat, 31 Dec 2011 20:26:35 +0100 Subject: [erlang-patches] Fixes value returned by mnesia_loader:do_get_disc_copy2/4 Message-ID: <20111231192635.GB28849@viper.local> Returns the same value for `mnesia_loader:disc_load_table/2' as `mnesia_loader:net_load_table/4' if a table copy can not be found. This patch was stuck as a pull request in GitHub (authored by Uwe Dauernheim): https://github.com/erlang/otp/pull/16 Please fetch: git fetch git://github.com/jimenezrick/otp.git fix-return-do_get_disc_copy2 Review here: https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-return-do_get_disc_copy2 https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-return-do_get_disc_copy2.patch Regards -- Ricardo (http://r.untroubled.be/)