Skip to content

child_process: fix fatal error in ParseStdioOptions - #64873

Open
saitejabandaru-in wants to merge 2 commits into
nodejs:mainfrom
saitejabandaru-in:fix-56531-spawn-crash
Open

child_process: fix fatal error in ParseStdioOptions#64873
saitejabandaru-in wants to merge 2 commits into
nodejs:mainfrom
saitejabandaru-in:fix-56531-spawn-crash

Conversation

@saitejabandaru-in

Copy link
Copy Markdown

Fixes #56531. Prevents a v8::ToLocalChecked Empty MaybeLocal crash caused by prototype pollution of Arrays.

Saiteja Bandaru and others added 2 commits July 29, 2026 15:35
Currently the codebase for `runner.js` accesses some properties of
`process`, capturing options there. However, since `run()` is
exposed to end users, we should capture all this information in
`lib/internal/main/test_runner.js` and pass it down to `run()` as options.

This commit updates `run()` to default `cwd` to `.` instead of
reading `process.cwd()`, and substitutes `process.execArgv` with
the provided `execArgv` option when propagating V8 flags.
It also updates `test_runner.js` to explicitly pass these options.
This commit adds validation for non-object stdio entries in ParseStdioOptions
to prevent a v8::ToLocalChecked Empty MaybeLocal fatal error when the Array
prototype is polluted.
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/test_runner

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. child_process Issues and PRs related to the child_process subsystem. needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem. labels Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. child_process Issues and PRs related to the child_process subsystem. needs-ci PRs that need a full CI run. test_runner Issues and PRs related to the test runner subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal

2 participants