Skip to content

chore: cherry-pick 6 changes from v8 - #50992

Merged
codebytere merged 6 commits into
40-x-yfrom
cherry-pick/40-x-y/v8/maglev-security-fixes
Apr 13, 2026
Merged

codebytere merged 6 commits into
40-x-yfrom
cherry-pick/40-x-y/v8/maglev-security-fixes

Conversation

@VerteDinde

Copy link
Copy Markdown
Member

Description of Change

Backports six upstream v8 changes to the maglev compiler, the inspector InspectedContext lifetime handling, and the arm64 instruction selector. Each is a straightforward adaptation of the upstream commit against v8 14.4.258.32; there are no Electron-specific changes to the logic.

cherry-pick a0570afad500 from v8

[maglev] Fix deopt use counting for deopt scope data

Fixed: 470566252
Change-Id: I7b6f5647d1ed1f9a7c915d3682f10cfc71a5924c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7415271
Cr-Commit-Position: refs/heads/main@{#104601}

cherry-pick b54c7841e2cd from v8

[*lev] Correctly update use counts for nested builtin continuations

Fixed: 484527367
Change-Id: I4cda8c1bbb2788fca06b564eae509511aec0957e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7593054
Cr-Commit-Position: refs/heads/main@{#105381}

cherry-pick ba0258ba9609 from v8

[inspector] Use std::shared_ptr for InspectedContext

Fixed: 486927780
Change-Id: I5e4921521a24cc3cd53ffb6cb5b6b6f9d98490e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7613210
Cr-Commit-Position: refs/heads/main@{#105489}

cherry-pick 2d9ff4098967 from v8

Merged: [maglev] Avoid eliding Smi checks too aggressively

Bug: 491884710
Change-Id: Id73c522c6f55cb05167f436c2ee7f60e0db71840
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7673820
Cr-Commit-Position: refs/branch-heads/14.6@{#45}

cherry-pick f297f82fea96 from v8

Merged: [compiler][arm64] Force explicit zero-extension of load index

Bug: 496301615
Change-Id: I3e5e13a90ad0a43768c9cd46a7ebd99d0f6a4e11
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7715044
Cr-Commit-Position: refs/branch-heads/14.6@{#63}

cherry-pick 021c5b193bd4 from v8

Merged: [maglev] Account for phi smi type widening in BuildCheckHeapObject

Bug: 495679730
Change-Id: I77d6f184af8d62a0dbb643c6f34d4a3530b32b63
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7715042
Cr-Commit-Position: refs/branch-heads/14.6@{#65}

Checklist

Release Notes

Notes: Backported upstream v8 fixes for several maglev, inspector, and arm64 code-generation edge cases.

@VerteDinde VerteDinde added the semver/patch backwards-compatible bug fixes label Apr 13, 2026
@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Apr 13, 2026
@VerteDinde
VerteDinde requested a review from a team as a code owner April 13, 2026 03:41
@VerteDinde VerteDinde added semver/patch backwards-compatible bug fixes new-pr 🌱 PR opened recently backport-check-skip Skip trop's backport validity checking labels Apr 13, 2026
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Apr 13, 2026
[maglev] Fix deopt use counting for deopt scope data

We shouldn't count the deopt use when creating the scope data,
but only when creating the deopt frame.

If the scope was unused, then we were over counting,
not really a correctness issue though.

If the scope was used twice, we were under counting and
we can underflow the counting when removing the use of
a node.

Fixed: 470566252
Change-Id: I7b6f5647d1ed1f9a7c915d3682f10cfc71a5924c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7415271
Commit-Queue: Toon Verwaest <[email protected]>
Reviewed-by: Toon Verwaest <[email protected]>
Commit-Queue: Victor Gomes <[email protected]>
Auto-Submit: Victor Gomes <[email protected]>
Cr-Commit-Position: refs/heads/main@{#104601}
[*lev] Correctly update use counts for nested builtin continuations

Fixed: 484527367
Change-Id: I4cda8c1bbb2788fca06b564eae509511aec0957e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7593054
Reviewed-by: Victor Gomes <[email protected]>
Auto-Submit: Darius Mercadier <[email protected]>
Commit-Queue: Darius Mercadier <[email protected]>
Cr-Commit-Position: refs/heads/main@{#105381}
[inspector] Use std::shared_ptr for InspectedContext

Unfortunately at this point we are not able to move `InspectedContext`
to the managed C++ heap due to missing Heap* collections and the lack
of labeling retainer links.

The next best thing we can do for now is use std::shared_ptr for
InspectedContext and keep an instance on the stack every time we can
potentially transition into user JS.

[email protected]

Fixed: 486927780
Change-Id: I5e4921521a24cc3cd53ffb6cb5b6b6f9d98490e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7613210
Auto-Submit: Simon Zünd <[email protected]>
Reviewed-by: Benedikt Meurer <[email protected]>
Commit-Queue: Simon Zünd <[email protected]>
Commit-Queue: Benedikt Meurer <[email protected]>
Cr-Commit-Position: refs/heads/main@{#105489}
Merged: [maglev] Avoid eliding Smi checks too aggressively

(cherry picked from commit 433b2912c5cb94ed0979c8284e96e4d08416b620)

Bug: 491884710
Change-Id: Id73c522c6f55cb05167f436c2ee7f60e0db71840
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7673820
Reviewed-by: Leszek Swirski <[email protected]>
Commit-Queue: Leszek Swirski <[email protected]>
Auto-Submit: Darius Mercadier <[email protected]>
Cr-Commit-Position: refs/branch-heads/14.6@{#45}
Cr-Branched-From: e04c3a1a2543bdbee7beac8846c9cbe8f657636f-refs/heads/14.6.202@{#1}
Cr-Branched-From: 3b0b01e6594ec362369dc16f069012a81748c8ba-refs/heads/main@{#105132}
Merged: [compiler][arm64] Force explicit zero-extension of load index

This is the merge-commit for:

1) [arm64][compiler] Always emit truncation to word32
     cherry picked from commit 522e74a35cf4e53c3708ea396c299bfbb29d8489
2) [compiler][arm64] Reenable implicit truncation and force
   explicit zero-extension of load/store index
     cherry picked from commit 4ef5cc27aa50b4a7e3096bbbffaf5058a811a2a9

Bug: 496301615
Change-Id: I3e5e13a90ad0a43768c9cd46a7ebd99d0f6a4e11
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7715044
Commit-Queue: Matthias Liedtke <[email protected]>
Commit-Queue: Darius Mercadier <[email protected]>
Reviewed-by: Darius Mercadier <[email protected]>
Auto-Submit: Matthias Liedtke <[email protected]>
Cr-Commit-Position: refs/branch-heads/14.6@{#63}
Cr-Branched-From: e04c3a1a2543bdbee7beac8846c9cbe8f657636f-refs/heads/14.6.202@{#1}
Cr-Branched-From: 3b0b01e6594ec362369dc16f069012a81748c8ba-refs/heads/main@{#105132}
Merged: [maglev] Account for phi smi type widening in BuildCheckHeapObject

Bug: 495679730
(cherry picked from commit c1e78b455e3224e286914b5ac241fbea064cb51d)

Change-Id: I77d6f184af8d62a0dbb643c6f34d4a3530b32b63
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7715042
Auto-Submit: Darius Mercadier <[email protected]>
Reviewed-by: Leszek Swirski <[email protected]>
Commit-Queue: Leszek Swirski <[email protected]>
Cr-Commit-Position: refs/branch-heads/14.6@{#65}
Cr-Branched-From: e04c3a1a2543bdbee7beac8846c9cbe8f657636f-refs/heads/14.6.202@{#1}
Cr-Branched-From: 3b0b01e6594ec362369dc16f069012a81748c8ba-refs/heads/main@{#105132}
@VerteDinde
VerteDinde force-pushed the cherry-pick/40-x-y/v8/maglev-security-fixes branch from 3ea5375 to 1f585c6 Compare April 13, 2026 05:04
@codebytere
codebytere merged commit 6875cd8 into 40-x-y Apr 13, 2026
62 of 63 checks passed
@codebytere
codebytere deleted the cherry-pick/40-x-y/v8/maglev-security-fixes branch April 13, 2026 07:26
@release-clerk

release-clerk Bot commented Apr 13, 2026

Copy link
Copy Markdown

Release Notes Persisted

Backported upstream v8 fixes for several maglev, inspector, and arm64 code-generation edge cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

40-x-y backport-check-skip Skip trop's backport validity checking semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants