Reinstate crypto.timingSafeEqual() which was reverted due to test
issues. The flaky test issues are resolved in this new changeset.
PR-URL: https://github.com/nodejs/node/pull/8304
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Commit a01e8bc (src: moving f function call comment, 2016-09-04) moved
a comment to be closer to the place in the code it was describing.
While working on this there was feedback on the comment
itself:
https://github.com/nodejs/node/commit/
a01e8bcf189bd598d496f347f60007bc2211e528#comments
This PR includes the suggestions in the above comments.
PR-URL: https://github.com/nodejs/node/pull/8416
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Franziska Hinkelmann <franzih@chromium.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
The uncaught exception test for `_debugger.js` was not exercising some
code (particularly concerning `interface_.child`) because of the
synchronous nature of the test. This adds an asynchronous version to
increase test coverage.
PR-URL: https://github.com/nodejs/node/pull/8403
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
* General copy-editing
* Move `[sudo] make install` step from general Unix build to own step
* Remove `make test-addons` as that is now covered by `make test`
* Standardize on `/path/to/foo` as used elsewhere in the doc
* Change `node -e` to `./node -e` to avoid using different node binary
PR-URL: https://github.com/nodejs/node/pull/8398
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/8229
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
We've determined there is a test issue related to python as
opposed to node, mark as flaky until we can resolve
PR-URL: https://github.com/nodejs/node/pull/8385
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
`malloc(0)` may return NULL on some platforms. Do not report
out-of-memory error unless `malloc` was passed a number greater than
`0`.
PR-URL: https://github.com/nodejs/node/pull/8352
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
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.
- Introduce node::malloc, node::realloc and node::calloc that should
be used throught our source.
- Update all existing node source files to use the new functions
instead of the native allocation functions.
Fixes: https://github.com/nodejs/node/issues/7549
PR-URL: https://github.com/nodejs/node/pull/7564
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
It seems that it is possible with some toolchains for both `__GLIBC__`
and `__UCLIBC__` to be defined, confusing our "do we have execinfo.h?"
logic.
Assume that when `__UCLIBC__` is defined, we are dealing with a libc
that does not have execinfo.h.
Fixes: https://github.com/nodejs/node/issues/8233
PR-URL: https://github.com/nodejs/node/pull/8308
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
The comment about calling the f function seems to have drifted
a little. Moving it to be closer to the actual call.
PR-URL: https://github.com/nodejs/node/pull/8405
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
* add node-test-pull-request link
* minor formatting improvements
PR-URL: https://github.com/nodejs/node/pull/8374
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
It's that time again! Another round of author list updates.
PR-URL: https://github.com/nodejs/node/pull/8346
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Normalize the encoding in getDecoder() before using it. Fixes an
AssertionError: "Cannot change encoding" when encoding is "ucs2",
"ucs-2" or "utf-16le"
Fixes: https://github.com/nodejs/node/issues/8236
PR-URL: https://github.com/nodejs/node/pull/8301
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
fix a wrong link to ../topics/the-event-loop-timers-and-nexttick.md
PR-URL: https://github.com/nodejs/node/pull/8315
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/8370
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Changes inspector integration to use Node.js script file name as target
title (reported in JSON and shown in developer tools UIs). It will also
report file:// URL for the script as some tools seem to use that field
to open the script in the editor.
PR-URL: https://github.com/nodejs/node/pull/8243
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
Check the error condition testing for passing something other than a
string or buffer. Currently, there are no tests for this.
PR-URL: https://github.com/nodejs/node/pull/8350
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed By: James M Snell <jasnell@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Use process.emitWarning() instead of the internal printDeprecationMessage
in order to avoid use of an internal only API.
PR-URL: https://github.com/nodejs/node/pull/8166
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
The process.emitWarning() API should be used for printing
deprecation warning messages rather than directly using the
internal/util#printDeprecationMessage
PR-URL: https://github.com/nodejs/node/pull/8166
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Check for the number of messages received in the `exit` event listener
instead of the `disconnect` listener.
Fixes: https://github.com/nodejs/node/issues/8380
PR-URL: https://github.com/nodejs/node/pull/8383
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed By: James M Snell <jasnell@gmail.com>
Move the implementation of SyncWriteStream to internal/fs.
PR-URL: https://github.com/nodejs/node/pull/6749
Reviewed-By: Ron Korving <ron@ronkorving.nl>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
If ::1 can't be resolved, the test should still pass.
PR-URL: https://github.com/nodejs/node/pull/8254
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reword and re-organize. Only significant content change is to
specifically call out the two-CTC-member-LGTM requirement for
semver-major changes.
PR-URL: https://github.com/nodejs/node/pull/8344
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
The test is sometimes timing out because of a race condition between
the fs event generated on file creation and the event being registered
in the kqueue. To avoid this problem, create the file after 100 ms,
that is the value used in the `fs_event_watch_dir_recursive` libuv test.
PR-URL: https://github.com/nodejs/node/pull/4629
Reviewed-By: Rich Trott <rtrott@gmail.com>
* Move shared code into common
* Favor use of strictEqual
* Add some missing common.mustCalls
* Other general cleanup
PR-URL: https://github.com/nodejs/node/pull/8261
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Opt-out `nightly` and `next-nightly` from the documentation
requirement since these docs aren't meant to be published.
This fixes our nightly jobs in CI.
PR-URL: https://github.com/nodejs/node/pull/8325
Fixes: https://github.com/nodejs/build/issues/478
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/nodejs/node/pull/8326
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
node.cc had two functions with the name AtExit with entirely different
purposes:
* node::AtExit(): file static; used to register the atexit(3) handler
for the Node process.
* node::AtExit(void (*)(void*), void*): publicly exported symbol that
addons can use to request callbacks upon exit.
For code readability it is better to avoid the unintentional overload.
PR-URL: https://github.com/nodejs/node/pull/8273
Reviewed-By: addaleax - Anna Henningsen <anna@addaleax.net>
Reviewed-By: jasnell - James M Snell <jasnell@gmail.com>
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
This fixes a race condition when messages are coming while V8 is still
dispatching the previous batch.
PR-URL: https://github.com/nodejs/node/pull/8264
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
This change simplifies buffer management to address a number of issues
that original implementation had.
Original implementation was trying to reduce the number of allocations
by providing regions of the internal buffer to libuv IO code. This
introduced some potential use after free issues if the buffer grows
(or shrinks) while there's a pending read. It also had some confusing
math that resulted in issues on Windows version of the libuv.
PR-URL: https://github.com/nodejs/node/pull/8257
Fixes: https://github.com/nodejs/node/issues/8155
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
This adds support for multiple HTTP benchmarkers. Adds autocannon
as the secondary benchmarker.
PR-URL: https://github.com/nodejs/node/pull/8140
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Currently, there are no tests that exercise `zlib.createInflateRaw()` or
`zlib.createDeflateRaw()`.
This adds minimal tests that invoke the functions and confirm that they
return `zlib.InflateRaw`/`zlib.DeflateRaw` objects.
PR-URL: https://github.com/nodejs/node/pull/8306
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
* Changed `==` to `includes` for clarity.
* Switched to `assert.strictEqual` from `assert.equal`
* Changed some `var` to `const`
* Test cleanup with `common.refreshTmpDir`
PR-URL: https://github.com/nodejs/node/pull/8305
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
If `IsWindows7OrGreater()` returns `false`, the Node.js program should
exit with a more specific code ERROR_EXE_MACHINE_TYPE_MISMATCH instead
the code 0x1(ERROR_INVALID_FUNCTION)
PR-URL: https://github.com/nodejs/node/pull/8204
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>