Commit Graph
10751 Commits
Author SHA1 Message Date
James M Snell 1662b69955 src: make the options structs smaller with packed bits
While the Options objects are not a significant overhead,
they still waste a few hundred bytes due to sloppy definition
and alignment issues. Tighten it up and shave off a couple
hundred wasted bytes.

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65145
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
2026-08-13 10:06:37 -07:00
Antoine du Hamel 73eed9be27 src: escape Windows environment variables in task runner
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
2026-08-13 16:34:53 +00:00
Trivikram Kamat c47ad66162 ffi: reject detached ArrayBufferViews
Detached ArrayBuffers were rejected with ERR_INVALID_ARG_VALUE, but
detached views were not: typed arrays exported zero bytes and DataViews
threw a bare TypeError from byteLength.

Track detachment in ArrayBufferViewContents::Read() and skip the JS
length check for detached buffers, so every detached input is rejected.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
PR-URL: https://github.com/nodejs/node/pull/65086
Fixes: https://github.com/nodejs/node/issues/65085
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-08-13 15:25:11 +00:00
Trivikram Kamat 525e8f43e0 ffi: reject detached ArrayBuffers as pointers
Reject detached ArrayBuffers and ArrayBuffer views in getRawPointer()
and FFI pointer argument conversion. This prevents detached backing
stores from being silently passed to native functions as null pointers.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
PR-URL: https://github.com/nodejs/node/pull/65083
Fixes: https://github.com/nodejs/node/issues/65082
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-08-13 14:58:23 +00:00
Edy Silva f46e96fe54 sqlite: expose prepared statement statistics
Signed-off-by: geeksilva97 <edigleyssonsilva@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64541
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-08-13 13:59:56 +00:00
James M Snell d9966100cf test: add permission fast api test
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:42 -07:00
James M Snell dee1fe76a0 src: apply minor namespace format tweak in permissions
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:40 -07:00
James M Snell d157b005d4 src: simplify permissions with BooleanPermissions
Most of the PermissionBase subclasses used the identical
simple pattern. Rather than define a bunch of individual
identical permissions, use a single utility definition.
Special cases like FsPermission are still possible but
the simple case is kept... well, simple.

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:38 -07:00
James M Snell 55e00cfa60 src: simplify includes in permissions
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:37 -07:00
James M Snell 9e733fa232 src: apply a modest performance perf to permissions
Improve the way the RadixTree works and apply a
fast api call.

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:36 -07:00
James M Snell 14a4f3aacb src: make permission storage a bit more efficient
Use a fixed array rather than an unordered list

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:34 -07:00
James M Snell ae2ce9d05d src: apply multiple general cleanups to permissions
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:33 -07:00
James M Snell adcc6fc1e5 src: simplify c++ diagnostics channel API
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:32 -07:00
James M Snell 18c2da1346 src: make minor cleanup to permission checks
Getting the name of the channel is unnecessary.

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:30 -07:00
James M Snell 9dc2f0d86d src: use DictionaryTemplate for permission diag channel message
Since DiagnosticChannel permission messages always have the
same shape and should be as low cost as possible, use a
cached DictionaryTemplate for creating them

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:29 -07:00
James M Snell 79720e98c1 src: cache permission strings
Use env_property strings for permissions since those
are fixed. Avoid creating new string instances each
time.

Also use ToV8Value for a couple since we're in here.

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65158
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-12 08:58:28 -07:00
James M Snell bfa3e982ec lib,src: improve histogram implementation
Several improvements:

1. In histogram-inl, Add previous locked only this->mutex while
   reading the other's fields unsafely.
2. In histogram.cc, PrepareCB now uses ContainerOf
3. In histogram.cc, BigInt value range is checked
4. In histogram.js, simplified impl and reduced duplication
5. In event_loop_delay.js, use a more consistent constructor

Adds new analytical APIs to Histogram

* histogram.ccdf(value)
* histogram.cdf(value)
* histogram.countAt(value)
* histogram.ksTest(other)
* histogram.kurtosis
* histogram.linearBuckets(stepSize)
* histogram.logBuckets(first, base)
* histogram.percentilesAt(percentiles)
* histogram.shewness

On RecordableHistogram

