Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-08-15http2: pause input processing if sending outputAnna Henningsen
If we are waiting for the ability to send more output, we should not process more input. This commit a) makes us send output earlier, during processing of input, if we accumulate a lot and b) allows interrupting the call into nghttp2 that processes input data and resuming it at a later time, if we do find ourselves in a position where we are waiting to be able to send more output. This is part of mitigating CVE-2019-9511/CVE-2019-9517. Backport-PR-URL: https://github.com/nodejs/node/pull/29123 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-15http2: stop reading from socket if writes are in progressAnna Henningsen
If a write to the underlying socket finishes asynchronously, that means that we cannot write any more data at that point without waiting for it to finish. If this happens, we should also not be producing any more input. This is part of mitigating CVE-2019-9511/CVE-2019-9517. Backport-PR-URL: https://github.com/nodejs/node/pull/29123 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-15http2: consider 0-length non-end DATA frames an errorAnna Henningsen
This is intended to mitigate CVE-2019-9518. Backport-PR-URL: https://github.com/nodejs/node/pull/29123 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-15http2: shrink default `vector::reserve()` allocationsAnna Henningsen
Allocating memory upfront comes with overhead, and in particular, `std::vector` implementations do not necessarily return memory to the system when one might expect that (e.g. after shrinking the vector). Backport-PR-URL: https://github.com/nodejs/node/pull/29123 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-15http2: handle 0-length headers betterAnna Henningsen
Ignore headers with 0-length names and track memory for headers the way we track it for other HTTP/2 session memory too. This is intended to mitigate CVE-2019-9516. Backport-PR-URL: https://github.com/nodejs/node/pull/29123 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-15http2: limit number of invalid incoming framesAnna Henningsen
Limit the number of invalid input frames, as they may be pointing towards a misbehaving peer. The limit is currently set to 1000 but could be changed or made configurable. This is intended to mitigate CVE-2019-9514. [This commit differs from the v12.x one due to the lack of https://github.com/libuv/libuv/commit/ee24ce900e5714c950b248da2b. See the comment in the test for more details.] Backport-PR-URL: https://github.com/nodejs/node/pull/29123 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-15http2: limit number of rejected stream openingsAnna Henningsen
Limit the number of streams that are rejected upon creation. Since each such rejection is associated with an `NGHTTP2_ENHANCE_YOUR_CALM` error that should tell the peer to not open any more streams, continuing to open streams should be read as a sign of a misbehaving peer. The limit is currently set to 100 but could be changed or made configurable. This is intended to mitigate CVE-2019-9514. Backport-PR-URL: https://github.com/nodejs/node/pull/29123 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-15http2: do not create ArrayBuffers when no DATA receivedAnna Henningsen
Lazily allocate `ArrayBuffer`s for the contents of DATA frames. Creating `ArrayBuffer`s is, sadly, not a cheap operation with V8. This is part of performance improvements to mitigate CVE-2019-9513. Together with the previous commit, these changes improve throughput in the adversarial case by about 100 %, and there is little more that we can do besides artificially limiting the rate of incoming metadata frames (i.e. after this patch, CPU usage is virtually exclusively in libnghttp2). [This backport also applies changes from 83e1b9744317 and required some manual work due to the lack of `AllocatedBuffer` on v10.x.] Refs: https://github.com/nodejs/node/pull/26201 Backport-PR-URL: https://github.com/nodejs/node/pull/29123 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-15http2: only call into JS when necessary for session eventsAnna Henningsen
For some JS events, it only makes sense to call into JS when there are listeners for the event in question. The overhead is noticeable if a lot of these events are emitted during the lifetime of a session. To reduce this overhead, keep track of whether any/how many JS listeners are present, and if there are none, skip calls into JS altogether. This is part of performance improvements to mitigate CVE-2019-9513. Backport-PR-URL: https://github.com/nodejs/node/pull/29123 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-15http2: improve JS-side debug loggingAnna Henningsen
DRY up the `debug()` calls, and in particular, avoid building template strings before we know whether we need to. Backport-PR-URL: https://github.com/nodejs/node/pull/29123 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-15deps: update nghttp2 to 1.39.2Anna Henningsen
This includes mitigations for CVE-2019-9512/CVE-2019-9515. Backport-PR-URL: https://github.com/nodejs/node/pull/29123 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-15deps: update nghttp2 to 1.39.1gengjiawen
Backport-PR-URL: https://github.com/nodejs/node/pull/29123 PR-URL: https://github.com/nodejs/node/pull/28448 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-08-15deps: update nghttp2 to 1.38.0gengjiawen
Backport-PR-URL: https://github.com/nodejs/node/pull/29123 PR-URL: https://github.com/nodejs/node/pull/27295 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com>
2019-08-15deps: update nghttp2 to 1.37.0gengjiawen
Backport-PR-URL: https://github.com/nodejs/node/pull/29123 PR-URL: https://github.com/nodejs/node/pull/26990 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-08-15src: pass along errors from http2 object creationAnna Henningsen
[This backport applied to v10.x cleanly.] Backport-PR-URL: https://github.com/nodejs/node/pull/29123 PR-URL: https://github.com/nodejs/node/pull/25822 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2019-08-15http2: improve http2 code a bitJames M Snell
Multiple general improvements to http2 internals for readability and efficiency [This backport applied to v10.x cleanly.] Backport-PR-URL: https://github.com/nodejs/node/pull/29123 PR-URL: https://github.com/nodejs/node/pull/23984 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2019-08-07Working on v10.16.3Beth Griggs
PR-URL: https://github.com/nodejs/node/pull/29021
2019-08-062019-08-06, Version 10.16.2 'Dubnium' (LTS)v10.16.2Beth Griggs
Notable changes: This release patches a regression in the OpenSSL upgrade to 1.1.1c that causes intermittent hangs in machines that have low entropy. Refs: https://github.com/nodejs/node/issues/28932 PR-URL: https://github.com/nodejs/node/pull/29021
2019-08-06deps: cherry-pick c19c5a6 from openssl upstreamAli Ijaz Sheikh
Original commit message: Revert the DEVRANDOM_WAIT feature The DEVRANDOM_WAIT feature added a select() call to wait for the `/dev/random` device to become readable before reading from the `/dev/urandom` device. It was introduced in commit 38023b8 in order to mitigate the fact that the `/dev/urandom` device does not block until the initial seeding of the kernel CSPRNG has completed, contrary to the behaviour of the `getrandom()` system call. It turned out that this change had negative side effects on the performance which were not acceptable. After some discussion it was decided to revert this feature and leave it up to the OS resp. the platform maintainer to ensure a proper initialization during early boot time. Fixes 9078 This partially reverts commit 38023b8. Refs: https://github.com/openssl/openssl/pull/9084 Fixes: https://github.com/nodejs/node/issues/28932 PR-URL: https://github.com/nodejs/node/pull/28983 Reviewed-By: Shigeki Ohtsu <ohtsu@ohtsu.org> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-07-31Working on v10.16.2Beth Griggs
PR-URL: https://github.com/nodejs/node/pull/28731
2019-07-312019-07-31, Version 10.16.1 'Dubnium' (LTS)v10.16.1Beth Griggs
Notable changes: - **deps**: upgrade openssl sources to 1.1.1c (Sam Roberts) [#28212](https://github.com/nodejs/node/pull/28212) - **stream**: do not unconditionally call `\_read()` on `resume()` (Anna Henningsen) [#26965](https://github.com/nodejs/node/pull/26965) - **worker**: fix nullptr deref after MessagePort deser failure (Anna Henningsen) [#25076](https://github.com/nodejs/node/pull/25076) PR-URL: https://github.com/nodejs/node/pull/28731
2019-07-30src: handle empty Maybe in uv binding initializeAnna Henningsen
This can fail when terminating a Worker that loads the `uv` binding at the same time. Refs: https://github.com/nodejs/node/pull/25061#issuecomment-447648475 Fixes: https://github.com/nodejs/node/issues/25134 PR-URL: https://github.com/nodejs/node/pull/25079 Backport-PR-URL: https://github.com/nodejs/node/pull/28832 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-07-26test: remove `util.inherits()` usageZYSzys
Backport-PR-URL: https://github.com/nodejs/node/pull/28795 PR-URL: https://github.com/nodejs/node/pull/25245 Refs: https://github.com/nodejs/node/pull/24755 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-07-26tools: replace rollup with nccRich Trott
Replace rollup + plugins + config file with zeit/ncc package designed to do the particular task that we're leveraging rollup for but with zero-ish configuration. (rollup can do a whole lot more, but we're using a tiny portion of its functionality.) PR-URL: https://github.com/nodejs/node/pull/24813 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Backport-PR-URL: https://github.com/nodejs/node/pull/28736
2019-07-26deps: update archs files for OpenSSL-1.1.1cSam Roberts
After an OpenSSL source update, all the config files need to be regenerated and comitted by: $ cd deps/openssl/config $ make $ git add deps/openssl/config/archs $ git add deps/openssl/openssl/crypto/include/internal/bn_conf.h $ git add deps/openssl/openssl/crypto/include/internal/dso_conf.h $ git add deps/openssl/openssl/include/openssl/opensslconf.h $ git commit PR-URL: https://github.com/nodejs/node/pull/28212 Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2019-07-26deps: upgrade openssl sources to 1.1.1cSam Roberts
This updates all sources in deps/openssl/openssl by: $ cd deps/openssl/ $ rm -rf openssl $ tar zxf ~/tmp/openssl-1.1.1c.tar.gz $ mv openssl-1.1.1c openssl $ git add --all openssl $ git commit openssl PR-URL: https://github.com/nodejs/node/pull/28212 Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2019-07-26deps: updated openssl upgrade instructionsSam Roberts
Patching the s390 asm rules is no longer required. See: https://github.com/openssl/openssl/pull/8351 PR-URL: https://github.com/nodejs/node/pull/28212 Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2019-07-25test: fix pty test hangs on aixBen Noordhuis
Some pty tests persistently hung on the AIX CI buildbots. Fix that by adding a helper script that properly sets up the pty before spawning the script under test. On investigation I discovered that the test runner hung when it tried to close the slave pty's file descriptor, probably due to a bug in AIX's pty implementation. I could reproduce it with a short C program. The test runner also leaked file descriptors to the child process. I couldn't convince python's `subprocess.Popen()` to do what I wanted it to do so I opted to move the logic to a helper script that can do fork/setsid/etc. without having to worry about stomping on state in tools/test.py. In the process I also uncovered some bugs in the pty module of the python distro that ships with macOS 10.14, leading me to reimplement a sizable chunk of the functionality of that module. And last but not least, of course there are differences between ptys on different platforms and the helper script has to paper over that. Of course. Really, this commit took me longer to put together than I care to admit. Caveat emptor: this commit takes the hacky ^D feeding to the slave out of tools/test.py and puts it in the *.in input files. You can also feed other control characters to tests, like ^C or ^Z, simply by inserting them into the corresponding input file. I think that's nice. Fixes: https://github.com/nodejs/build/issues/1820 Fixes: https://github.com/nodejs/node/issues/28489 PR-URL: https://github.com/nodejs/node/pull/28600 Backport-PR-URL: https://github.com/nodejs/node/pull/28826 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-07-25test: skip stringbytes-external-exceed-max on AIXSam Roberts
Add SKIP status for more tests in stringbytes-external-exceed-max that are failing on AIX. PR-URL: https://github.com/nodejs/node/pull/28516 Backport-PR-URL: https://github.com/nodejs/node/pull/28826 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-07-25test: skip tests related to CI failures on AIXSam Roberts
These tests seem to trigger failures in the entire CI job (not just the test) on AIX. Skip them to see if that helps alleviate spurious failures in node-test-commit-aix (and the upstream PR and commit test jobs). See: - https://github.com/nodejs/build/issues/1820#issuecomment-505998851 - https://github.com/nodejs/build/issues/1847#issuecomment-504210708 PR-URL: https://github.com/nodejs/node/pull/28469 Backport-PR-URL: https://github.com/nodejs/node/pull/28826 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-16test: clean up build filesGabriel Schulhof
Files generated by the build process were accidentally included as part of an earlier commit. This removes them. PR-URL: https://github.com/nodejs/node/pull/28297 Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2019-07-16tls: add debugging to native TLS codeAnna Henningsen
Backport-PR-URL: https://github.com/nodejs/node/pull/27967 PR-URL: https://github.com/nodejs/node/pull/26843 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-16tls: add CHECK for impossible conditionAnna Henningsen
Backport-PR-URL: https://github.com/nodejs/node/pull/27967 PR-URL: https://github.com/nodejs/node/pull/26843 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-16src: fix Get() usage in tls_wrap.cccjihrig
Backport-PR-URL: https://github.com/nodejs/node/pull/27967 PR-URL: https://github.com/nodejs/node/pull/24060 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-07-16src: in-source comments and minor TLS cleanupsSam Roberts
Renamed some internal C++ methods and properties for consistency, and commented SSL I/O. - Rename waiting_new_session_ after is_waiting_new_session(), instead of using reverse naming (new_session_wait_), and change "waiting" to "awaiting". - Make TLSWrap::ClearIn() return void, the value is never used. - Fix a getTicketKeys() cut-n-paste error. Since it doesn't use the arguments, remove them from the js wrapper. - Remove call of setTicketKeys(getTicketKeys()), its a no-op. Backport-PR-URL: https://github.com/nodejs/node/pull/27967 PR-URL: https://github.com/nodejs/node/pull/25713 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-07-16doc: adjust TOC marginsRoman Reiss
PR-URL: https://github.com/nodejs/node/pull/28075 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2019-07-16stream: convert existing buffer when calling .setEncodingAnna Henningsen
Convert already-stored chunks when `.setEncoding()` is called so that subsequent `data` events will receive decoded strings, as they expect. Fixes: https://github.com/nodejs/node/issues/27932 PR-URL: https://github.com/nodejs/node/pull/27936 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-16process: make stdout and stderr emit 'close' on destroyMatteo Collina
Fix: https://github.com/nodejs/node/issues/26550 PR-URL: https://github.com/nodejs/node/pull/26691 Fixes: https://github.com/false Fixes: https://github.com/nodejs/node/issues/26550 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-07-16stream: do not unconditionally call `_read()` on `resume()`Anna Henningsen
`readable.resume()` calls `.read(0)`, which in turn previously set `needReadable = true`, and so a subsequent `.read()` call would call `_read()` even though enough data was already available. This can lead to elevated memory usage, because calling `_read()` when enough data is in the readable buffer means that backpressure is not being honoured. Fixes: https://github.com/nodejs/node/issues/26957 PR-URL: https://github.com/nodejs/node/pull/26965 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-16stream: make _read() be called indefinitely if the user wants soMatteo Collina
Fixes: https://github.com/nodejs/node/issues/26097 PR-URL: https://github.com/nodejs/node/pull/26135 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-16src: remove internalBinding('config').warningFileJoyee Cheung
Instead use `require('internal/options')` lazily. Also refactor the call site a bit so that the option is queried only once since it's synchronous anyway. PR-URL: https://github.com/nodejs/node/pull/24959 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-07-16doc: add missing changes entryRuben Bridgewater
The `util.format()` behavior changed recently. Add the changes entry to document the new BigInt behavior. PR-URL: https://github.com/nodejs/node/pull/24758 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-07-16src: fix warning in cares_wrap.cccjihrig
This commit fixes the following warning: ./src/cares_wrap.cc:1268:5: warning: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Wsign-compare] CHECK_EQ(ret->Length(), a_count + aaaa_count); PR-URL: https://github.com/nodejs/node/pull/25230 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-07-16src: fulfill Maybe contract in InlineDecoderAnna Henningsen
Use an empty/nothing `Maybe<>` to indicate a pending exception. PR-URL: https://github.com/nodejs/node/pull/25140 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-07-16worker: fix nullptr deref after MessagePort deser failureAnna Henningsen
This would previously always have crashed when deserializing a `MessagePort` fails, because there was always at least one `nullptr` entry in the vector. PR-URL: https://github.com/nodejs/node/pull/25076 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2019-07-16src: extract common Bind methodJon Moss
`TCPWrap::Bind` and `TCPWrap::Bind6` share a large amount of functionality, so a common `Bind` was extracted to remove duplication. Backport-PR-URL: https://github.com/nodejs/node/pull/28222 PR-URL: https://github.com/nodejs/node/pull/22315 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2019-07-16async_hooks: avoid double-destroy HTTPParserGerhard Stoebich
Avoid that destroy hook is invoked twice - once via `Parser::Free()` and once again via `Parser::Reinitialize()` by clearing the async_id in `EmitDestroy()`. Partial backport of https://github.com/nodejs/node/pull/27477, a full backport would require also https://github.com/nodejs/node/pull/25094 which has a dont-land-on-v10.x label on it. Fixes: https://github.com/nodejs/node/issues/26961 Backport-PR-URL: https://github.com/nodejs/node/pull/27986 PR-URL: https://github.com/nodejs/node/pull/27477 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-25src: elevate v8 namespaces for node_process.ccJayasankar
Elevate namespace for repeated entities. Resolved conflicts. PR-URL: https://github.com/nodejs/node/pull/24578 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2019-06-07tls: renegotiate should take care of its own stateSam Roberts
In the initial version of this test there were two zero-length writes to force tls state to cycle. The second is not necessary, at least not now, but the first was. The renegotiate() API should ensure that packet exchange takes place, not its users, so move the zero-length write into tls. See: https://github.com/nodejs/node/pull/14239 See: https://github.com/nodejs/node/commit/b1909d3a70f9 Backport-PR-URL: https://github.com/nodejs/node/pull/27938 PR-URL: https://github.com/nodejs/node/pull/25997 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-06-06deps: V8: backport f27ac28Michaël Zasso
Original commit message: [turbofan] Pin pure unreachable values to effect chain (in rep selection) Currently, if we lower to a pure computation that is unreachable because of some runtime check, we just rename it with DeadValue. This is problematic if the pure computation gets later eliminated - that allows the DeadValue node float above the check that makes it dead. As we conservatively lower DeadValues to debug-break (i.e., crash), we might induce crash where we should not. With this CL, whenever we lower an impossible effectful node (i.e., with Type::None) to a pure node in simplified lowering, we insert an Unreachable node there (pinned to the effect chain) and mark the impossible node dead (and make it depend on the Unreachable node). Bug: chromium:910838 Change-Id: I218991c79b9e283a9dd5beb4d3f0c4664be76cb2 Reviewed-on: https://chromium-review.googlesource.com/c/1365274 Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Jaroslav Sevcik <jarin@chromium.org> Cr-Commit-Position: refs/heads/master@{#58066} Refs: https://github.com/v8/v8/commit/f27ac2806c585d8b1e61ac16d78a2a396d536669 PR-URL: https://github.com/nodejs/node/pull/28061 Fixes: https://github.com/nodejs/node/issues/27107 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>