Commit Graph
6634 Commits
Author SHA1 Message Date
Chris Tate 3cd2f97c7c Ignore SIGPIPE and SIGXFSZ in executables, as Node does (#2578) 2026-10-29 16:05:14 -05:00
Chris Tate 21b919cad7 Use SSE2 and string-instruction memory routines in x86_64 musl executables (#2576) 2026-10-29 16:02:07 -05:00
Chris Tate 016ee41146 Check untyped destructuring sources in JavaScript files before reading keys (#2577) 2026-10-29 16:01:39 -05:00
Chris Tate e3a42c52a8 Ignore SIGPIPE and SIGXFSZ in executables, as Node does
Node sets SIGPIPE and SIGXFSZ to SIG_IGN at startup, so a write to a
closed pipe or past RLIMIT_FSIZE fails with EPIPE or EFBIG, and libuv's
spawns start children with every signal at its default action. The
runtime instead blocked both signals in the writing thread. On Linux the
signal a write raises goes to that thread, but on macOS it goes to the
process, so a write to a closed pipe from the fs pool's threads ended the
program with SIGPIPE.

- scr_init ignores SIGPIPE and SIGXFSZ. A process.on listener replaces the
  disposition while it is registered, as before.
- scr_fs_write_once writes directly in executables, and the fs pool's
  threads no longer block the two signals. Library builds keep the
  per-thread blocking, since their host owns the dispositions.
- scr_spawn_command starts children with SIGPIPE and SIGXFSZ at their
  default actions (POSIX_SPAWN_SETSIGDEF), for spawnSync, execFileSync
  and spawn alike.

write-signals-ignored.ts and write-signals-listener.mjs check the ignored
signals, a listener, and each spawn path's child against Node.
2026-10-29 16:00:39 -05:00
Chris Tate 4e67c5ce2c Host stdio: typed process.stdout.write slot, write-callback errors, drain, run-time-typed chunks (#2546) 2026-10-29 15:59:21 -05:00
Chris Tate 0725682c87 Check untyped destructuring sources in JavaScript files before reading keys
A JavaScript object pattern over an untyped source (the result of an untyped function, a parameter, a property of an untyped object) now checks the source first when V8 can spell it, as the `any` path in TypeScript files does: a null or undefined source throws "Cannot destructure property 'size' of 'lookup(...)' as it is null." instead of "Cannot read properties of null (reading 'size')". When the first element has a default and a static key (`{ size = 0 }`), the source is not checked first and the read throws, as in V8; this also applies to `any` sources in TypeScript files and to nullable union sources.
2026-10-29 15:58:44 -05:00
Chris Tate 7f10ed6d90 Use SSE2 and string-instruction memory routines in x86_64 musl executables
The musl lane links zig's libc, whose memset, memcmp, bcmp and strlen are
byte loops, and whose memcpy and memmove copy without string
instructions. An x86_64 musl executable now defines these six routines
(scr_musl_mem.h): SSE2 for short and medium lengths, and rep stosb or rep
movsb from 2 KiB for memset, memcpy and forward memmove. zig's
definitions are weak, so these replace them. Library artifacts keep the
routines of the program they link into.

Adds a test that checks every length up to 600 and longer ones, every
alignment in a 32-byte window, overlapping moves in both directions,
memcmp's sign at each position, and strlen up to the end of a readable
page, optimized and under ASan and UBSan.
2026-10-29 15:58:15 -05:00
Chris Tate b507472888 Take from a Readable's buffered queue by moving its head index (#2573) 2026-10-29 15:50:34 -05:00
Chris Tate 609d1c5d5b Keep partition placement stable when an edit adds a small helper (#2561) 2026-10-29 15:50:13 -05:00
Chris Tate 8d73a84baf Test only the exponent of a masked value's shift and sum in speculative integers (#2575) 2026-10-29 15:49:54 -05:00
Chris Tate 6f019151b7 Test only the exponent of a masked value's shift and sum in speculative integers 2026-10-29 15:45:58 -05:00
Chris Tate f1825611fb Collect garbage cycles across the scriptc and V8 heaps (NI-8) (#1908) 2026-10-29 15:33:24 -05:00
Chris Tate 0e6dec51d4 Test262: private static members with brand checks (#2549) 2026-10-29 15:31:06 -05:00
Chris Tate 714385609e Call private static fields through the general value-call lowering
A call through a function-valued private static field (this.#fn(...))
completed its arguments against the field's fixed parameter list, so a
rest-parameter function lost the arguments for its rest parameter, and a
function that reads arguments was refused. The call now takes the
ordinary call-through-value lanes (typed rests, runtime-arity closures,
checked-dynamic values) and binds this to the checked receiver.
2026-10-29 15:27:36 -05:00
Chris Tate b8a6d3805a Islands: CommonJS island requires, builtin-class handles, JavaScript widened bindings (#1907) 2026-10-29 15:27:09 -05:00
Chris Tate 0117f39da0 pi wave 5: union layouts and reads, provider and tool records (#2547) 2026-10-29 15:25:45 -05:00
Chris Tate 87c8d14510 Test262: String/Number/Boolean wrapper objects in JavaScript sources (#2550) 2026-10-29 15:24:04 -05:00
Chris Tate 97fc2a9ac1 Avoid call-stack overflow from spread pushes over large compiler lists (#2553) 2026-10-29 15:22:36 -05:00
Chris Tate d972a6bc13 Defer island modules whose recorded load is deterministic (NI-7b/7d/7e/7f) (#1906) 2026-10-29 15:18:28 -05:00
Chris Tate 43bafa67d1 Test262 group C: early errors, undeclared reads, async-iterator relaxation, compareArray harness (#2500) 2026-10-29 15:17:08 -05:00
Chris Tate ffa0753a82 Generic arrows: enclosing-frame captures (incl. mutable, boxed), optional-call arity, declared-arity refusal (#2506) 2026-10-29 15:14:11 -05:00
Chris Tate 145f8fcd5e fs.watch names the changed entry; fs.watchFile polls in its own gated unit (#2507) 2026-10-29 15:13:12 -05:00
Chris Tate 2de17f95df Pass every argument to emitter listeners that read arguments, and deliver the leak warning at exit (#2544) 2026-10-29 15:12:50 -05:00
Chris Tate 03b26a7e8e Stdio write hook: console lines pass (line, errorHandler), byte chunks pass a Buffer (#2511) 2026-10-29 15:12:31 -05:00
Chris Tate dfa940a82d Return freed memory sooner: chunked shared writes, a bounded string spare, idle trims (#2518) 2026-10-29 15:12:10 -05:00
Chris Tate b9587f361d Reuse lowered units across builds behind SCRIPTC_INCR_LOWERING=1 (#2521) 2026-10-29 15:11:51 -05:00
Chris Tate f2e82c68e1 Pack jammed saturating loops one copy per lane and test their exit every fourth iteration (#2522) 2026-10-29 15:11:29 -05:00
Chris Tate 4458e11a75 Read /proc/self/maps once per glibc thread heap (#2527) 2026-10-29 15:11:09 -05:00
Chris Tate 16f3c16752 Match Node's node:path behavior from Node 24's path tests (#2495) 2026-10-29 15:10:50 -05:00
Chris Tate 6b2af671e5 Weigh program profile matches by the profile's counts (#2528) 2026-10-29 15:10:28 -05:00
Chris Tate 2d2cd25d26 Count the arguments a replaced stdio write receives (#2530) 2026-10-29 15:10:03 -05:00
Chris Tate 3c9d162a99 Test the direct index once in number-key lookups, and inline the probe in loops (#2525) 2026-10-29 15:09:43 -05:00
Chris Tate 7eda6fa880 Trim the per-chunk work of compiled object-mode stream callbacks (#2523) 2026-10-29 15:09:24 -05:00
Chris Tate 59eced7a6c Lower ReadableStream tee, pipeTo and pipeThrough in TypeScript (#2513) 2026-10-29 15:09:05 -05:00
Chris Tate fe46ed63b8 Compile the functions a sparse profile never ran as cold code (#2526) 2026-10-29 15:08:45 -05:00
Chris Tate 771b9a96ba Throw Node's TypeError when a nullable destructuring source is null (#2537) 2026-10-29 15:08:26 -05:00
Chris Tate 1784445e31 Split the Linux LLVM artifacts job and take its glibc packages from native_linux (#2536) 2026-10-29 15:08:06 -05:00
Chris Tate 03e461b842 Match macOS objects and paths in the native install, loop poll and profile tests (#2541) 2026-10-29 15:07:46 -05:00
Chris Tate 4db725e622 Don't offset a null pointer when an array has no dense storage (#2559) 2026-10-29 15:07:27 -05:00
Chris Tate a9e2cb994f Deliver the lines a chunk split after a line listener closes the interface (#2533) 2026-10-29 15:07:08 -05:00
Chris Tate a391eef92a Read and write cached regular files on the loop thread in fs streams (#2540) 2026-10-29 15:06:47 -05:00
Chris Tate 08e2b4596a Run for-in over a receiver that may be null or undefined (#2534) 2026-10-29 15:06:00 -05:00
Chris Tate 7d283cbda3 Read at the exact bigint position in fs.readSync (#2535) 2026-10-29 15:05:39 -05:00
Chris Tate 5dc4bfd6d8 Read builtins into untyped TypeScript slots as Node's values (#2556) 2026-10-29 15:05:19 -05:00
Chris Tate d19fad3999 Match Node's emitWarning, kill, chdir and userInfo behavior (#2532) 2026-10-29 15:04:59 -05:00
Chris Tate 98b3277a43 Provide the libnode pack to the shape overlay npm lanes (#2542) 2026-10-29 15:04:40 -05:00
Chris Tate e6f6cd4b98 Release the web view of an abandoned fetch body while its transfer runs (#2570) 2026-10-29 15:04:15 -05:00
Chris Tate 42e57e4ef3 Deliver a line to a single line listener without the listener snapshot (#2531) 2026-10-29 15:03:53 -05:00
Chris Tate ce6d9d0f1a Skip the receiver bracket for adapters of receiver-free callbacks (#2564) 2026-10-29 15:03:34 -05:00
Chris Tate 0f6c3ae700 Count ArrayBuffer storage in process.memoryUsage() (#2569) 2026-10-29 15:03:14 -05:00