* histogram.recordCorrected(val, expectedInterval)
* histogram.subtract(other)

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus
PR-URL: https://github.com/nodejs/node/pull/65024
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-08-12 07:41:57 -07:00
James M Snell 3ad942784a src: shave about 20 bytes off each TLSWrap instance
By shifting from individual bool fields to a packed struct
we can save 20 bytes per TLSWrap instance

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65144
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2026-08-12 07:38:55 -07:00
Trivikram Kamat 2fbd056876 ffi: validate fast pointer BigInt argument ranges
Optimized V8 fast API calls truncate out-of-range pointer BigInts.
Validate them against uintptrMax before invoking the raw function
so optimized calls match the generic and shared-buffer paths.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
PR-URL: https://github.com/nodejs/node/pull/65032
Fixes: https://github.com/nodejs/node/issues/65031
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-08-12 02:46:06 +00:00
Guilherme Araújo b0edc373a6 sqlite: manage sqlite3_stmt lifetime with RAII
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/62419
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-11 23:47:37 +00:00
Max H Fisher 559afb1a7e src: add SetAbortHandler
Signed-off-by: Max H Fisher <mfisher187@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/64684
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-08-11 19:32:40 -04:00
Antoine du Hamel eff293f61e meta: add support for alpha prerelease tag
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63135
Refs: https://github.com/nodejs/Release/issues/1154
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-08-11 21:26:33 +00:00
Filip Skokan ed9f464b31 crypto: disable non-FIPS WebCrypto paths in FIPS mode
Hide TurboSHAKE and KangarooTwelve when FIPS is enabled. Reject cSHAKE
and KMAC parameters that require implementations outside the OpenSSL
provider, while keeping provider-backed paths available.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65172
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2026-08-11 19:34:34 +00:00
semimikoh 673cdef7d9 sqlite: check sqlite3_step() and sqlite3_reset() results
Signed-off-by: semimikoh <ejffjeosms@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63319
Fixes: https://github.com/nodejs/node/issues/63311
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-11 15:30:37 +00:00
James M Snell 2fa068af8c src: use concepts where appropriate
Some general modernizations of templates

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65148
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2026-08-11 14:08:57 +00:00
Trevor Burnham cb9bb66780 sqlite: reject statement-less SQL in prepare()
Apply the same check to DatabaseSync::Prepare() so that statement-less
SQL is rejected at preparation instead of on first use. This matches
SQLite's own oo1 JavaScript API, which throws when the SQL contains no
statements rather than exposing the C API's null statement pointer.

Previously db.prepare('-- comment') returned a StatementSync whose
statement_ was null. Every method on it threw "statement has been
finalized", which was misleading because nothing had been finalized, and
the object was still inserted into statements_. Since IsFinalized() is
true for a null statement, its destructor skipped UntrackStatement() and
left a dangling pointer in the set that a later close() would finalize.

Refs: https://github.com/nodejs/node/pull/65157#discussion_r3742903347
Refs: https://sqlite.org/wasm/doc/trunk/api-oo1.md

Signed-off-by: Trevor Burnham <trevorburnham@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65157
Fixes: https://github.com/nodejs/node/issues/65149
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-11 03:14:51 +00:00
Trevor Burnham 71b3676332 sqlite: reject statement-less SQL in SQLTagStore
sqlite3_prepare_v2() returns SQLITE_OK without producing a statement
when its input holds no SQL, such as a comment. PrepareStatement() only
checked the return code, so it cached a StatementSync wrapping a null
sqlite3_stmt. Executing it reached sqlite3_clear_bindings(), which only
guards against a null statement under SQLITE_ENABLE_API_ARMOR, and
segfaulted.

Reject such input instead of caching it. The StatementSync methods
already avoid the crash because their IsFinalized() guard treats a null
statement as finalized.

Fixes: https://github.com/nodejs/node/issues/65149

Signed-off-by: Trevor Burnham <trevorburnham@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65157
Fixes: https://github.com/nodejs/node/issues/65149
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-11 03:14:50 +00:00
Node.js GitHub Bot a576f1cd49 deps: update undici to 8.10.0
PR-URL: https://github.com/nodejs/node/pull/65155
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-11 00:36:25 +00:00
agape1225 2f65b902d8 dns: reserve vector capacity in ParseTxtReply
The chunks vector's upper bound is known before the loop starts
(str_count from ares_dns_rr_get_abin_cnt), so reserve the capacity
upfront to avoid unnecessary reallocations.

