Skip to content

[worker] Fix invalid JSON for RegExp CPU profile frames - #67103

Open
shahinsamiur wants to merge 1 commit into
nodejs:v26.xfrom
shahinsamiur:fix/worker-cpu-profile-json-escape
Open

shahinsamiur wants to merge 1 commit into
nodejs:v26.xfrom
shahinsamiur:fix/worker-cpu-profile-json-escape

Conversation

@shahinsamiur

@shahinsamiur shahinsamiur commented Oct 29, 2026 •

Copy link
Copy Markdown

Fixes #67097.

CPU profile serialization currently writes function names, script URLs, and deoptimization reasons directly into JSON strings. RegExp frame names containing backslashes can therefore produce invalid JSON.

Add JSON string escaping to OutputStreamWriter and use it for these fields. Include a regression test for worker CPU profiles containing RegExp frames.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/security-wg
  • @nodejs/v8-update

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. v26.x Issues that can be reproduced on v26.x or PRs targeting the v26.x-staging branch. v8 engine Issues and PRs related to the V8 dependency. labels Oct 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Welcome to Node.js, and thank you for your first contribution!

Before review, please take a moment to read:

Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal.

Signed-off-by: shahinsamiur <shahinsamiur@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency. v26.x Issues that can be reproduced on v26.x or PRs targeting the v26.x-staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants