Skip to content

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

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

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>
@aduh95

aduh95 commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Changes to deps/v8 must first land upstream, and can then be cherry-picked here

@aduh95 aduh95 closed this Nov 13, 2026
@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.75%. Comparing base (18b32a3) to head (8ebd4ce).
⚠️ Report is 29 commits behind head on v26.x.

Additional details and impacted files
@@            Coverage Diff             @@
##            v26.x   #67103      +/-   ##
==========================================
- Coverage   90.77%   90.75%   -0.02%     
==========================================
  Files         775      775              
  Lines      273467   273461       -6     
  Branches    52512    52521       +9     
==========================================
- Hits       248228   248190      -38     
- Misses      16103    16141      +38     
+ Partials     9136     9130       -6     

see 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

3 participants