Changelog

nodejs/node · · 30 commits

Node tightens crypto, fs, and spawn performance

Major fixes land for process spawning, crypto encoding validation, recursive mkdir hangs, and FFI safety, plus a large embedder-isolate test update.

Spawn default env now uses a native fast path (codebyterebd83a5c) child_process no longer clones process.env when spawning with the default inherited environment. It pulls env pairs in one native pass, which should cut the JS-side overhead of process creation significantly on env-heavy systems.

Crypto now rejects invalid update/digest encodings (maruthang127f79a, panva6b8001d, panva718f044) Cipher/Decipher, Hash, Hmac, Sign, and Verify now throw ERR_UNKNOWN_ENCODING for bad string encodings instead of silently accepting them and producing wrong output. This closes a correctness hole that could yield incorrect ciphertext/plaintext or digest results without any error.

Recursive mkdir stops spinning forever on ENOENT (marcopiraccini69f3ae9) fs.mkdir({ recursive: true }) now retries a path that failed with ENOENT only once, preventing infinite loops like the procfs hang on Linux. That turns a potential 100% CPU lockup into a normal error path for both sync and async APIs.

FFI rejects unsafe integer lengths and offsets (christianaurichzmb9bb1bd) The FFI bindings now reject values above Number.MAX_SAFE_INTEGER before they can round into dangerous size_t conversions. This closes a real memory-safety bug where 2 ** 64 could be misread as 0 on 64-bit builds.

Add embedder-isolate coverage for sibling Environment behavior (codebytere70d8850, codebytere670a077, codebytere6fbab72, codebytereae70f7e, codebytere8bf7793) Node adds substantial coverage for multiple Environments sharing one embedder-owned isolate and event loop, including cleanup ordering and inspector behavior. The runtime also switches handle-cleanup tracking to a thread-local counter and asserts IsolateData outlives its Environments, making a tricky embedder lifecycle safer and better documented.

Other misc changes