From fe136cedb9f5d627e5b21934a48c97ff62f4c50e Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 28 Mar 2013 00:10:44 +0100 Subject: [PATCH 1/5] build: disable -Wstrict-aliasing on darwin The antiquated gcc/clang that ships with Xcode emits waaaay too many false positives. --- uv.gyp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/uv.gyp b/uv.gyp index 5217ed1c..db90ee90 100644 --- a/uv.gyp +++ b/uv.gyp @@ -115,7 +115,6 @@ '-pedantic', '-Wall', '-Wextra', - '-Wstrict-aliasing', '-Wno-unused-parameter', ], 'sources': [ @@ -181,6 +180,11 @@ '_DARWIN_USE_64_BIT_INODE=1', ] }], + [ 'OS!="mac"', { + # Enable on all platforms except OS X. The antique gcc/clang that + # ships with Xcode emits waaaay too many false positives. + 'cflags': [ '-Wstrict-aliasing' ], + }], [ 'OS=="linux"', { 'sources': [ 'src/unix/linux-core.c', @@ -425,5 +429,3 @@ } ] } - - From 75141493ba44addf7e089308e9692357f958ceda Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 28 Mar 2013 00:12:24 +0100 Subject: [PATCH 2/5] darwin: don't select(&exceptfds) in fallback path The exceptfds set is for polling OOB data, not errors. Fixes joyent/node#5155. --- src/unix/stream.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/unix/stream.c b/src/unix/stream.c index d00fe23c..d95fa0db 100644 --- a/src/unix/stream.c +++ b/src/unix/stream.c @@ -131,7 +131,6 @@ static void uv__stream_osx_select(void* arg) { char buf[1024]; fd_set sread; fd_set swrite; - fd_set serror; int events; int fd; int r; @@ -154,17 +153,15 @@ static void uv__stream_osx_select(void* arg) { /* Watch fd using select(2) */ FD_ZERO(&sread); FD_ZERO(&swrite); - FD_ZERO(&serror); if (uv_is_readable(stream)) FD_SET(fd, &sread); if (uv_is_writable(stream)) FD_SET(fd, &swrite); - FD_SET(fd, &serror); FD_SET(s->int_fd, &sread); /* Wait indefinitely for fd events */ - r = select(max_fd + 1, &sread, &swrite, &serror, NULL); + r = select(max_fd + 1, &sread, &swrite, NULL, NULL); if (r == -1) { if (errno == EINTR) continue; @@ -203,8 +200,6 @@ static void uv__stream_osx_select(void* arg) { events |= UV__POLLIN; if (FD_ISSET(fd, &swrite)) events |= UV__POLLOUT; - if (FD_ISSET(fd, &serror)) - events |= UV__POLLERR; uv_mutex_lock(&s->mutex); s->events |= events; @@ -249,7 +244,8 @@ static void uv__stream_osx_select_cb(uv_async_t* handle, int status) { s->events = 0; uv_mutex_unlock(&s->mutex); - assert(0 == (events & UV__POLLERR)); + assert(events != 0); + assert(events == (events & (UV__POLLIN | UV__POLLOUT))); /* Invoke callback on event-loop */ if ((events & UV__POLLIN) && uv__io_active(&stream->io_watcher, UV__POLLIN)) From a9a23dc28ec73912dfaae4fc2a8d815e20578695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 28 Mar 2013 15:50:42 +0100 Subject: [PATCH 3/5] unix: don't clear flags after closing UDP handle --- src/unix/udp.c | 1 - test/test-udp-send-and-recv.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/udp.c b/src/unix/udp.c index e1a12f2b..3fb8af93 100644 --- a/src/unix/udp.c +++ b/src/unix/udp.c @@ -79,7 +79,6 @@ void uv__udp_finish_close(uv_udp_t* handle) { } /* Now tear down the handle. */ - handle->flags = 0; handle->recv_cb = NULL; handle->alloc_cb = NULL; /* but _do not_ touch close_cb */ diff --git a/test/test-udp-send-and-recv.c b/test/test-udp-send-and-recv.c index 37df5b62..1ffa6aa8 100644 --- a/test/test-udp-send-and-recv.c +++ b/test/test-udp-send-and-recv.c @@ -53,6 +53,7 @@ static uv_buf_t alloc_cb(uv_handle_t* handle, size_t suggested_size) { static void close_cb(uv_handle_t* handle) { CHECK_HANDLE(handle); + ASSERT(uv_is_closing(handle)); close_cb_called++; } From 31ebe23973dd98fd8a24c042b606f37a794e99d0 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 28 Mar 2013 19:56:36 +0100 Subject: [PATCH 4/5] 2013.02.04, Version 0.10.3 (Stable) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes since version 0.10.2: * include: remove extraneous const from uv_version() (Ben Noordhuis) * doc: update README, replace `OS` by `PLATFORM` (Ben Noordhuis) * build: simplify .buildstamp rule (Ben Noordhuis) * build: disable -Wstrict-aliasing on darwin (Ben Noordhuis) * darwin: don't select(&exceptfds) in fallback path (Ben Noordhuis) * unix: don't clear flags after closing UDP handle (Saúl Ibarra Corretgé) --- ChangeLog | 17 +++++++++++++++++ src/version.c | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 034653d6..ff267955 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2013.02.04, Version 0.10.3 (Stable) + +Changes since version 0.10.2: + +* include: remove extraneous const from uv_version() (Ben Noordhuis) + +* doc: update README, replace `OS` by `PLATFORM` (Ben Noordhuis) + +* build: simplify .buildstamp rule (Ben Noordhuis) + +* build: disable -Wstrict-aliasing on darwin (Ben Noordhuis) + +* darwin: don't select(&exceptfds) in fallback path (Ben Noordhuis) + +* unix: don't clear flags after closing UDP handle (Saúl Ibarra Corretgé) + + 2013.03.25, Version 0.10.2 (Stable) This is the first officially versioned release of libuv. Starting now diff --git a/src/version.c b/src/version.c index 64712677..0ee0753e 100644 --- a/src/version.c +++ b/src/version.c @@ -29,7 +29,7 @@ #define UV_VERSION_MAJOR 0 #define UV_VERSION_MINOR 10 #define UV_VERSION_PATCH 3 -#define UV_VERSION_IS_RELEASE 0 +#define UV_VERSION_IS_RELEASE 1 #define UV_VERSION ((UV_VERSION_MAJOR << 16) | \ From 9e90cdeae72b0b55becddfef1d441aeeb588e083 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 28 Mar 2013 19:59:51 +0100 Subject: [PATCH 5/5] Now working on v0.10.4 --- src/version.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/version.c b/src/version.c index 0ee0753e..6984055a 100644 --- a/src/version.c +++ b/src/version.c @@ -28,8 +28,8 @@ #define UV_VERSION_MAJOR 0 #define UV_VERSION_MINOR 10 -#define UV_VERSION_PATCH 3 -#define UV_VERSION_IS_RELEASE 1 +#define UV_VERSION_PATCH 4 +#define UV_VERSION_IS_RELEASE 0 #define UV_VERSION ((UV_VERSION_MAJOR << 16) | \