Signed-off-by: agape1225 <49804691+agape1225@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64978
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-08-10 15:58:34 +00:00
Tim Perry 64a762b7d3 stream: fix flaky stream destroy, reachable from HTTP/2 teardown
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65079
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-08-10 09:06:30 +02:00
Kamat, Trivikram ab95309457 sqlite: isolate applyChangeset filter errors
Track filter callback failures within each applyChangeset() invocation.
Returning false from xFilter is not a SQLite error. This previously left
the database-wide suppression flag set, which could hide the next
unrelated SQLite error.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
PR-URL: https://github.com/nodejs/node/pull/64823
Fixes: https://github.com/nodejs/node/issues/64822
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-09 23:03:08 -07:00
Kamat, Trivikram b2b7405d26 sqlite: reject deserialize() while in a callback
deserialize() could be called from a user-defined function invoked
during statement execution, tearing down the database connection while
sqlite3_step() was still using it. Reuse the existing callback depth
check to throw ERR_INVALID_STATE instead, matching the guard already
in place for close().

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
PR-URL: https://github.com/nodejs/node/pull/64796
Refs: https://github.com/nodejs/node/issues/64795
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2026-08-09 16:26:58 -07:00
Trivikram Kamat bf2f995661 ffi: reuse the callable created per symbol
CreateFunction() ran on every getFunction() call, every getFunctions()
call, and every read of the functions accessor, each time emitting a
trampoline, allocating an FFIFunctionInfo, and on the SharedBuffer path
an ArrayBuffer. lib.functions.foo was therefore a different function on
each read, and calling through the accessor in a loop leaked a page per
iteration until GC: 20000 calls grew RSS by 58 MiB.

Cache the created callable per symbol in function_wrappers_, and
memoize the JS wrapper composed around it. Both entries are weak, so
dropping the last user reference still releases the wrapper and its
trampoline. The JS side stores a WeakRef because V8 can keep a raw
function alive after the wrapper is gone, and a strong value would pin
every wrapper for the lifetime of the library.

Signed-off-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>
Assisted-by: claude:opus-5
PR-URL: https://github.com/nodejs/node/pull/64971
Fixes: https://github.com/nodejs/node/issues/64970
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-08-09 16:18:33 -07:00
Trivikram Kamat 51a55d4b38 ffi: shrink trampoline placement probe window
AllocateCodeNear() searched 1024 pages in each direction for a free
page next to the native target, one MAP_FIXED_NOREPLACE mmap per
candidate. Every probe is expected to fail, so an exhausted window cost
up to 2048 failing syscalls before taking the plain-mmap fallback that
was already there, all to enable a jmp rel32 instead of movabs+jmp.
Resolving a fast-eligible signature plateaued at ~790us, against ~28us
for one that allocates no trampoline.

Reduce the window to 16 pages per direction, bounding the exhausted
case to 32 probes while still covering typical per-library symbol
counts. Placement stays opportunistic: the caller already emits the
absolute form when EmitJmpRel32() reports the target is out of range.

