Problem: calling `server.listen()` (no port) on a net.Server triggered the
following libuv assertion:
node: ../deps/uv/src/unix/stream.c:406: uv__write: Assertion `fd_to_send >= 0'
failed.
Cause: uv_tcp_t handles are lazily initialized. Omitting the port made the
handle get initialized even more lazily. Too lazily - it wasn't initialized
when the handle was sent over to the child process.
Solution: implicitly bind to a random port in listen() when the port number
is omitted, it forces the handle to initialize. This is not a change in
behavior, listen() has always been identical to listen(0).
Fixes#3325.
AssertionError already inherits from Error above using util.inherits(),
so this extra line was redundant.
test/simple/test-assert.js already tests for `instanceof`, and still passes.
* V8: Upgrade to 3.11.10.17
* npm: Upgrade to 1.1.45
* net: fix Socket({ fd: 42 }) api (Ben Noordhuis)
* readline: Remove event listeners on close (isaacs)
* windows: correctly prep long path for fs.exists(Sync) (Bert Belder)
* debugger: wake up the event loop when a debugger command is dispatched (Peter Rybin)
* tls: verify server's identity (Fedor Indutny)
* net: ignore socket.setTimeout(Infinity or NaN) (Fedor Indutny)
When the event loop was blocked in epoll / kqueue or similar, debugger
commands wouldn't be processed. This patch fixes that by adding an
uv_async handle which is triggered when a debugger command is
dispatched. The async handle's callback makes sure that V8 is entered.
Closes GH-3626
Closes GH-3718
I disabled the -ffunction-sections and -fdata-sections switches in 202df30
because they're horribly buggy with some gcc/binutils combos.
However, it turns out that the dtrace/ustack post-processing tool requires
that V8 is compiled with said switches and was broken because of it.
This commit turns them on again on SunOS systems. Let's hope for the best.
Unconditionally compile V8 with -fno-strict-aliasing on all platforms.
gcc 4.5.2 on sunos generates bad code when -fstrict-aliasing is enabled, which
undoubtedly means that there are more buggy versions of gcc out there.
-fstrict-aliasing does not give a significant performance boost so let's just
disable it.
Fixes#3736.
Explicitly cast double to int64_t, it was making add-ons that compile with
`-Wall -Wextra -Werror` fail to build.
Don't use fully variadic macros, gcc in uber-strict mode rejects them.