Evan Lucas
1442cfef73
2018-06-12, Version 10.4.1 (Current)
...
Notable changes:
* **Fixes memory exhaustion DoS** (CVE-2018-7164): Fixes a bug introduced
in 9.7.0 that increases the memory consumed when reading from the network
into JavaScript using the net.Socket object directly as a stream.
* **http2**
* (CVE-2018-7161): Fixes Denial of Service vulnerability by updating the
http2 implementation to not crash under certain circumstances during cleanup
* (CVE-2018-1000168): Fixes Denial of Service vulnerability by upgrading
nghttp2 to 1.32.0
* **tls** (CVE-2018-7162): Fixes Denial of Service vulnerability by updating
the TLS implementation to not crash upon receiving
* **n-api**: Prevent use-after-free in napi_delete_async_work
PR-URL: https://github.com/nodejs-private/node-private/pull/136
v10.4.1
2018-06-12 13:47:23 -05:00
James M Snell
ae5567eaea
test: add regression test for nghttp2 CVE-2018-1000168
...
PR-URL: https://github.com/nodejs-private/node-private/pull/117
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2018-06-12 13:46:52 -05:00
James M Snell
4c90ee8fc6
deps: update to nghttp2 1.32.0
...
This fixes CVE-2018-1000168.
PR-URL: https://github.com/nodejs-private/node-private/pull/117
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2018-06-12 13:46:52 -05:00
James M Snell
8681402228
http2: fixup http2stream cleanup and other nits
...
This fixes CVE-2018-7161.
PR-URL: https://github.com/nodejs-private/node-private/pull/115
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2018-06-12 13:46:52 -05:00
Anna Henningsen
9ba8ed1371
src: re-add Realloc() shrink after reading stream data
...
This would otherwise keep a lot of unused memory lying around,
and in particular add up to a page per chunk of memory overhead
for network reads, potentially opening a DoS vector if the resulting
`Buffer` objects are kept around indefinitely (e.g. stored in a list
and not concatenated until the socket finishes).
This fixes CVE-2018-7164.
Refs: https://github.com/nodejs-private/security/issues/186
Refs: https://github.com/nodejs/node/commit/7c4b09b24bbe7d6a8cbad256f47b30a101a909ea
PR-URL: https://github.com/nodejs-private/node-private/pull/128
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2018-06-12 13:46:52 -05:00
Shigeki Ohtsu
e87bf625dd
test: add tls write error regression test
...
Add a mock TLS socket implementation and a regression test for
the previous commit.
Refs: https://github.com/nodejs-private/security/issues/189
PR-URL: https://github.com/nodejs-private/node-private/pull/127
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2018-06-12 05:16:55 -05:00
Anna Henningsen
eea2bce58d
tls: fix SSL write error handling
...
Fix an use-after-free bug in the TLS implementation.
If we return from `DoWrite()` with an early error, we should
not be storing the `WriteWrap` object and complete it
again at a later point, when it has already been freed
(because of the write error).
This issue was reported by Jordan Zebor at F5 Networks,
who also helped with investigating this bug and coming
up with a reproduction.
This fixes CVE-2018-7162.
Fixes: https://github.com/nodejs-private/security/issues/189
PR-URL: https://github.com/nodejs-private/node-private/pull/127
Reviewed-By: Evan Lucas <evanlucas@me.com >
2018-06-12 05:16:55 -05:00
cjihrig
92d7b6c9a0
fs: fix promises reads with pos > 4GB
...
PR-URL: https://github.com/nodejs/node/pull/21148
Fixes: https://github.com/nodejs/node/issues/21121
Refs: https://github.com/nodejs/node/pull/21003
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
2018-06-12 05:07:16 -05:00
Evan Lucas
8e979482fa
Revert "src: restore stdio on program exit"
...
This reverts commit c2c9c0c3d3 .
It seems to be causing hangs when piping output to other processes.
PR-URL: https://github.com/nodejs/node/pull/21257
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-06-12 05:07:16 -05:00
Anna Henningsen
cb5ec64956
src: reset TTY mode before cleaning up resources
...
Otherwise, closing all handles associated with the main
event loop would also mean that `uv_tty_reset_mode()`
can’t function properly because the corresponding FDs have
already been closed.
Fixes: https://github.com/nodejs/node/issues/21020
PR-URL: https://github.com/nodejs/node/pull/21257
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-06-12 05:07:16 -05:00
Michaël Zasso
e5c2f575b1
deps: patch V8 to 6.7.288.45
...
Refs: https://github.com/v8/v8/compare/6.7.288.44...6.7.288.45
PR-URL: https://github.com/nodejs/node/pull/21192
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-06-12 05:07:16 -05:00
Michaël Zasso
03ded94ffe
deps: patch V8 to 6.7.288.44
...
Refs: https://github.com/v8/v8/compare/6.7.288.43...6.7.288.44
PR-URL: https://github.com/nodejs/node/pull/21146
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-06-12 05:07:16 -05:00
Misty De Meo
1bbfe9a72b
build: fix configure script for double-digits
...
Compare versions using tuples instead of strings so that it is
future-proofed against versions that contain a number that is more than
one digit.
PR-URL: https://github.com/nodejs/node/pull/21183
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-12 05:07:16 -05:00
Rich Trott
1e49eadd68
tools,gyp: fix regex for version matching
...
Tool versions can be 10 and higher. Float patch from node-gyp to
accommodate this fact of life.
PR-URL: https://github.com/nodejs/node/pull/21216
Refs: https://github.com/nodejs/node-gyp/commit/293092c362febffe19f72712467565045e08e8f1
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-06-12 05:07:16 -05:00
Rich Trott
4de7e0c96c
deps,npm: float node-gyp patch on npm
...
This small change makes addon test build successfully with LLVM
10.0.0 and above. This will be fixed in npm source when node-gyp
is updated to 3.6.3 or above.
PR-URL: https://github.com/nodejs/node/pull/21239
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Minwoo Jung <minwoo@nodesource.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-06-12 05:07:16 -05:00
Gabriel Schulhof
53f8563353
n-api: back up env before async work finalize
...
We must back up the value of `_env` before calling the async work
complete callback, because the complete callback may delete the
instance in which `_env` is stored by calling `napi_delete_async_work`,
and because we need to use it after the complete callback has
completed.
Fixes: https://github.com/nodejs/node/issues/20966
PR-URL: https://github.com/nodejs/node/pull/21129
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-06-12 05:07:16 -05:00
Myles Borins
16ef09fc49
Working on v10.4.1
...
PR-URL: https://github.com/nodejs/node/pull/21167
2018-06-06 16:20:30 +02:00
Myles Borins
1e88953977
2018-06-06, Version 10.4.0 (Current)
...
Notable Changes:
* **deps**:
- update V8 to 6.7.288.43 (Michaël Zasso)
https://github.com/nodejs/node/pull/19989
* **stream**:
- ensure Stream.pipeline re-throws errors without callback (Blaine Bublitz)
https://github.com/nodejs/node/pull/20437
PR-URL: https://github.com/nodejs/node/pull/21167
v10.4.0
2018-06-06 14:34:30 +02:00
Myles Borins
440e899d94
tools: ensure doc-only doesn't update package-lock
...
Currently `make doc-only` is updating the package-lock.json
which is breaking our release build.
This adds the flags `--no-package-lock` when
running `npm install` to ensure the package-lock.json is not
changed unintentionally by running make
PR-URL: https://github.com/nodejs/node/pull/21015
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-06 14:31:27 +02:00
Anna Henningsen
afc811cc1c
src: break out of timers loop if !can_call_into_js()
...
Otherwise, this turns into an infinite loop when the flag
is set, because it makes `MakeCallback()` return immediately.
Backport-PR-URL: https://github.com/nodejs/node/pull/21168
PR-URL: https://github.com/nodejs/node/pull/20884
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-06-06 14:28:08 +02:00
Rich Trott
2c671ab2fd
doc: fix typo in addons.md
...
"across version of Node.js" -> "across versions of Node.js"
PR-URL: https://github.com/nodejs/node/pull/21137
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-06-06 10:33:35 +02:00
ErnestoSalazar
48aa4c32d0
zlib: removed extra util require
...
PR-URL: https://github.com/nodejs/node/pull/21069
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-06-06 10:33:35 +02:00
ErnestoSalazar
1d22254c4d
https: removed extra _http_server require
...
PR-URL: https://github.com/nodejs/node/pull/21069
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-06-06 10:33:35 +02:00
Anatoli Papirovski
8161287b40
test: move benchmark-dgram to sequential
...
This test uses hardcoded ports, it should not be located in parallel.
PR-URL: https://github.com/nodejs/node/pull/21144
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-06-06 10:33:35 +02:00
Rich Trott
e2a792866c
doc: add offboarding doc
...
Add minimal document for what to do when a Collaborator moves to
Collaborator Emeritus or leaves the project.
PR-URL: https://github.com/nodejs/node/pull/21103
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Lance Ball <lball@redhat.com >
Reviewed-By: Matheus Marchini <matheus@sthima.com >
2018-06-06 10:33:35 +02:00
Eugene Ostroukhov
1c211ec901
inspector: code cleanup
...
Remove some unused code from the WS server implementation and switch to
smart pointers where possible.
PR-URL: https://github.com/nodejs/node/pull/21070
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-06-06 10:33:35 +02:00
8862f0a613
src: store pointer to Environment on DestroyParam
...
To avoid a potential segfault when inside WeakCallback, store a
reference to Environment inside DestroyParam.
PR-URL: https://github.com/nodejs/node/pull/21099
Reviewed-By: Yang Guo <yangguo@chromium.org >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Co-authored-by: Yang Guo <yangguo@chromium.org >
Co-authored-by: Michaël Zasso <targos@protonmail.com >
2018-06-06 10:33:35 +02:00
Rich Trott
9d41ab466b
test: refactor child-process-fork-net
...
Split test-child-process-fork-net into
test-child-process-fork-net-server and
test-child-process-fork-net-socket. Rename
test-child-process-fork-net2.js to test-child-process-fork-net.js.
Refs: https://github.com/nodejs/node/pull/21012
PR-URL: https://github.com/nodejs/node/pull/21095
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-06 10:33:35 +02:00
Matheus Marchini
820236fd0d
test: mark test-trace-events-fs-sync as flaky
...
test-trace-events-fs-sync has been failing ocasinally on FreeBSD. While
we don't have a fix, it should be marked as flaky.
Ref: https://github.com/nodejs/node/issues/21038
PR-URL: https://github.com/nodejs/node/pull/21039
Refs: https://github.com/nodejs/node/issues/21038
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Lance Ball <lball@redhat.com >
2018-06-06 10:33:35 +02:00
Masashi Hirano
2d36150852
test: string-decorater.lastChar
...
Added test for string-decorater.lastChar to improve coverage.
PR-URL: https://github.com/nodejs/node/pull/21084
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Lance Ball <lball@redhat.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-06 10:32:48 +02:00
Tobias Nießen
1733ef9dec
test: make handling of noWarnCode stricter
...
This change requires all expected warnings to be specified along with
their respective code and will raise an error if the code does not
match. This also kind of fixes the behavior when the expected warning
code was noWarnCode and there is an actual warning code.
PR-URL: https://github.com/nodejs/node/pull/21075
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-06-06 10:32:48 +02:00
Anatoli Papirovski
ba71fe8bd3
timers: check can_call_into_js in Immediates
...
Prevent an infinite loop if it's not possible to call into JS.
PR-URL: https://github.com/nodejs/node/pull/21057
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2018-06-06 10:32:48 +02:00
Daniel Bevenius
1e607d0910
test: add source for test.wasm
...
The original commit 74e7a4a041
("test: add basic WebAssembly test") references the source for
test.wasm and while there are tools to go from wasm to wat but
having the source viewable is helpful I think.
PR-URL: https://github.com/nodejs/node/pull/21082
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Lance Ball <lball@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
2018-06-06 10:32:48 +02:00
Rich Trott
28f2dcb22a
test: update test-dns error message
...
test-dns is in the internet suite and therefore is rarely run. (That
will change soon. We will run internet tests nightly in CI.) Because it
is infrequently run, it was not noticed that it no longer passes. (An
error message has changed to provide more information.) This change
fixes the test so it passes.
PR-URL: https://github.com/nodejs/node/pull/21116
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-06 10:32:48 +02:00
Masashi Hirano
66f4c7bdec
src: fix typo string_search.h comment
...
PR-URL: https://github.com/nodejs/node/pull/21115
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-06 10:32:48 +02:00
Ben Noordhuis
c60810a853
test: increase slop limit in memory leak test
...
It transpires that the extra bookkeeping in debug builds sometimes makes
the increase in RSS go _just_ over the 5 MB limit, by fewer than 100 kB.
Double the limit so we hopefully don't run into it any time again soon.
The memory leak it tests for was one where RSS grew by hundreds of
megabytes over the lifetime of the test; 5 vs. 10 MB is insignificant.
Fixes: https://github.com/nodejs/node/issues/21076
PR-URL: https://github.com/nodejs/node/pull/21080
Refs: https://github.com/nodejs/node/issues/21076
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-06-06 10:31:28 +02:00
Ben Noordhuis
fda8654161
test: log before and after RSS in memory leak test
...
Refs: https://github.com/nodejs/node/issues/21076
PR-URL: https://github.com/nodejs/node/pull/21080
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-06-06 10:31:28 +02:00
Anatoli Papirovski
341b2c21f3
http2: fix premature destroy
...
Check stream._writableState.finished instead of stream.writable
as the latter can lead to premature calls to destroy and dropped
writes on busy processes.
PR-URL: https://github.com/nodejs/node/pull/21051
Fixes: https://github.com/nodejs/node/issues/20750
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-06-06 10:31:28 +02:00
Anatoli Papirovski
8e3e18ef7d
test: unmark test-zlib.zlib-binding.deflate flaky
...
PR-URL: https://github.com/nodejs/node/pull/21109
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2018-06-06 10:31:28 +02:00
Anna Henningsen
bd0d19dae7
test: minor adjustments to test-http2-respond-file
...
PR-URL: https://github.com/nodejs/node/pull/21098
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2018-06-06 10:31:28 +02:00
Anna Henningsen
c4fc1ff295
test: fix flaky async-hooks/test-zlib.zlib-binding.deflate
...
Previously, the typed arrays used in this test would not
automatically be kept alive by the native handle when
it’s using them, so the V8 garbage collector could collect
them while they are still in use by the zlib module,
leading to memory corruption.
Fixes: https://github.com/nodejs/node/issues/20907
PR-URL: https://github.com/nodejs/node/pull/21077
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Yang Guo <yangguo@chromium.org >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-06-06 10:31:28 +02:00
Miklos Suveges
44fe78b09a
stream: inline needMoreData function
...
Inline the needMoreData function since it has only one call place.
Update the related comment.
Add a test for the edge case where HWM=0 and state.length=0.
Add a test for ReadableStream.read(n) method's edge case where
n, HWM and state.length are all zero.
This proves that there is no easy way to simplify the check at
https://github.com/nodejs/node/blob/master/lib/_stream_readable.js#L440
Fixes: https://github.com/nodejs/node/issues/19893
Refs: https://github.com/nodejs/node/pull/19896
PR-URL: https://github.com/nodejs/node/pull/21009
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Lance Ball <lball@redhat.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-06 10:31:28 +02:00
Rich Trott
9ada68b186
benchmark: refactor benchmark/assert/throws.js
...
This is a minor refactor of benchmark/assert/throws.js to
reduce exceptions that need to be made for lint compliance.
PR-URL: https://github.com/nodejs/node/pull/21030
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-06 10:31:28 +02:00
Rich Trott
b8470b929f
benchmark: refactor deepequal-typedarrays
...
This is a minor refactor of benchmark/assert/deepequal-typedarrays.js to
reduce exceptions that need to be made for lint compliance.
PR-URL: https://github.com/nodejs/node/pull/21030
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-06 10:31:28 +02:00
Rich Trott
686587ba1a
benchmark: refactor deepequal-set
...
This is a minor refactor of benchmark/assert/deepequal-set.js to
reduce exceptions that need to be made for lint compliance.
PR-URL: https://github.com/nodejs/node/pull/21030
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-06 10:31:28 +02:00
Rich Trott
56c67595db
benchmark: refactor prims-and-objs-big-loop
...
This is a minor refactor of
benchmark/assert/deepequal-prims-and-objs-big-loop.js to
reduce exceptions that need to be made for lint compliance.
PR-URL: https://github.com/nodejs/node/pull/21030
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-06 10:31:28 +02:00
Rich Trott
6fbb00e887
benchmark: refactor prims-and-objs-big-array-set
...
This is a minor refactor of
benchmark/assert/deepequal-prims-and-objs-big-array-set.js to
reduce exceptions that need to be made for lint compliance.
PR-URL: https://github.com/nodejs/node/pull/21030
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-06 10:31:28 +02:00
Rich Trott
4d714421e9
benchmark: refactor deepequal-object
...
This is a minor refactor of benchmark/assert/deepequal-object.js to
reduce exceptions that need to be made for lint compliance.
PR-URL: https://github.com/nodejs/node/pull/21030
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-06 10:31:28 +02:00
Rich Trott
9b0fc59723
benchmark: refactor deepequal-map
...
This is a minor refactor of benchmark/assert/deepequal-map.js to
reduce exceptions that need to be made for lint compliance.
PR-URL: https://github.com/nodejs/node/pull/21030
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-06 10:31:28 +02:00
Rich Trott
90d86586d2
benchmark: refactor deepequal-buffer
...
This is a minor refactor of benchmark/assert/deepequal-buffer.js to
reduce exceptions that need to be made for lint compliance.
PR-URL: https://github.com/nodejs/node/pull/21030
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-06-06 10:31:28 +02:00