Skip to content

[v24.x] deps: backport V8 HeapNumber materialization fix - #66567

Open
inoway46 wants to merge 1 commit into
nodejs:v24.x-stagingfrom
inoway46:backport-v24-maglev-heapnumber
Open

inoway46 wants to merge 1 commit into
nodejs:v24.x-stagingfrom
inoway46:backport-v24-maglev-heapnumber

Conversation

@inoway46

@inoway46 inoway46 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Backport v8/v8@7d5eb1d to fix returned objects sharing mutable double fields, as reported in #66457 (CVE-2026-85045).

The upstream regression fails on v24.21.0 and passes with this backport.

The v26.x backport landed in 1a33e91 (#66566).

Refs: #66457

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

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

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to Node.js builds or CI infrastructure. needs-ci PRs that need a full CI run. v24.x Issues that can be reproduced on v24.x or PRs targeting the v24.x-staging branch. v8 engine Issues and PRs related to the V8 dependency. labels Oct 7, 2026
@inoway46
inoway46 marked this pull request as ready for review October 7, 2026 10:18
@aduh95

aduh95 commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Shouldn't this land on Current first?

@inoway46

Copy link
Copy Markdown
Contributor Author

Agreed, #66566 should land first.

Backport the Maglev HeapNumber materialization fix to V8 13.6.
Emit a captured HeapNumber with its map and constant numeric value,
using the existing deoptimizer to allocate a fresh box. Reserve a
nonduplicatable object ID for each box. Keep the literal-number helper
for fixed double arrays and captured-object numeric values. No virtual
object slot traversal changes or prerequisite commits are needed.
This mirrors the existing V8 13.6 Turbolev map/value materialization.

Original commit message:

    [maglev] Materialize a fresh HeapNumber per deoptimization

    This matches what Turbolev graph builder already does to Maglev.

    Fixed: 547819997
    Change-Id: Iafc1185ef96db8816db36b295a3a4b7e528f9863
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8255554
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Victor Gomes <victorgomes@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#109347}

Refs: v8/v8@7d5eb1d
Refs: nodejs#66457
Refs: https://www.cve.org/CVERecord?id=CVE-2026-85045
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
Assisted-by: Codex
@inoway46
inoway46 force-pushed the backport-v24-maglev-heapnumber branch from 1a48a0f to 4fa345f Compare October 11, 2026 08:50
@aduh95
aduh95 marked this pull request as draft October 11, 2026 09:31
@inoway46
inoway46 marked this pull request as ready for review October 12, 2026 15:54
@inoway46

Copy link
Copy Markdown
Contributor Author

The v26.x backport has landed in 1a33e91. I've marked this ready for review.

@codecov

codecov Bot commented Oct 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.50%. Comparing base (9e39360) to head (4fa345f).
⚠️ Report is 591 commits behind head on v24.x-staging.

Additional details and impacted files
@@                Coverage Diff                @@
##           v24.x-staging   #66567      +/-   ##
=================================================
+ Coverage          90.31%   92.50%   +2.19%     
=================================================
  Files                711      371     -340     
  Lines             228425   165729   -62696     
  Branches           43160    25996   -17164     
=================================================
- Hits              206293   153313   -52980     
+ Misses             14090    12108    -1982     
+ Partials            8042      308    -7734     

see 549 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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants