Original commit message:
darwin: fix size calculation in select() fallback
Apple's `fd_set` stores its bits in an array of 32-bit integers, which
means `FD_ISSET()` may read out of bounds if we allocate storage at
byte granularity. There's also a chance that the `select()` call could
corrupt the heap, although I didn't investigate that.
This issue was discovered by LLVM's AddressSanitizer which caught
`FD_ISSET()` trying to read out of bounds.
Ref: https://github.com/libuv/libuv/pull/241
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9179
Float patch to fix setsockopt for multicast on Solaris and derivatives.
Original commit message:
solaris: fix setsockopt for multicast options
On Solaris and derivatives such as SmartOS, the length of socket options
for multicast and ttl options is not always sizeof(char).
This fixes the udp_options and udp_options6 tests.
Ref: https://github.com/libuv/libuv/pull/243
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9179
Float patch to fix pipe on Windows. Original commit message:
win: fix pipe blocking writes
In the code path for pipe blocking writes, WriteFile is already
posting a completion packet to the I/O completion port.
POST_COMPLETION_FOR_REQ was causing the same request to get
returned twice by GetCompletionStatusEx.
Also on the same code path, we were waiting on the wrong event.
We need to update queued_bytes and write_queue_size when a
blocking write request completes asynchronously.
Ref: https://github.com/libuv/libuv/pull/238
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9179
The latest merge resulted in uv__loop_configure being defined twice on
Windows. This changes removes one of these duplicates to fix the build
on this platform.
Revert uv_thread_self() to return unsigned long instead of uv_thread_t.
This was causing a build failure on Windows and is only a temporary fix
until the proper patch lands upstream.
Reverts: https://github.com/joyent/libuv/commit/59658a8
Fixes: ce112c2 "deps: update uv to v1.0.0-rc2"
This commit changes src/tcp_wrap.cc and src/udp_wrap.cc just enough to
get by (i.e. to compile and function correctly.)
The new libuv API allows for more cleanup and deduplication but I'm
saving that for another day.