Signed-off-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>
Assisted-by: claude:opus-5
PR-URL: https://github.com/nodejs/node/pull/64969
Fixes: https://github.com/nodejs/node/issues/64968
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-08-09 16:14:53 -07:00
Adam Mcgrath 11423b1007 crypto: add mgf1Hash for RSA-OAEP
Signed-off-by: Adam Mcgrath <adam.mcgrath@okta.com>
PR-URL: https://github.com/nodejs/node/pull/65073
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-09 19:06:22 -04:00
Archkon f6db7bc44c process: validate resource stats array offsets
Assert that the internally allocated Float64Array views used by CPU,
thread CPU, memory, and resource statistics have zero byte offsets.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/65098
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-09 19:04:30 -04:00
Tim Perry e79c6b31cc tls,quic: commonize TLS cert handling between tls, dtls & quic
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64711
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-09 18:56:10 -04:00
Archkon 8f518788f9 sea: avoid dangling CLI option pointers
Reserve exec argv storage before inserting configured and CLI-expanded
arguments so vector reallocation cannot invalidate pointers in argv.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64755
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-09 19:11:39 +00:00
Archkon cf44862eb3 sea: handle NUL bytes in asset keys
Construct the asset lookup string_view with the explicit Utf8Value
length so embedded NUL bytes do not truncate keys.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64773
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-09 19:11:28 +00:00
Archkon bc6db3e879 sea: reject trailing content in config JSON
Ensure the on-demand parser reaches the end of the document after
reading the root object. Reject concatenated JSON values with
TRAILING_CONTENT

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64774
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-09 19:11:12 +00:00
Archkon ab9afa9267 src: match cmd.exe case-insensitively in task runner
Use a case-insensitive suffix comparison for ComSpec so uppercase and
mixed-case CMD.EXE paths use the correct /c invocation.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64907
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-09 19:10:51 +00:00
Archkon abbf086f1c sea: reject malformed --node-options values
Propagate tokenization errors from ParseNodeOptionsEnvVar through
FixupArgsForSEA and abort startup with an invalid command-line status
instead of applying partially parsed options.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64803
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-09 15:03:36 -04:00
Archkon ee5a070dc0 url: bounds-check short Windows file URL paths
Check the decoded pathname length before reading the drive letter and
colon. This prevents an out-of-bounds read for short URLs such as
file:/// and reports ERR_INVALID_FILE_URL_PATH instead.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64788
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-09 10:20:28 -04:00
Nora Dossche 330f7b5503 sqlite: check null returns from sqlite value functions
sqlite3_column_text() can return nullptr on failure which
was not handled.
sqlite3_column_blob() can return nullptr for zero-length BLOBs,
which is then passed to memcpy() which is UB.
Avoid this by checking for a nullptr.

Signed-off-by: ndossche <nora.dossche@ugent.be>
PR-URL: https://github.com/nodejs/node/pull/63288
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-08-09 07:44:02 +00:00
Tim Perry a876a12a61 quic: fix infinite loop if STOP_SENDING received on a buffering stream
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64715
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-08 18:42:39 +00:00
Anshika Jain 98fd6cb1c0 sqlite: validate maxSize argument in createTagStore()
Signed-off-by: anshikakalpana <anshikajain196872@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63792
Fixes: https://github.com/nodejs/node/issues/63791
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-08 15:54:54 +00:00
Seongeun Lee 721aad42f5 src: reuse cached env strings in remaining files
Follow-up to #59891, covering files it missed.
Overlapping locations (node_ffi.cc, crypto_util.cc) were already
handled by #64760.

Refs: https://github.com/nodejs/node/pull/59891
Refs: https://github.com/nodejs/node/pull/64760
Refs: https://github.com/nodejs/node/pull/64912

Signed-off-by: leah-1ee <selee3196@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65039
Refs: https://github.com/nodejs/node/pull/59891
Refs: https://github.com/nodejs/node/pull/64760
Refs: https://github.com/nodejs/node/pull/64912
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-08 15:54:21 +00:00
Ali Hassan 347e266187 sqlite: refactor error helpers and user function pointers
Signed-off-by: Ali Hassan <ali-hassan27@outlook.com>
PR-URL: https://github.com/nodejs/node/pull/62794
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-08 13:54:01 +00:00
Archkon c3de450f26 zlib: validate pledgedSrcSize for sync zstd
Zstd replaces a configured pledged source size with the input size when
the first call to ZSTD_compressStream2() uses ZSTD_e_end. Track consumed
input in Node and report ZSTD_error_srcSize_wrong when the completed
frame does not match the original pledge.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/64601
Fixes: https://github.com/nodejs/node/issues/64600
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-08-08 08:57:54 -04:00
Trivikram Kamat f538f11faf sqlite: reject non-positive backup rates
Passing a rate of 0 to backup() causes sqlite3_backup_step() to copy
no pages. The backup job then continually reschedules itself and the
returned promise never settles.

Require backup rates to be positive integers to prevent zero-work
backup jobs.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
PR-URL: https://github.com/nodejs/node/pull/64893
Fixes: https://github.com/nodejs/node/issues/64892
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-08-08 07:29:36 +00:00