Ben Noordhuis [Fri, 23 Oct 2015 17:10:49 +0000 (19:10 +0200)]
buffer: don't CHECK on zero-sized realloc
malloc(0) and realloc(ptr, 0) have implementation-defined behavior in
that the standard allows them to either return a unique pointer or a
nullptr for zero-sized allocation requests. Normalize by always using
a nullptr.
Fixes: https://github.com/nodejs/node/issues/3496
PR-URL: https://github.com/nodejs/node/pull/3499
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Michael Dawson [Thu, 22 Oct 2015 20:15:33 +0000 (16:15 -0400)]
test: disable test-tick-processor - aix and be ppc
This test is already partially disabled for several platforms with
the comment that the required info is not provided at the C++ level.
I'm adding AIX as and PPC BE linux as they currently fall into
the same category. We are working to see if we can change that
in v8 but it will be non-trivial if is possible at all so I don't
want to leave the CI with failing tests until that point.
PR-URL: https://github.com/nodejs/node/pull/3491
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Michael Dawson [Tue, 20 Oct 2015 22:35:34 +0000 (18:35 -0400)]
test: harden test-child-process-fork-regr-gh-2847
test-child-process-fork-regr-gh-2847 could fail depending
on timing and how messages were packed into tcp packets.
If all of the requests fit into one packet then the test
worked otherwise, otherwise errors could occur. This PR
modifies the test to be tolerant while still validating that
some of the connection can be made succesfully
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3459
Imran Iqbal [Tue, 20 Oct 2015 20:58:16 +0000 (16:58 -0400)]
test: fix test-net-keepalive for AIX
Fixed an intermittent issue on AIX where the 100ms timeout was reached
before the 'connection' event was fired. This resulted in a failure as
serverConnection would be undefined and the assert.equal would throw an
error. Changed the flow of the test so that the timeout is only set
after a connection has been made.
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: https://github.com/nodejs/node/pull/3458
Myles Borins [Tue, 20 Oct 2015 18:40:54 +0000 (11:40 -0700)]
test: wrap assert.fail when passed to callback
Currently there are many instances where assert.fail is directly passed
to a callback for error handling. Unfortunately this will swallow the
error as it is the third argument of assert.fail that sets the message
not the first.
This commit adds a new function to test/common.js that simply wraps
assert.fail and calls it with the provided message.
Tip of the hat to @trott for pointing me in the direction of this.
PR-URL: https://github.com/nodejs/node/pull/3453
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Junliang Yan [Mon, 19 Oct 2015 19:30:11 +0000 (15:30 -0400)]
test: skip test-dns-ipv6.js if ipv6 is unavailable
Test should be skipped if ipv6 is unavailable on the running system.
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3444
fansworld-claudio [Mon, 19 Oct 2015 19:10:18 +0000 (16:10 -0300)]
docs: add missing shell option to execSync
Adds the "shell" option from child_process.exec to
child_process.execSync on the api docs.
Fixes: #3387
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3440
Jeremiah Senkpiel [Mon, 19 Oct 2015 15:57:55 +0000 (11:57 -0400)]
test: repl-persistent-history is no longer flaky
The race conditions were fixed in
286ef1daca1c1f3e3363ee162fb97fb823632352
PR-URL: https://github.com/nodejs/node/pull/3437
Reviewed By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Rich Trott [Sun, 18 Oct 2015 21:42:44 +0000 (14:42 -0700)]
test: fix flaky test-child-process-emfile
Require the test setup to obtain an EMFILE error and not ENFILE as
ENFILE means there is a race condition with other processes that may
close files before `spawn()` is called by the test.
Fixes: https://github.com/nodejs/node/issues/2666
PR-URL: https://github.com/nodejs/node/pull/3430
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Rich Trott [Sun, 18 Oct 2015 01:52:15 +0000 (18:52 -0700)]
test: remove flaky status from eval_messages test
This test has not failed on armv7-wheezy in over 6 weeks. Let's remove its
"flaky" status.
Fixes: https://github.com/nodejs/node/issues/2672
Reviewed-By: Rod Vagg <r@va.gg>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3420
Rich Trott [Sat, 17 Oct 2015 04:07:21 +0000 (21:07 -0700)]
test: fix flaky test for symlinks
If the symlink portion of the test was being skipped due to a
combination of OS support and user privileges, then an assertion would
always fail. This fixes that problem, improves assertion error reporting
and splits the test to make it clear that it is a test for links and
symlinks.
Fixes: https://github.com/nodejs/node/issues/3311
PR-URL: https://github.com/nodejs/node/pull/3418
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Rich Trott [Thu, 15 Oct 2015 04:22:55 +0000 (21:22 -0700)]
test: apply correct assert.fail() arguments
The assert.fail function signature has the message as the third argument
but, understandably, it is often assumed that it is the first argument
(or at least the first argument if no other arguments are passed).
This corrects the assert.fail() invocations in the Node.js tests.
Before:
assert.fail('message');
// result: AssertionError: 'message' undefined undefined
After:
assert.fail(null, null, 'message');
// result: AssertionError: message
PR-URL: https://github.com/nodejs/node/pull/3378
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Roman Reiss [Wed, 14 Oct 2015 19:45:12 +0000 (21:45 +0200)]
doc: fix indent in tls resumption example
Markdown requires 4-space indent to correctly format code blocks. This
fixes the example so it's correctly presented as code.
PR-URL: https://github.com/nodejs/node/pull/3372
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Myles Borins [Tue, 13 Oct 2015 04:26:50 +0000 (21:26 -0700)]
test: replace util with backtick strings
Now that we have backticks we no longer need to use util.format
to template strings!
This commit was inspired by #3324, and it replaces instances of
util.format with backtick strings in a number of tests
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3359
Timothy Gu [Tue, 13 Oct 2015 23:20:21 +0000 (16:20 -0700)]
doc: fix typo in changelog
PR-URL: https://github.com/nodejs/node/pull/3353
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Rich Trott [Wed, 14 Oct 2015 04:39:16 +0000 (21:39 -0700)]
lib: avoid REPL exit on completion error
If a tab completion is attempted on an undefined reference inside of a
function, the REPL was exiting without reporting an error or anything
else. This change results in the REPL reporting the ReferenceError and
continuing.
Fixes: https://github.com/nodejs/node/issues/3346
PR-URL: https://github.com/nodejs/node/pull/3358
Reviewed-By: James M Snell <jasnell@gmail.com>
Rich Trott [Tue, 13 Oct 2015 03:48:41 +0000 (20:48 -0700)]
test: add test-child-process-emfile fail message
When the test fails (as it does frequently on FreeBSD unfortunately)
provide a non-cryptic error message that also provides a line number.
PR-URL: https://github.com/nodejs/node/pull/3335
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
calebboyd [Mon, 19 Oct 2015 17:38:55 +0000 (12:38 -0500)]
doc: show keylen in pbkdf2 as a byte length
Ensure that keylen for pbkdf2 is documented as a length of bytes and not
bits.
PR-URL: https://github.com/nodejs/node/pull/3334
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Rich Trott [Mon, 12 Oct 2015 20:58:00 +0000 (13:58 -0700)]
doc: add information about Assert behavior and maintenance
Assert is now locked. Userland alternatives should be used. Assert is
for testing Node.js itself.
Document potentially surprising use of enumerable properties only in
deep equality assertions.
Ref: https://github.com/nodejs/node/pull/3124
Ref: https://github.com/nodejs/node/issues/3122
PR-URL: https://github.com/nodejs/node/pull/3330
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Fedor Indutny [Tue, 13 Oct 2015 06:16:39 +0000 (02:16 -0400)]
http: fix stalled pipeline bug
This is a two-part fix:
- Fix pending data notification in `OutgoingMessage` to notify server
about flushed data too
- Fix pause/resume behavior for the consumed socket. `resume` event is
emitted on a next tick, and `socket._paused` can already be `true` at
this time. Pause the socket again to avoid PAUSED error on parser.
Fix: https://github.com/nodejs/node/issues/3332
PR-URL: https://github.com/nodejs/node/pull/3342
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Calvin Metcalf [Fri, 9 Oct 2015 18:50:11 +0000 (14:50 -0400)]
stream: avoid unnecessary concat of a single buffer.
Avoids doing a buffer.concat on the internal buffer
when that array has only a single thing in it.
Reviewed-By: Chris Dickinson <chris@neversaw.us>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3300
Martii [Thu, 8 Oct 2015 03:14:16 +0000 (21:14 -0600)]
doc: clarify API buffer.concat
* Add a simple example for buffer.concat
* Change grammar slightly.
Fixes: #3219
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3255
Kyle Smith [Wed, 7 Oct 2015 23:03:21 +0000 (16:03 -0700)]
doc: clarify the use of `option.detached`
This paragraph conveys that detached child processes do not stay
running in the background in general. Instead clarify that this
refers to the parent process exiting before the detached child
process is complete.
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3250
Fábio Santos [Wed, 7 Oct 2015 22:27:06 +0000 (23:27 +0100)]
stream: fix signature of _write() in a comment
This comment was a bit misleading, since it was missing the `encoding`
argument.
PR-URL: https://github.com/nodejs/node/pull/3248
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Yuval Brik [Sat, 29 Aug 2015 21:27:14 +0000 (00:27 +0300)]
tls: TLSSocket options default isServer false
Upon creating a TLSSocket object, set the default isServer option to false
Updated tls docs and added test-tls-socket-default-options
PR-URL: https://github.com/nodejs/node/pull/2614
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Phillip Johnsen [Wed, 14 Oct 2015 09:17:25 +0000 (11:17 +0200)]
doc: label v4.2.1 as LTS in changelog heading
PR-URL: #3360
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
James M Snell [Tue, 13 Oct 2015 17:36:10 +0000 (10:36 -0700)]
Working on v4.2.2
James M Snell [Tue, 13 Oct 2015 04:21:54 +0000 (21:21 -0700)]
2015-10-13, Version 4.2.1 'Argon' (LTS) Release
* Includes fixes for two regressions
- Assertion error in WeakCallback - see [#3329](https://github.com/nodejs/node/pull/3329)
- Undefined timeout regression - see [#3331](https://github.com/nodejs/node/pull/3331)
* Document an additional known issue with pipelined requests
- See: https://github.com/nodejs/node/issues/3332 and https://github.com/nodejs/node/pull/3342
Rod Vagg [Tue, 13 Oct 2015 06:55:40 +0000 (17:55 +1100)]
doc: label v4.2.0 as LTS in changelog heading
Update the label for v4.2.0 to (LTS) from (Stable)
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3343
Ryan Graham [Mon, 12 Oct 2015 23:03:59 +0000 (16:03 -0700)]
lib: fix undefined timeout regression
63644dd1cd6e introduced a regression caused by everyone's favourite
JavaScript feature: undefined < 0 === undefined >= 0.
Add a case to the existing tests to cover this scenario and then add
the check for undefined that makes the test pass.
PR-URL: https://github.com/nodejs/node/pull/3331
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed By: Evan Lucas <evanlucas@me.com>
Fedor Indutny [Mon, 12 Oct 2015 20:08:13 +0000 (16:08 -0400)]
buffer: fix assertion error in WeakCallback
`CallbackInfo` is now bound to `ArrayBuffer` instance, not `Uint8Array`,
therefore `SPREAD_ARG` will abort with:
Assertion failed: ((object)->IsUint8Array())
Make changes necessary to migrate it to `ArrayBuffer`.
See: https://github.com/nodejs/node/pull/3080#issuecomment-
147502167
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3329
James M Snell [Mon, 12 Oct 2015 18:11:26 +0000 (11:11 -0700)]
Working on v4.2.1
James M Snell [Thu, 8 Oct 2015 05:15:51 +0000 (22:15 -0700)]
2015-10-12, Version 4.2.0 'Argon' (LTS) Release
The first Node.js LTS release! See https://github.com/nodejs/LTS/
for details of the LTS process.
* **icu**: Updated to version 56 with significant performance improvements
(Steven R. Loomis) https://github.com/nodejs/node/pull/3281
* **node**:
- Added new `-c` (or `--check`) command line argument for checking script
syntax without executing the code (Dave Eddy) https://github.com/nodejs/node/pull/2411
- Added `process.versions.icu` to hold the current ICU library version
(Evan Lucas) https://github.com/nodejs/node/pull/3102
- Added `process.release.lts` to hold the current LTS codename when the
binary is from an active LTS release line (Rod Vagg) https://github.com/nodejs/node/pull/3212
* **npm**: Upgraded to npm 2.14.7 from 2.14.4, see release notes:
https://github.com/npm/npm/releases/tag/v2.14.7 for full details (Kat Marchán) https://github.com/nodejs/node/pull/3299
PR-URL: https://github.com/nodejs/node/pull/3258
Fedor Indutny [Mon, 21 Sep 2015 23:22:26 +0000 (19:22 -0400)]
tls: use parent handle's close callback
When closing the child TLSWrap handle - wait for the proper parent's
handle close callback invocation. `uv_close_cb` may be invoked much
later than the next libuv tick, depending on the platform.
The only platform that currently seem to defer `uv_close_cb` is Windows
XP. This behavior was not observed on other Windows systems, and is not
possible on Unixes.
Fix: https://github.com/nodejs/node/issues/2979
PR-URL: https://github.com/nodejs/node/pull/2991
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Trevor Norris [Fri, 9 Oct 2015 22:51:42 +0000 (16:51 -0600)]
net: don't throw on bytesWritten access
If bytesWritten is accessed before the object has been properly
constructed then return undefined.
Fixes: https://github.com/nodejs/node/issues/3298
PR-URL: https://github.com/nodejs/node/pull/3305
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Rod Vagg [Tue, 6 Oct 2015 12:31:14 +0000 (23:31 +1100)]
src: add process.release.lts property
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/3212
David Boivin [Thu, 10 Sep 2015 15:14:47 +0000 (10:14 -0500)]
doc: update the assert module summary
The current wording "This module is used for writing unit tests for your
applications, you can access it with require('assert')." implies that
this module should only be used in development while unit testing.
The article "Error Handling in Node.js" by Joyent
(https://www.joyent.com/developers/node/design/errors) uses the assert
module in an efficient way to validate required function arguments.
PR-URL: https://github.com/nodejs/node/pull/2799
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Roman Klauke [Sun, 11 Oct 2015 12:53:06 +0000 (14:53 +0200)]
doc: replace node-gyp link with nodejs/node-gyp
The node-gyp is now in the nodejs/node-gyp. This commit replaces the
repository owner link with the new nodejs/node-gyp link.
PR-URL: https://github.com/nodejs/node/pull/3320
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Brian White [Sun, 11 Oct 2015 18:06:17 +0000 (14:06 -0400)]
stream: avoid pause with unpipe in buffered write
If a pipe is cleaned up (due to unpipe) during a write that
returned false, the source stream can get stuck in a paused state.
Fixes: https://github.com/nodejs/node/issues/2323
PR-URL: https://github.com/nodejs/node/pull/2325
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Trevor Norris [Fri, 9 Oct 2015 20:18:54 +0000 (14:18 -0600)]
buffer: don't abort on prototype getters
Accessing prototype properties directly on a typed array will throw. So
do an extra check in Buffer's own getters to verify it is being called
on an instance.
Fixes: https://github.com/nodejs/node/issues/3297
PR-URL: https://github.com/nodejs/node/pull/3302
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Kat Marchán [Fri, 9 Oct 2015 18:36:19 +0000 (11:36 -0700)]
deps: upgrade to npm 2.14.7
PR-URL: https://github.com/nodejs/node/pull/3299
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Ben Noordhuis [Thu, 8 Oct 2015 10:25:03 +0000 (12:25 +0200)]
assert: support arrow functions in .throws()
`x instanceof f` where f is an arrow function throws a (spec-conforming)
"Function has non-object prototype 'undefined' in instanceof check"
exception.
Add a workaround so that it's possible to pass arrow functions as the
second argument to assert.throws(). The try/catch block is a little
jarring but swapping around the clauses in the if statements changes
the semantics too much.
Fixes: https://github.com/nodejs/node/issues/3275
PR-URL: https://github.com/nodejs/node/pull/3276
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Rich Trott [Thu, 8 Oct 2015 03:53:38 +0000 (20:53 -0700)]
test: remove common.inspect()
common.inspect() is just util.inspect(). common copies every property
from util but this is the only one that gets used and it only gets used
in three places. Well, four, but the fourth is removed in a pending PR.
This commit removes it. Subsequently, the "copy util to common"
part of `common` can be removed altogether.
PR-URL: https://github.com/nodejs/node/pull/3257
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Rich Trott [Thu, 8 Oct 2015 03:26:27 +0000 (20:26 -0700)]
test: test `util` rather than `common`
test-sys.js tests common.inspect() (which is test-specific code) and not
sys (which, although deprecated, should still be tested).
This commit moves the tests to the not-deprecated util and adds a test
to check that deprecated sys and util are the same.
PR-URL: https://github.com/nodejs/node/pull/3256
Reviewed-By: Evan Lucas <evanlucas@me.com>
Rich Trott [Wed, 7 Oct 2015 04:12:45 +0000 (21:12 -0700)]
test: refresh temp directory when using pipe
common.PIPE resides in the temp directory (except on Windows). Insure
that the temp directory is refreshed in tests that use common.PIPE.
PR-URL: https://github.com/nodejs/node/pull/3231
Fixes: https://github.com/nodejs/node/issues/3227
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Dave Hodder [Thu, 8 Oct 2015 20:17:23 +0000 (21:17 +0100)]
doc: Amend capitalization of word JavaScript
PR-URL: https://github.com/nodejs/node/pull/3285
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Alejandro Oviedo [Tue, 6 Oct 2015 13:21:22 +0000 (10:21 -0300)]
doc: add method links in dns.markdown
Added links to referenced methods.
PR-URL: https://github.com/nodejs/node/pull/3196
Reviewed-By: Roman Reiss <me@silverwind.io>>
Alejandro Oviedo [Mon, 5 Oct 2015 18:58:41 +0000 (15:58 -0300)]
doc: add method links in child_process.markdown
Added links to referenced methods.
PR-URL: https://github.com/nodejs/node/pull/3186
Reviewed-By: Roman Reiss <me@silverwind.io>
Jason Karns [Fri, 8 May 2015 18:41:57 +0000 (14:41 -0400)]
doc: recommend Infinity on emitter.setMaxListeners
Instead of recommending `0` as the magic value to set max listeners to
unlimited, recommend `Infinity`. This paves the way for `0` as a magic
value eventually being deprecated and finally removed.
PR-URL: https://github.com/nodejs/node/pull/2559
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Karl Skomski [Fri, 9 Oct 2015 16:09:52 +0000 (18:09 +0200)]
src: convert BE-utf16-string to LE before search
On Big Endian platforms v8 strings are need to converted
to Little Endian before searching in utf16le buffer
Fixes: https://github.com/nodejs/node/issues/3283
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Michael Dawson <mhdawson@ca.ibm.com>
PR-URL: https://github.com/nodejs/node/pull/3295
Karl Skomski [Thu, 24 Sep 2015 08:53:42 +0000 (10:53 +0200)]
src: fix u-a-free if uv returns err in ASYNC_CALL
PR-URL: https://github.com/nodejs/node/pull/3049
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Steven R. Loomis [Wed, 7 Oct 2015 22:40:26 +0000 (18:40 -0400)]
build: Intl: deps: bump ICU to 56.1 (GA)
* ICU 56 was just released yesterday. Update to it.
* Notable changes: Unicode 8, CLDR 28, 2-3x number format perf,
20% improvement in Collator startup
* more at http://site.icu-project.org/download/56 or in #2917
Also:
* cleanup out/**/*.d and deps/icu on "make clean"
* cleanup deps/icu on "vcbuild clean"
When building from an non-clean directory, it's important to
run `make clean` or `vcbuild clean` to remove the existing
ICU 55 from the deps path before building.
Fixes: https://github.com/nodejs/node/issues/2917
PR-URL: https://github.com/nodejs/node/pull/3281
Reviewed-By: James M Snell <jasnell@gmail.com>
Junliang Yan [Tue, 6 Oct 2015 18:21:13 +0000 (14:21 -0400)]
test: Fix test-fs-read-stream-fd-leak race cond
Fix intermittent test failure on slower machines.
Gives test longer time to complete but checks
at regular intervals so that the test only
runs longer on slower machines or in the failure
case.
PR-URL: https://github.com/nodejs/node/pull/3218
Fixes: https://github.com/nodejs/node/issues/3215
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James Snell <jasnell@gmail.com>>
Trevor Norris [Thu, 8 Oct 2015 16:57:12 +0000 (10:57 -0600)]
js_stream: prevent abort if isalive doesn't exist
Attempting to check IsAlive() on a JSStream before the isAlive()
callback can be set in JS causes a CHECK to fail in MakeCallback.
Instead return false if the callback hasn't been set.
PR-URL: https://github.com/nodejs/node/pull/3282
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Junliang Yan [Tue, 6 Oct 2015 23:45:54 +0000 (19:45 -0400)]
test: fix losing original env vars issue
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
PR-URL: https://github.com/nodejs/node/pull/3190
Johan Bergström [Tue, 6 Oct 2015 06:09:06 +0000 (17:09 +1100)]
build: make icu download path customizable
This makes it easier to store icu tarballs outside of the node.js
directory which is useful in our CI where git directories are
scrubbed between runs.
PR-URL: https://github.com/nodejs/node/pull/3200
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Doug Shamoo [Wed, 7 Oct 2015 05:47:49 +0000 (22:47 -0700)]
doc: add help repo link to CONTRIBUTING.md
Direct help requests and technical issues that are not issues with
Node.js to the nodejs help repo issue tracker. Add link.
PR-URL: https://github.com/nodejs/node/pull/3233
Fixes: https://github.com/nodejs/node/issues/3185
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Karl Skomski [Thu, 3 Sep 2015 08:10:30 +0000 (10:10 +0200)]
src: replace naive search in Buffer::IndexOf
Adds the string search implementation from v8
which uses naive search if pattern length < 8
or to a specific badness then uses Boyer-Moore-Horspool
Added benchmark shows the expected improvements
Added option to use ucs2 encoding with Buffer::IndexOf
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/2539
Trevor Norris [Fri, 2 Oct 2015 00:57:36 +0000 (18:57 -0600)]
async_wrap: correctly pass parent to init callback
Previous logic didn't allow parent to propagate to the init callback
properly. The fix now allows the init callback to be called and receive
the parent if:
- async wrap callbacks are enabled and parent exists
- the init callback has been called on the parent and an init callback
exists then it will be called regardless of whether async wrap
callbacks are disabled.
Change the init/pre/post callback checks to see if it has been properly
set. This allows removal of the Environment "using_asyncwrap" variable.
Pass Isolate to a TryCatch instance.
Fixes: https://github.com/nodejs/node/issues/2986
PR-URL: https://github.com/nodejs/node/pull/3216
Reviewed-By: Rod Vagg <rod@vagg.org>
Roman Reiss [Tue, 6 Oct 2015 18:50:45 +0000 (20:50 +0200)]
doc: add TLS session resumption example
Using TLS session resumption correctly is not obvious. This added
example code should help new users understand how to use it correctly.
Related issue: https://github.com/nodejs/node/issues/3132
PR-URL: https://github.com/nodejs/node/pull/3147
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Jérémy Lal [Fri, 18 Sep 2015 09:28:19 +0000 (11:28 +0200)]
build: add --with-arm-fpu option
Fixes: https://github.com/nodejs/node/issues/2942
PR-URL: https://github.com/nodejs/node/pull/3228
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
Rich Trott [Sat, 26 Sep 2015 22:00:51 +0000 (15:00 -0700)]
test: remove deprecated error logging
common.error() is just deprecated util.error() renamed.
Remove calls to it and some other extraneous console logging
in tests.
PR-URL: https://github.com/nodejs/node/pull/3079
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Karl Skomski [Wed, 2 Sep 2015 08:13:01 +0000 (10:13 +0200)]
test: report timeout in TapReporter
Be slightly more verbose in cases where tests time out.
PR-URL: https://github.com/nodejs/node/pull/2647
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Rod Vagg [Tue, 6 Oct 2015 12:18:34 +0000 (23:18 +1100)]
doc: update AUTHORS list
Update AUTHORS list using tools/update-authors.sh
PR-URL: https://github.com/nodejs/node/pull/3211
Reviewed-By: Evan Lucas <evanlucas@me.com>
Rich Trott [Wed, 7 Oct 2015 03:54:23 +0000 (20:54 -0700)]
test: linting for buffer-free-callback test
Test added in
d1f24044 does not pass linting rule added in
3de353b5.
Fixed in this commit. `common` module required in all tests except
those that intentionally leak variables.
PR-URL: https://github.com/nodejs/node/pull/3230
Fixes: https://github.com/nodejs/node/issues/3229
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Martial [Mon, 5 Oct 2015 21:31:53 +0000 (17:31 -0400)]
doc: standardize references to userland
Change occurrences of "user-land" to "userland".
PR-URL: https://github.com/nodejs/node/pull/3192
Fixes: https://github.com/nodejs/node/issues/3189
Reviewed-By: Rich Trott <rtrott@gmail.com>
Nathan Rajlich [Tue, 6 Oct 2015 20:24:51 +0000 (13:24 -0700)]
tools: remove leftover license boilerplate
This last line was missed in
3e1b1dd4a9ac048105a4dc4cd81578e26d39a1fc
PR-URL: https://github.com/nodejs/node/pull/3225
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Rod Machen [Tue, 6 Oct 2015 22:27:45 +0000 (17:27 -0500)]
doc: fix spelling in Buffer documentation
Change b.writeUint16LE(0x90ab, 0) to b.writeUInt16LE(0x90ab, 0).
PR-URL: https://github.com/nodejs/node/pull/3226
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Fedor Indutny [Sun, 4 Oct 2015 04:01:06 +0000 (00:01 -0400)]
http: cork/uncork before flushing pipelined res
Make sure that the pipelined response data will be written as less TCP
packets as possible.
PR-URL: https://github.com/nodejs/node/pull/3172
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Fedor Indutny [Tue, 6 Oct 2015 03:26:13 +0000 (23:26 -0400)]
buffer: FreeCallback should be tied to ArrayBuffer
FreeCallback should be invoked on the storage disposal (`ArrayBuffer`),
not when the view (`Uint8Array` or `Buffer`) is disposed. This causes
bug and crashes in addons which create buffers and store only slices of
them.
PR-URL: https://github.com/nodejs/node/pull/3198
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Rich Trott [Fri, 2 Oct 2015 04:38:16 +0000 (21:38 -0700)]
test: make common.js mandatory via linting rule
test/common.js contains code that detects global variable leaks.
This eslint rule checks that a module named `common` is loaded. It is
only applicable to files in the test directory. Tests that intentionally
leak variables can opt out with an eslint-disable comment.
PR-URL: https://github.com/nodejs/node/pull/3157
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Rich Trott [Fri, 2 Oct 2015 04:37:12 +0000 (21:37 -0700)]
test: load common.js in all tests
common.js contains code that detects leaked variables.
In preparation for an eslint rule that will enforce loading common.js in
test files, load it everywhere it can be loaded and use an
`eslint-disable` comment for files that intentionally leak.
PR-URL: https://github.com/nodejs/node/pull/3157
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Rich Trott [Mon, 5 Oct 2015 21:59:36 +0000 (14:59 -0700)]
tools: apply linting to custom rules code
Apply our eslint rules to the code for our custom eslint rules.
Eslint Inception! Maybe. I never saw that movie...
PR-URL: https://github.com/nodejs/node/pull/3195
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
Trevor Norris [Sat, 26 Sep 2015 21:26:52 +0000 (15:26 -0600)]
buffer: only check if instance is Uint8Array
Native Buffer method calls do not require anything from the prototype.
So it is unnecessary to check if the Object's prototype is equal to
Buffer.prototype.
This fixes an issue that prevents Buffer from being inherited the ES5
way. Now the following will work:
function A(n) {
const b = new Buffer(n);
Object.setPrototypeOf(b, A.prototype);
return b;
}
Object.setPrototypeOf(A.prototype, Buffer.prototype);
Object.setPrototypeOf(A, Buffer);
console.log(new A(4));
Fix: https://github.com/nodejs/node/issues/2882
PR-URL: https://github.com/nodejs/node/pull/3080
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Trevor Norris [Sat, 26 Sep 2015 22:18:08 +0000 (16:18 -0600)]
buffer: clean up usage of __proto__
Prefer using Object.setPrototypeOf() instead.
PR-URL: https://github.com/nodejs/node/pull/3080
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Evan Lucas [Tue, 6 Oct 2015 01:44:09 +0000 (20:44 -0500)]
util: fix for inspecting promises
The upgrade to v8 4.6 removes ObjectIsPromise. This change utilizes
v8::Value::IsPromise to verify that the argument is indeed a promise.
PR-URL: https://github.com/nodejs/node/pull/3221
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Ben Noordhuis [Tue, 6 Oct 2015 20:17:40 +0000 (22:17 +0200)]
tools: remove unused gflags module
Its only dependant was closure-linter but that was removed in commit
f9dd34d ("tools: replace closure-linter with eslint"). Remove it.
Fixes: https://github.com/nodejs/node/issues/3217
PR-URL: https://github.com/nodejs/node/pull/3220
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Steven R. Loomis [Fri, 25 Sep 2015 18:33:25 +0000 (14:33 -0400)]
build: intl: avoid 'duplicate main()' on ICU 56
* Exclude `derb.cpp` as well as `derb.c` from Node builds
(file was renamed in ICU 56)
ICU 56 renamed derb.c to derb.cpp because of C++ yay.
This broke the exclusion of "derb.c" when building tools.
Solution is to add derb.c AND derb.cpp to exclusion.
We don't build the 'derb' tool, so it's fine to list the
excluded source twice.
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/nodejs/node/pull/3066
Fixes: https://github.com/nodejs/node/issues/3065
Steven R. Loomis [Tue, 6 Oct 2015 18:18:33 +0000 (14:18 -0400)]
doc: fix README.md link to joyent/node intl wiki
Fix README.md link to go to nodejs/node wiki instead of joyent/node
Fixes: https://github.com/nodejs/node/issues/2756
PR-URL: https://github.com/nodejs/node/pull/3067
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Evan Lucas [Tue, 22 Sep 2015 14:54:57 +0000 (09:54 -0500)]
test: speed up stringbytes-external test
test-stringbytes-external tends to take quite a while on slower
hardware. A lot of the time is taken by creating a new buffer that is
very large. The improvements come from reusing the same buffer.
PR-URL: https://github.com/nodejs/node/pull/3005
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Roman Reiss [Tue, 22 Sep 2015 16:31:01 +0000 (18:31 +0200)]
test: use normalize() for unicode paths
OS X 10.11 changed the unicode normalization form of certain code points
returned by system calls like getcwd() from NFC to NFD which made
results in this test failing.
The consensus of https://github.com/nodejs/node/issues/2165 is to delegate
the task of unicode normalization to the user, and work will continue to
document how to handle unicode in a form-sensitive file system.
PR-URL: https://github.com/nodejs/node/pull/3007
Fixes: https://github.com/nodejs/node/issues/2165
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Rich Trott [Thu, 1 Oct 2015 05:18:36 +0000 (22:18 -0700)]
lib: remove redundant code, add tests in timers.js
insert() is only called from one place where there is already a check
that msecs is greater than or equal to zero, so do not repeat the check
inside insert().
timers.active() is not documented and should not be exposed, but since
it is exposed for now, let's test it.
PR-URL: https://github.com/nodejs/node/pull/3143
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Evan Lucas [Tue, 29 Sep 2015 19:30:22 +0000 (14:30 -0500)]
util: correctly inspect Map/Set Iterators
Previously, a MapIterator or SetIterator would
not be inspected properly. This change makes it possible
to inspect them by creating a Debug Mirror and previewing
the iterators to not consume the actual iterator that
we are trying to inspect.
This change also adds a node_util binding that uses
v8's Value::IsSetIterator and Value::IsMapIterator
to verify that the values passed in are actual iterators.
Fixes: https://github.com/nodejs/node/issues/3107
PR-URL: https://github.com/nodejs/node/pull/3119
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Evan Lucas [Mon, 5 Oct 2015 21:29:27 +0000 (16:29 -0500)]
util: fix check for Array constructor
In the event an Array is created in a Debug context, the constructor
will be Array, but !== Array. This adds a check
constructor.name === 'Array' to handle edge cases like that.
PR-URL: https://github.com/nodejs/node/pull/3119
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Jeremy Whitlock [Mon, 5 Oct 2015 20:08:53 +0000 (13:08 -0700)]
src: fix --abort-on-uncaught-exception
Revert
0af4c9ea7434e4f505dbe071357e4bc3b4ab2a8a, parts of
921f2de6cf999b5a4663615e37967b4269d755fe and port
https://github.com/nodejs/node-v0.x-archive/pull/25835 from v0.12 to
master so that node aborts at the right time when an error is thrown
and --abort-on-uncaught-exception is used.
Fixes #3035.
PR: #3036
PR-URL: https://github.com/nodejs/node/pull/3036
Reviewed-By: Ben Noordhuis <ben@strongloop.com>
Julien Gilli [Mon, 5 Oct 2015 20:13:18 +0000 (13:13 -0700)]
deps: backport 1ee712a from V8 upstream
Backport
1ee712ab8687e5f4dec93d45da068d37d28feb8b from V8 upstream.
Original commit message:
Add SetAbortOnUncaughtExceptionCallback API
The --abort-on-uncaught-exception command line switch makes
Isolate::Throw abort if the error being thrown cannot be caught by a
try/catch block.
Embedders may want to use other mechanisms than try/catch blocks to
handle uncaught exceptions. For instance, Node.js has "domain" objects
that have error handlers that can handle uncaught exception like
following:
var d = domain.create();
d.on('error', function onError(err) {
console.log('Handling error');
});
d.run(function() {
throw new Error("boom");
});
These error handlers are called by isolates' message listeners.
If --abort-on-uncaught-exception is *not* used, the isolate's
message listener will be called, which will in turn call the domain's
error handler. The process will output 'Handling error' and will exit
successfully (not due to an uncaught exception). This is the behavior
that Node.js users expect.
However, if --abort-on-uncaught-exception is used and when throwing an
error within a domain that has an error handler, the process will abort
and the domain's error handler will not be called. This is not the
behavior that Node.js users expect.
Having a SetAbortOnUncaughtExceptionCallback API allows embedders to
determine when it's not appropriate to abort and instead handle the
exception via the isolate's message listener.
In the example above, Node.js would set a custom callback with
SetAbortOnUncaughtExceptionCallback that would be implemented as
following (the sample code has been simplified to remove what's not
relevant to this change):
bool ShouldAbortOnUncaughtException(Isolate* isolate) {
return !IsDomainActive();
}
Now when --abort-on-uncaught-exception is used, Isolate::Throw would
call that callback and determine that it should not abort if a domain
with an error handler is active. Instead, the isolate's message listener
would be called and the error would be handled by the domain's error
handler.
I believe this can also be useful for other embedders.
BUG=
R=bmeurer@chromium.org
Review URL: https://codereview.chromium.org/
1375933003
Cr-Commit-Position: refs/heads/master@{#31111}
PR: #3036
PR-URL: https://github.com/nodejs/node/pull/3036
Reviewed-By: Ben Noordhuis <ben@strongloop.com>
Justin Chase [Sat, 19 Sep 2015 22:03:32 +0000 (17:03 -0500)]
module: use UNC paths when loading native addons
When using require to load a native addon the path must be converted
into a long path, otherwise the addon will fail to be loaded on
windows if the path is longer than 260 characters.
PR-URL: https://github.com/nodejs/node/pull/2965
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Benjamin Gruenbaum <inglor@gmail.com>
Roman Reiss [Sat, 3 Oct 2015 11:44:58 +0000 (13:44 +0200)]
test: remove arguments.callee usage
arguments.callee is forbidden in strict mode and the fact that it's
being used masked a possible error in this test.
PR-URL: https://github.com/nodejs/node/pull/3167
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Dave Eddy [Mon, 17 Aug 2015 21:33:13 +0000 (17:33 -0400)]
node: add -c|--check CLI arg to syntax check script
PR-URL: https://github.com/nodejs/node/pull/2411
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
charlierudolph [Wed, 30 Sep 2015 05:03:27 +0000 (22:03 -0700)]
fs: include filename in watch errors
This commit adds the relevant filename to fs.watch() errors.
Refs: https://github.com/nodejs/node-v0.x-archive/pull/25542
PR-URL: https://github.com/nodejs/node/pull/2748
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Evan Lucas [Sun, 27 Sep 2015 15:59:02 +0000 (10:59 -0500)]
src: add process.versions.icu
If i18n support is present, add the icu version
to process.versions
Fixes: https://github.com/nodejs/node/issues/3089
PR-URL: https://github.com/nodejs/node/pull/3102
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Rod Vagg <rod@vagg.org>
Fedor Indutny [Mon, 5 Oct 2015 17:30:30 +0000 (13:30 -0400)]
http: add comment about `outputSize` in res/server
PR-URL: https://github.com/nodejs/node/pull/3128
Rod Vagg [Mon, 5 Oct 2015 19:55:44 +0000 (06:55 +1100)]
Working on v4.1.3
Rod Vagg [Wed, 30 Sep 2015 08:42:34 +0000 (18:42 +1000)]
2015-10-05, Version 4.1.2 (Stable) Release
Notable changes
* http:
- Fix out-of-order 'finish' event bug in pipelining that can abort
execution, fixes DoS vulnerability CVE-2015-7384
(Fedor Indutny) #3128
- Account for pending response data instead of just the data on the
current request to decide whether pause the socket or not
(Fedor Indutny) #3128
* libuv: Upgraded from v1.7.4 to v1.7.5, see release notes for details
(Saúl Ibarra Corretgé) #3010
- A better rwlock implementation for all Windows versions
- Improved AIX support
* v8:
- Upgraded from v4.5.103.33 to v4.5.103.35 (Ali Ijaz Sheikh) #3117
- Backported f782159 from v8's upstream to help speed up Promise
introspection (Ben Noordhuis) #3130
- Backported c281c15 from v8's upstream to add JSTypedArray length
in post-mortem metadata (Julien Gilli) #3031
PR-URL: https://github.com/nodejs/node/pull/3128
Fedor Indutny [Sat, 3 Oct 2015 20:15:15 +0000 (16:15 -0400)]
stream_wrap: support empty `TryWrite`s
Decrement `vcount` in `DoTryWrite` even if some of the buffers are
empty.
PR-URL: https://github.com/nodejs/node/pull/3128
Fedor Indutny [Sat, 3 Oct 2015 19:27:19 +0000 (15:27 -0400)]
http_server: pause socket properly
Account pending response data to decide whether pause the socket or
not. Writable stream state is a not reliable measure, because it just
says how much data is pending on a **current** request, thus not helping
much with problem we are trying to solve here.
PR-URL: https://github.com/nodejs/node/pull/3128
Fedor Indutny [Sat, 26 Sep 2015 03:36:06 +0000 (23:36 -0400)]
http: fix out-of-order 'finish' bug in pipelining
Changes to `stream_base.cc` are required to support empty writes.
Fixes CVE-2015-7384, https://github.com/nodejs/node/issues/3138
Fix: https://github.com/nodejs/node/issues/2639
PR-URL: https://github.com/nodejs/node/pull/3128
Rich Trott [Sun, 27 Sep 2015 22:31:36 +0000 (15:31 -0700)]
test: load common.js to test for global leaks
common.js contains code that checks for variables leaking into the
global namespace. Load common.js in all tests that do not
intentionally leak variables.
PR-URL: https://github.com/nodejs/node/pull/3095
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Fedor Indutny [Thu, 1 Oct 2015 21:28:49 +0000 (17:28 -0400)]
crypto: enable FIPS only when configured with it
Do not rely on `OPENSSL_FIPS` in `node_crypto.cc` when building with
shared FIPS-enabled OpenSSL library. Enable FIPS in core only when
configured with `--openssl-fips`.
Fix: https://github.com/nodejs/node/issues/3077
PR-URL: https://github.com/nodejs/node/pull/3153
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Sakthipriyan Vairamani [Thu, 1 Oct 2015 19:15:03 +0000 (00:45 +0530)]
test: fix invalid variable name
The variable `er` is not declared at all. So if EPERM error is ever
raised then the `er` will throw `ReferenceError` and the code will
break.
PR-URL: https://github.com/nodejs/node/pull/3150
Reviewed-By: Brian White <mscdex@mscdex.net>