Because we are floating several patches on top of libuv, make that
apparent in the version number.
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9179
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 -fno-strict-aliasing flag was added to fix compilation warnings when
building Node.js with GCC <= 4.4
Reviewed-By: Julien Gilli <julien.gilli@joyent.com>
PR-URL: https://github.com/joyent/node/pull/9179
Building node with GCC > 4.4 on CentOS makes the node binary depend on a
more recent version of the C/C++ runtime that is not installed by
default on these older CentOS platforms, and probably on other platforms
as well.
Building node with the default gcc and g++ compilers that come with
these older versions of CentOS allows to ship a node binary that runs
out of the box on these setups with older C/C++ runtimes.
This change works around a bug that was fixed in GCC 4.5. Versions of
GCC < 4.5 would not support using the injected-class-name of a
template base class as a type name.
This change also disables aliasing optimizations for toolchains using
GCC <= 4.4 as they're not able to deal with the aliasing in the queue
implementation used by libuv and node (see src/queue.h).
Fixes#9079.
PR: #9098
PR-URL: https://github.com/joyent/node/pull/9098
Reviewed-By: Timothy J Fontaine <tjfontaine@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
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"
Profiling suggested that on Linux sometimes over 10% of CPU time was
being spent inside the systemtap probe entry points in the binding
layer, even when the process was not actively being traced with the
`stap` tool.
That's why this commit makes it possible to use the *_ENABLED() macros
and bail out early when we're not being traced, reducing the overhead
of unused probes to (almost) zero.
Said macros were already being generated by `dtrace -h` but were not
usable because they rely on external definitions. To remedy that, we
now generate the accompanying object files with `dtrace -G`.
This commit includes a change to libuv that has been landed upstream in
commit joyent/libuv@3c172ea.
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.