[sandbox] Use SafeHeapObjectSize in FixedIntegerArray and PodArray [v8/v8 : main]

0 views
Skip to first unread message

Arash Kazemi (Gerrit)

unread,
Mar 9, 2026, 6:18:34 AMMar 9
to Maksim Ivanov, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com
Attention needed from Maksim Ivanov

Arash Kazemi added 1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Arash Kazemi . resolved

PTAL

Open in Gerrit

Related details

Attention is currently required from:
  • Maksim Ivanov
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: v8/v8
Gerrit-Branch: main
Gerrit-Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
Gerrit-Change-Number: 7626540
Gerrit-PatchSet: 6
Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
Gerrit-Reviewer: Maksim Ivanov <em...@chromium.org>
Gerrit-Attention: Maksim Ivanov <em...@chromium.org>
Gerrit-Comment-Date: Mon, 09 Mar 2026 10:18:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Maksim Ivanov (Gerrit)

unread,
Mar 9, 2026, 7:50:17 AMMar 9
to Arash Kazemi, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com
Attention needed from Arash Kazemi

Maksim Ivanov added 5 comments

Patchset-level comments
Maksim Ivanov . resolved

thanks!

File src/diagnostics/basic-block-profiler.cc
Line 119, Patchset 6 (Latest): for (uint32_t i = 0; i < static_cast<uint32_t>(n_blocks()); ++i) {
Maksim Ivanov . unresolved

Do we want to cache this in a variable to avoid repetitive casts everywhere? Or a follow-up CL will come soon that will update `n_blocks()` to return `uint32_t`, making these casts unnecessary here?

File src/objects/fixed-array-inl.h
Line 948, Patchset 6 (Latest): CHECK(!base::bits::SignedMulOverflow32(length, sizeof(T), &byte_length));
Maksim Ivanov . unresolved

Do we keep the signed arithmetics here because we want the byte size to not exceed `kMaxInt`? In that case, please add a comment to document that intention.

File src/objects/fixed-array.h
Line 978, Patchset 6 (Latest): DCHECK_LE(index, this->length().value());
Maksim Ivanov . unresolved

`DCHECK_LT`? Ditto for `set()`.

Line 914, Patchset 6 (Latest): uint32_t length,
Maksim Ivanov . unresolved

Would it make sense to change these construction size args to `SafeHeapObjectSize` as well, so that the compiler flags attempts to downcast from 64-bit sizes here?

Open in Gerrit

Related details

Attention is currently required from:
  • Arash Kazemi
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
    Gerrit-Change-Number: 7626540
    Gerrit-PatchSet: 6
    Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
    Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
    Gerrit-Reviewer: Maksim Ivanov <em...@chromium.org>
    Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
    Gerrit-Comment-Date: Mon, 09 Mar 2026 11:50:11 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Arash Kazemi (Gerrit)

    unread,
    Mar 9, 2026, 10:28:05 AMMar 9
    to Maksim Ivanov, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com
    Attention needed from Maksim Ivanov

    Arash Kazemi added 4 comments

    File src/diagnostics/basic-block-profiler.cc
    Line 119, Patchset 6: for (uint32_t i = 0; i < static_cast<uint32_t>(n_blocks()); ++i) {
    Maksim Ivanov . resolved

    Do we want to cache this in a variable to avoid repetitive casts everywhere? Or a follow-up CL will come soon that will update `n_blocks()` to return `uint32_t`, making these casts unnecessary here?

    Arash Kazemi

    Yes, I have cached the `n_blocks()` value into a variable since we read it multiple times.

    File src/objects/fixed-array-inl.h
    Line 948, Patchset 6: CHECK(!base::bits::SignedMulOverflow32(length, sizeof(T), &byte_length));
    Maksim Ivanov . resolved

    Do we keep the signed arithmetics here because we want the byte size to not exceed `kMaxInt`? In that case, please add a comment to document that intention.

    Arash Kazemi

    The size of a FixedArray should be below kMaxInt: https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/fixed-array.h;l=35;drc=3fc49d4c4cd9e6202fe21f5925899292ffadb20a. This is also checked in the constructor so I changed the overflow checks to use `base::CheckedNumeric` instead.

    File src/objects/fixed-array.h
    Line 978, Patchset 6: DCHECK_LE(index, this->length().value());
    Maksim Ivanov . resolved

    `DCHECK_LT`? Ditto for `set()`.

    Arash Kazemi

    Good catch! Fixed.

    Line 914, Patchset 6: uint32_t length,
    Maksim Ivanov . unresolved

    Would it make sense to change these construction size args to `SafeHeapObjectSize` as well, so that the compiler flags attempts to downcast from 64-bit sizes here?

    Arash Kazemi

    I think a downcast from 64-bit to 32-bit should be caught by the compiler warnings: https://source.chromium.org/chromium/chromium/src/+/main:v8/BUILD.gn;l=1870;drc=6e6da61a5be7bf1946bfcbdca494a8a6010d616b

    I was thinking about using `SafeHeapObjectSize` wherever appropriate but I am not sure if we want this spill that into many parts of the codebase. All constructors check for the appropriate size and crash if it's over the limit so there should be no security impact for passing an invalid value here. In any case, I don't think it would be dangerous for the sandbox to allocate a larger array as long as we stay within the 32-bit bounds.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Maksim Ivanov
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: v8/v8
    Gerrit-Branch: main
    Gerrit-Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
    Gerrit-Change-Number: 7626540
    Gerrit-PatchSet: 7
    Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
    Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
    Gerrit-Reviewer: Maksim Ivanov <em...@chromium.org>
    Gerrit-Attention: Maksim Ivanov <em...@chromium.org>
    Gerrit-Comment-Date: Mon, 09 Mar 2026 14:28:01 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Maksim Ivanov <em...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Maksim Ivanov (Gerrit)

    unread,
    Mar 9, 2026, 10:35:48 AMMar 9
    to Arash Kazemi, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com
    Attention needed from Arash Kazemi

    Maksim Ivanov added 2 comments

    File src/objects/fixed-array-inl.h
    Line 948, Patchset 6: CHECK(!base::bits::SignedMulOverflow32(length, sizeof(T), &byte_length));
    Maksim Ivanov . resolved

    Do we keep the signed arithmetics here because we want the byte size to not exceed `kMaxInt`? In that case, please add a comment to document that intention.

    Arash Kazemi

    The size of a FixedArray should be below kMaxInt: https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/fixed-array.h;l=35;drc=3fc49d4c4cd9e6202fe21f5925899292ffadb20a. This is also checked in the constructor so I changed the overflow checks to use `base::CheckedNumeric` instead.

    Maksim Ivanov

    Consider running this against perf benchmarks (like jetstream) before landing.

    File src/objects/fixed-array.h
    Line 914, Patchset 6: uint32_t length,
    Maksim Ivanov . resolved

    Would it make sense to change these construction size args to `SafeHeapObjectSize` as well, so that the compiler flags attempts to downcast from 64-bit sizes here?

    Arash Kazemi

    I think a downcast from 64-bit to 32-bit should be caught by the compiler warnings: https://source.chromium.org/chromium/chromium/src/+/main:v8/BUILD.gn;l=1870;drc=6e6da61a5be7bf1946bfcbdca494a8a6010d616b

    I was thinking about using `SafeHeapObjectSize` wherever appropriate but I am not sure if we want this spill that into many parts of the codebase. All constructors check for the appropriate size and crash if it's over the limit so there should be no security impact for passing an invalid value here. In any case, I don't think it would be dangerous for the sandbox to allocate a larger array as long as we stay within the 32-bit bounds.

    Maksim Ivanov

    Acknowledged - if the existing warnings cover that then no need in adding the boilerplate to the code, agreed.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Arash Kazemi
    Submit Requirements:
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: v8/v8
      Gerrit-Branch: main
      Gerrit-Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
      Gerrit-Change-Number: 7626540
      Gerrit-PatchSet: 7
      Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
      Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
      Gerrit-Reviewer: Maksim Ivanov <em...@chromium.org>
      Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
      Gerrit-Comment-Date: Mon, 09 Mar 2026 14:35:44 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Maksim Ivanov <em...@chromium.org>
      Comment-In-Reply-To: Arash Kazemi <ara...@chromium.org>
      unsatisfied_requirement
      open
      diffy

      Maksim Ivanov (Gerrit)

      unread,
      Mar 9, 2026, 10:35:53 AMMar 9
      to Arash Kazemi, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com
      Attention needed from Arash Kazemi

      Maksim Ivanov voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Arash Kazemi
      Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: v8/v8
        Gerrit-Branch: main
        Gerrit-Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
        Gerrit-Change-Number: 7626540
        Gerrit-PatchSet: 7
        Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
        Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
        Gerrit-Reviewer: Maksim Ivanov <em...@chromium.org>
        Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
        Gerrit-Comment-Date: Mon, 09 Mar 2026 14:35:48 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        chromeperf@appspot.gserviceaccount.com (Gerrit)

        unread,
        Mar 9, 2026, 11:57:43 AMMar 9
        to Arash Kazemi, Maksim Ivanov, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com
        Attention needed from Arash Kazemi

        Message from chrom...@appspot.gserviceaccount.com

        📍 Job mac-m1_mini_2020-perf/jetstream2 complete.

        • string-unpack-code-SP.Average: base median = 1299.1266375545852 -> patched median = 1292.075356031312


        See results at: https://pinpoint-dot-chromeperf.appspot.com/job/13f18ed2090000

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Arash Kazemi
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: v8/v8
        Gerrit-Branch: main
        Gerrit-Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
        Gerrit-Change-Number: 7626540
        Gerrit-PatchSet: 7
        Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
        Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
        Gerrit-Reviewer: Maksim Ivanov <em...@chromium.org>
        Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
        Gerrit-Comment-Date: Mon, 09 Mar 2026 15:57:39 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: No
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        chromeperf@appspot.gserviceaccount.com (Gerrit)

        unread,
        Mar 9, 2026, 1:56:27 PMMar 9
        to Arash Kazemi, Maksim Ivanov, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com
        Attention needed from Arash Kazemi

        Message from chrom...@appspot.gserviceaccount.com

        😿 Job mac-m1_mini_2020-perf/jetstream3 failed.

        See results at: https://pinpoint-dot-chromeperf.appspot.com/job/12e7ff1c090000

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Arash Kazemi
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: v8/v8
        Gerrit-Branch: main
        Gerrit-Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
        Gerrit-Change-Number: 7626540
        Gerrit-PatchSet: 7
        Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
        Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
        Gerrit-Reviewer: Maksim Ivanov <em...@chromium.org>
        Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
        Gerrit-Comment-Date: Mon, 09 Mar 2026 17:56:24 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: No
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        chromeperf@appspot.gserviceaccount.com (Gerrit)

        unread,
        Mar 10, 2026, 7:02:55 AMMar 10
        to Arash Kazemi, Maksim Ivanov, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com
        Attention needed from Arash Kazemi

        Message from chrom...@appspot.gserviceaccount.com

        📍 Job mac-m1_mini_2020-perf/jetstream-main.crossbench complete.

        • bigint-noble-ed25519: base median = 140.1879118707839 -> patched median = 139.8478804196705
        • mandreel: base median = 175.34510698476385 -> patched median = 175.02503582194163


        See results at: https://pinpoint-dot-chromeperf.appspot.com/job/10c07c74090000

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Arash Kazemi
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: v8/v8
        Gerrit-Branch: main
        Gerrit-Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
        Gerrit-Change-Number: 7626540
        Gerrit-PatchSet: 7
        Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
        Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
        Gerrit-Reviewer: Maksim Ivanov <em...@chromium.org>
        Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
        Gerrit-Comment-Date: Tue, 10 Mar 2026 11:02:52 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: No
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Arash Kazemi (Gerrit)

        unread,
        Mar 10, 2026, 7:22:19 AMMar 10
        to Andreas Haas, Jakob Linke, chrom...@appspot.gserviceaccount.com, Maksim Ivanov, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com
        Attention needed from Andreas Haas and Jakob Linke

        Arash Kazemi voted and added 2 comments

        Votes added by Arash Kazemi

        Commit-Queue+1

        2 comments

        Patchset-level comments
        File-level comment, Patchset 7 (Latest):
        Arash Kazemi . resolved

        PTAL, added Andreas and Jakob for OWNERS in the regexp/wasm/compiler changes.

        File src/objects/fixed-array-inl.h
        Line 948, Patchset 6: CHECK(!base::bits::SignedMulOverflow32(length, sizeof(T), &byte_length));
        Maksim Ivanov . resolved

        Do we keep the signed arithmetics here because we want the byte size to not exceed `kMaxInt`? In that case, please add a comment to document that intention.

        Arash Kazemi

        The size of a FixedArray should be below kMaxInt: https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/fixed-array.h;l=35;drc=3fc49d4c4cd9e6202fe21f5925899292ffadb20a. This is also checked in the constructor so I changed the overflow checks to use `base::CheckedNumeric` instead.

        Maksim Ivanov

        Consider running this against perf benchmarks (like jetstream) before landing.

        Arash Kazemi

        I ran the jetstream benchmarks and I don't see any impact. I also wouldn't expect one since I am not adding new CHECKs but changing existing ones.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Andreas Haas
        • Jakob Linke
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: v8/v8
        Gerrit-Branch: main
        Gerrit-Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
        Gerrit-Change-Number: 7626540
        Gerrit-PatchSet: 7
        Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
        Gerrit-Reviewer: Andreas Haas <ah...@chromium.org>
        Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
        Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
        Gerrit-Attention: Andreas Haas <ah...@chromium.org>
        Gerrit-Attention: Jakob Linke <jgr...@chromium.org>
        Gerrit-Comment-Date: Tue, 10 Mar 2026 11:22:14 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        unsatisfied_requirement
        satisfied_requirement
        open
        diffy

        Andreas Haas (Gerrit)

        unread,
        Mar 10, 2026, 10:01:24 AMMar 10
        to Arash Kazemi, Jakob Linke, chrom...@appspot.gserviceaccount.com, Maksim Ivanov, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com
        Attention needed from Arash Kazemi and Jakob Linke

        Andreas Haas voted and added 1 comment

        Votes added by Andreas Haas

        Code-Review+1

        1 comment

        File src/regexp/regexp-macro-assembler.cc
        Line 147, Patchset 8 (Latest): const int lhs_length = lhs->length();
        Andreas Haas . unresolved

        Why don't you have the static cast here?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Arash Kazemi
        • Jakob Linke
        Submit Requirements:
          • requirement is not satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: v8/v8
          Gerrit-Branch: main
          Gerrit-Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
          Gerrit-Change-Number: 7626540
          Gerrit-PatchSet: 8
          Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
          Gerrit-Reviewer: Andreas Haas <ah...@chromium.org>
          Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
          Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
          Gerrit-Reviewer: Maksim Ivanov <em...@chromium.org>
          Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
          Gerrit-Attention: Jakob Linke <jgr...@chromium.org>
          Gerrit-Comment-Date: Tue, 10 Mar 2026 14:01:18 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          unsatisfied_requirement
          satisfied_requirement
          open
          diffy

          Arash Kazemi (Gerrit)

          unread,
          Mar 10, 2026, 10:05:23 AMMar 10
          to Andreas Haas, Jakob Linke, chrom...@appspot.gserviceaccount.com, Maksim Ivanov, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com
          Attention needed from Andreas Haas and Jakob Linke

          Arash Kazemi added 1 comment

          File src/regexp/regexp-macro-assembler.cc
          Line 147, Patchset 8 (Latest): const int lhs_length = lhs->length();
          Andreas Haas . unresolved

          Why don't you have the static cast here?

          Arash Kazemi

          `ZoneList::length` returns `int`, I added a `DCHECK` to ensure it's positive and then static cast it to `uint32_t`.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Andreas Haas
          • Jakob Linke
          Submit Requirements:
          • requirement is not satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: v8/v8
          Gerrit-Branch: main
          Gerrit-Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
          Gerrit-Change-Number: 7626540
          Gerrit-PatchSet: 8
          Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
          Gerrit-Reviewer: Andreas Haas <ah...@chromium.org>
          Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
          Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
          Gerrit-Reviewer: Maksim Ivanov <em...@chromium.org>
          Gerrit-Attention: Andreas Haas <ah...@chromium.org>
          Gerrit-Attention: Jakob Linke <jgr...@chromium.org>
          Gerrit-Comment-Date: Tue, 10 Mar 2026 14:05:17 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Andreas Haas <ah...@chromium.org>
          unsatisfied_requirement
          satisfied_requirement
          open
          diffy

          Jakob Linke (Gerrit)

          unread,
          Mar 11, 2026, 3:06:47 AMMar 11
          to Arash Kazemi, Andreas Haas, chrom...@appspot.gserviceaccount.com, Maksim Ivanov, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com
          Attention needed from Andreas Haas and Arash Kazemi

          Jakob Linke voted and added 4 comments

          Votes added by Jakob Linke

          Code-Review+1

          4 comments

          File src/regexp/regexp-macro-assembler.cc
          Line 137, Patchset 8 (Latest): DCHECK_GT(ranges_length, 0);
          Jakob Linke . unresolved

          If we want to be extra clear about bounds, we'd have to protect against overflows from below, too.

          I'm not saying we *should* do this; it's not clear to me that we gain any safety and it clutters the code. But explicit bounds checks seems to be what this CL series aims for, so up to you.

          Line 151, Patchset 8 (Latest): if (rhs->get(i * 2 + 0) != r.from()) return false;
          Jakob Linke . unresolved

          Same here.

          Line 168, Patchset 8 (Latest): range_array->set(i * 2 + 0, r.from());
          Jakob Linke . unresolved

          And here.

          Line 220, Patchset 8 (Latest): int mid, lower = 0, upper = static_cast<int>(ranges_len);
          Jakob Linke . unresolved

          Similarly, we could DCHECK that this is in int range.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Andreas Haas
          • Arash Kazemi
          Submit Requirements:
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: v8/v8
          Gerrit-Branch: main
          Gerrit-Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
          Gerrit-Change-Number: 7626540
          Gerrit-PatchSet: 8
          Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
          Gerrit-Reviewer: Andreas Haas <ah...@chromium.org>
          Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
          Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
          Gerrit-Reviewer: Maksim Ivanov <em...@chromium.org>
          Gerrit-Attention: Andreas Haas <ah...@chromium.org>
          Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
          Gerrit-Comment-Date: Wed, 11 Mar 2026 07:06:43 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Arash Kazemi (Gerrit)

          unread,
          Mar 11, 2026, 4:39:53 AMMar 11
          to Jakob Linke, Andreas Haas, chrom...@appspot.gserviceaccount.com, Maksim Ivanov, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com
          Attention needed from Andreas Haas and Jakob Linke

          Arash Kazemi added 4 comments

          File src/regexp/regexp-macro-assembler.cc
          Line 137, Patchset 8: DCHECK_GT(ranges_length, 0);
          Jakob Linke . resolved

          If we want to be extra clear about bounds, we'd have to protect against overflows from below, too.

          I'm not saying we *should* do this; it's not clear to me that we gain any safety and it clutters the code. But explicit bounds checks seems to be what this CL series aims for, so up to you.

          Arash Kazemi

          I added a DCHECK for the integer length which should cover all cases of overflow.

          Line 151, Patchset 8: if (rhs->get(i * 2 + 0) != r.from()) return false;
          Jakob Linke . unresolved

          Same here.

          Arash Kazemi

          I added `DCHECKs` for both get calls, `i` is less than `lhs_length` which is an int value so I don't think the first could actually trigger. If you think some of these are unnecessary or cluttering too much I am happy to remove them, they could be useful if the length is changed to be uint32_t in the future I guess.

          Line 168, Patchset 8: range_array->set(i * 2 + 0, r.from());
          Jakob Linke . unresolved

          And here.

          Arash Kazemi

          Same as above.

          Line 220, Patchset 8: int mid, lower = 0, upper = static_cast<int>(ranges_len);
          Jakob Linke . resolved

          Similarly, we could DCHECK that this is in int range.

          Arash Kazemi

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Andreas Haas
          • Jakob Linke
          Submit Requirements:
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: v8/v8
          Gerrit-Branch: main
          Gerrit-Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
          Gerrit-Change-Number: 7626540
          Gerrit-PatchSet: 9
          Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
          Gerrit-Reviewer: Andreas Haas <ah...@chromium.org>
          Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
          Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
          Gerrit-Reviewer: Maksim Ivanov <em...@chromium.org>
          Gerrit-Attention: Andreas Haas <ah...@chromium.org>
          Gerrit-Attention: Jakob Linke <jgr...@chromium.org>
          Gerrit-Comment-Date: Wed, 11 Mar 2026 08:39:48 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Jakob Linke <jgr...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Jakob Linke (Gerrit)

          unread,
          Mar 11, 2026, 7:13:24 AMMar 11
          to Arash Kazemi, Andreas Haas, chrom...@appspot.gserviceaccount.com, Maksim Ivanov, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com
          Attention needed from Andreas Haas and Arash Kazemi

          Jakob Linke voted and added 3 comments

          Votes added by Jakob Linke

          Code-Review+1

          3 comments

          Patchset-level comments
          File-level comment, Patchset 9 (Latest):
          Jakob Linke . resolved

          Ty, lgtm

          File src/regexp/regexp-macro-assembler.cc
          Line 151, Patchset 8: if (rhs->get(i * 2 + 0) != r.from()) return false;
          Jakob Linke . resolved

          Same here.

          Arash Kazemi

          I added `DCHECKs` for both get calls, `i` is less than `lhs_length` which is an int value so I don't think the first could actually trigger. If you think some of these are unnecessary or cluttering too much I am happy to remove them, they could be useful if the length is changed to be uint32_t in the future I guess.

          Jakob Linke

          Acknowledged

          Line 168, Patchset 8: range_array->set(i * 2 + 0, r.from());
          Jakob Linke . resolved

          And here.

          Arash Kazemi

          Same as above.

          Jakob Linke

          Acknowledged

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Andreas Haas
          • Arash Kazemi
          Submit Requirements:
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: v8/v8
          Gerrit-Branch: main
          Gerrit-Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
          Gerrit-Change-Number: 7626540
          Gerrit-PatchSet: 9
          Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
          Gerrit-Reviewer: Andreas Haas <ah...@chromium.org>
          Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
          Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
          Gerrit-Reviewer: Maksim Ivanov <em...@chromium.org>
          Gerrit-Attention: Andreas Haas <ah...@chromium.org>
          Gerrit-Attention: Arash Kazemi <ara...@chromium.org>
          Gerrit-Comment-Date: Wed, 11 Mar 2026 11:13:19 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Arash Kazemi <ara...@chromium.org>
          Comment-In-Reply-To: Jakob Linke <jgr...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Jakob Linke (Gerrit)

          unread,
          Mar 11, 2026, 7:23:23 AMMar 11
          to Arash Kazemi, Andreas Haas, chrom...@appspot.gserviceaccount.com, Maksim Ivanov, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com
          Attention needed from Andreas Haas and Arash Kazemi

          Jakob Linke added 5 comments

          File src/diagnostics/basic-block-profiler.cc
          Line 93, Patchset 9 (Latest): for (uint32_t i = 0; i < counts_len / kBlockCountSlotSize; ++i) {
          Jakob Linke . unresolved

          These loop limits also have to be updated once below is fixed.

          Line 98, Patchset 9 (Latest): for (uint32_t i = 0; i < blocks_ids_len / kBlockIdSlotSize; ++i) {
          Jakob Linke . unresolved

          And here.

          Line 118, Patchset 9 (Latest): isolate, id_array_size_in_bytes, AllocationType::kOld);
          Jakob Linke . unresolved

          This appears to be wrong (existing bug): New takes the n of elements, not the byte size.

          Line 126, Patchset 9 (Latest): DirectHandle<FixedUInt32Array> counts = FixedUInt32Array::New(
          Jakob Linke . unresolved

          Same here.

          File src/objects/fixed-array-inl.h
          Line 971, Patchset 9 (Latest): return base::WriteUnalignedValue<T>(get_element_address(index), value);
          Jakob Linke . unresolved

          nit: could remove the `return`

          Gerrit-Comment-Date: Wed, 11 Mar 2026 11:23:17 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Arash Kazemi (Gerrit)

          unread,
          Mar 11, 2026, 8:18:01 AMMar 11
          to Jakob Linke, Andreas Haas, chrom...@appspot.gserviceaccount.com, Maksim Ivanov, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com
          Attention needed from Andreas Haas

          Arash Kazemi added 5 comments

          File src/diagnostics/basic-block-profiler.cc
          Line 93, Patchset 9: for (uint32_t i = 0; i < counts_len / kBlockCountSlotSize; ++i) {
          Jakob Linke . resolved

          These loop limits also have to be updated once below is fixed.

          Arash Kazemi

          Done

          Line 98, Patchset 9: for (uint32_t i = 0; i < blocks_ids_len / kBlockIdSlotSize; ++i) {
          Jakob Linke . resolved

          And here.

          Arash Kazemi

          Done

          Line 118, Patchset 9: isolate, id_array_size_in_bytes, AllocationType::kOld);
          Jakob Linke . resolved

          This appears to be wrong (existing bug): New takes the n of elements, not the byte size.

          Arash Kazemi

          Yes good catch, I fixed it to pass `blocks_count` and removed the `kBlockIdSlotSize`/`kBlockCountSlotSize` values since the loops don't need to skip 4bytes at a time now.

          Line 126, Patchset 9: DirectHandle<FixedUInt32Array> counts = FixedUInt32Array::New(
          Jakob Linke . resolved

          Same here.

          Arash Kazemi

          Done

          File src/objects/fixed-array-inl.h
          Line 971, Patchset 9: return base::WriteUnalignedValue<T>(get_element_address(index), value);
          Jakob Linke . resolved

          nit: could remove the `return`

          Arash Kazemi

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Andreas Haas
          Submit Requirements:
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: v8/v8
          Gerrit-Branch: main
          Gerrit-Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
          Gerrit-Change-Number: 7626540
          Gerrit-PatchSet: 10
          Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
          Gerrit-Reviewer: Andreas Haas <ah...@chromium.org>
          Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
          Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
          Gerrit-Reviewer: Maksim Ivanov <em...@chromium.org>
          Gerrit-Attention: Andreas Haas <ah...@chromium.org>
          Gerrit-Comment-Date: Wed, 11 Mar 2026 12:17:56 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Jakob Linke <jgr...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Arash Kazemi (Gerrit)

          unread,
          Mar 12, 2026, 5:55:55 AMMar 12
          to Jakob Linke, Andreas Haas, chrom...@appspot.gserviceaccount.com, Maksim Ivanov, V8 LUCI CQ, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com
          Attention needed from Andreas Haas

          Arash Kazemi voted and added 1 comment

          Votes added by Arash Kazemi

          Commit-Queue+2

          1 comment

          File src/regexp/regexp-macro-assembler.cc
          Line 147, Patchset 8: const int lhs_length = lhs->length();
          Andreas Haas . resolved

          Why don't you have the static cast here?

          Arash Kazemi

          `ZoneList::length` returns `int`, I added a `DCHECK` to ensure it's positive and then static cast it to `uint32_t`.

          Arash Kazemi

          Acknowledged

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Andreas Haas
          Submit Requirements:
            • requirement satisfiedCode-Owners
            • requirement satisfiedCode-Review
            • requirement satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: v8/v8
            Gerrit-Branch: main
            Gerrit-Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
            Gerrit-Change-Number: 7626540
            Gerrit-PatchSet: 10
            Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
            Gerrit-Reviewer: Andreas Haas <ah...@chromium.org>
            Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
            Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
            Gerrit-Reviewer: Maksim Ivanov <em...@chromium.org>
            Gerrit-Attention: Andreas Haas <ah...@chromium.org>
            Gerrit-Comment-Date: Thu, 12 Mar 2026 09:55:50 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            Comment-In-Reply-To: Andreas Haas <ah...@chromium.org>
            Comment-In-Reply-To: Arash Kazemi <ara...@chromium.org>
            satisfied_requirement
            open
            diffy

            V8 LUCI CQ (Gerrit)

            unread,
            Mar 12, 2026, 5:57:36 AMMar 12
            to Arash Kazemi, Jakob Linke, Andreas Haas, chrom...@appspot.gserviceaccount.com, Maksim Ivanov, AyeAye, victorgo...@chromium.org, verwaes...@chromium.org, leszek...@chromium.org, dmercadi...@chromium.org, jgrube...@chromium.org, pthier...@chromium.org, v8-re...@googlegroups.com, was...@google.com

            V8 LUCI CQ submitted the change with unreviewed changes

            Unreviewed changes

            9 is the latest approved patch-set.
            The change was submitted with unreviewed changes in the following files:

            ```
            The name of the file: src/diagnostics/basic-block-profiler.cc
            Insertions: 7, Deletions: 16.

            @@ -66,9 +66,6 @@
            return isolate->factory()->NewStringFromAsciiChecked(source.c_str(),
            AllocationType::kOld);
            }
            -
            -constexpr uint32_t kBlockIdSlotSize = kInt32Size;
            -constexpr uint32_t kBlockCountSlotSize = kInt32Size;
            } // namespace

            BasicBlockProfilerData::BasicBlockProfilerData(
            @@ -90,12 +87,12 @@
            Tagged<FixedUInt32Array> counts =
            Cast<FixedUInt32Array>(js_heap_data->counts());
            const uint32_t counts_len = counts->length().value();
            - for (uint32_t i = 0; i < counts_len / kBlockCountSlotSize; ++i) {
            + for (uint32_t i = 0; i < counts_len; ++i) {
            counts_.push_back(counts->get(i));
            }
            Tagged<FixedInt32Array> block_ids(js_heap_data->block_ids());
            const uint32_t blocks_ids_len = block_ids->length().value();
            - for (uint32_t i = 0; i < blocks_ids_len / kBlockIdSlotSize; ++i) {
            + for (uint32_t i = 0; i < blocks_ids_len; ++i) {
            block_ids_.push_back(block_ids->get(i));
            }
            Tagged<PodArray<std::pair<int32_t, int32_t>>> branches =
            @@ -111,20 +108,14 @@
            DirectHandle<OnHeapBasicBlockProfilerData> BasicBlockProfilerData::CopyToJSHeap(
            Isolate* isolate) {
            const uint32_t blocks_count = static_cast<uint32_t>(n_blocks());
            - uint32_t id_array_size_in_bytes = blocks_count * kBlockIdSlotSize;
            - CHECK(static_cast<size_t>(id_array_size_in_bytes) / kBlockIdSlotSize ==
            - blocks_count); // Overflow
            - DirectHandle<FixedInt32Array> block_ids = FixedInt32Array::New(
            - isolate, id_array_size_in_bytes, AllocationType::kOld);
            + DirectHandle<FixedInt32Array> block_ids =
            + FixedInt32Array::New(isolate, blocks_count, AllocationType::kOld);
            for (uint32_t i = 0; i < blocks_count; ++i) {
            block_ids->set(i, block_ids_[i]);
            }

            - uint32_t counts_array_size_in_bytes = blocks_count * kBlockCountSlotSize;
            - CHECK(static_cast<size_t>(counts_array_size_in_bytes) / kBlockCountSlotSize ==
            - blocks_count); // Overflow
            - DirectHandle<FixedUInt32Array> counts = FixedUInt32Array::New(
            - isolate, counts_array_size_in_bytes, AllocationType::kOld);
            + DirectHandle<FixedUInt32Array> counts =
            + FixedUInt32Array::New(isolate, blocks_count, AllocationType::kOld);
            for (uint32_t i = 0; i < blocks_count; ++i) {
            counts->set(i, counts_[i]);
            }
            @@ -156,7 +147,7 @@
            DirectHandle<FixedUInt32Array> counts(
            Cast<OnHeapBasicBlockProfilerData>(list->get(i))->counts(), isolate);
            const uint32_t counts_len = counts->length().value();
            - for (uint32_t j = 0; j < counts_len / kBlockCountSlotSize; ++j) {
            + for (uint32_t j = 0; j < counts_len; ++j) {
            counts->set(j, 0);
            }
            }
            ```
            ```
            The name of the file: src/objects/fixed-array-inl.h
            Insertions: 1, Deletions: 1.

            @@ -968,7 +968,7 @@
            template <typename T, typename Base>
            void FixedIntegerArrayBase<T, Base>::set(uint32_t index, T value) {
            static_assert(std::is_integral_v<T>);
            - return base::WriteUnalignedValue<T>(get_element_address(index), value);
            + base::WriteUnalignedValue<T>(get_element_address(index), value);
            }

            template <typename T, typename Base>
            ```

            Change information

            Commit message:
            [sandbox] Use SafeHeapObjectSize in FixedIntegerArray and PodArray

            This CL changes all methods in FixedIntegerArrayBase and PodArrayBase to
            use uint32_t and return a strong alias for the length, forcing
            conversion at the callsites.
            Bug: 375937549
            Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
            Reviewed-by: Andreas Haas <ah...@chromium.org>
            Reviewed-by: Maksim Ivanov <em...@chromium.org>
            Reviewed-by: Jakob Linke <jgr...@chromium.org>
            Commit-Queue: Arash Kazemi <ara...@chromium.org>
            Cr-Commit-Position: refs/heads/main@{#105755}
            Files:
            • M src/compiler/backend/code-generator.cc
            • M src/diagnostics/basic-block-profiler.cc
            • M src/logging/log.cc
            • M src/maglev/maglev-code-generator.cc
            • M src/objects/fixed-array-inl.h
            • M src/objects/fixed-array.h
            • M src/regexp/regexp-macro-assembler.cc
            • M src/wasm/wasm-objects-inl.h
            • M src/wasm/wasm-objects.cc
            • M src/wasm/wasm-objects.h
            • M test/common/wasm/wasm-run-utils.cc
            Change size: M
            Delta: 11 files changed, 132 insertions(+), 110 deletions(-)
            Branch: refs/heads/main
            Submit Requirements:
            • requirement satisfiedCode-Review: +1 by Maksim Ivanov, +1 by Andreas Haas, +1 by Jakob Linke
            Open in Gerrit
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: merged
            Gerrit-Project: v8/v8
            Gerrit-Branch: main
            Gerrit-Change-Id: I828536568c8880050d1defaa958e8c399d75c32e
            Gerrit-Change-Number: 7626540
            Gerrit-PatchSet: 11
            Gerrit-Owner: Arash Kazemi <ara...@chromium.org>
            Gerrit-Reviewer: Andreas Haas <ah...@chromium.org>
            Gerrit-Reviewer: Arash Kazemi <ara...@chromium.org>
            Gerrit-Reviewer: Jakob Linke <jgr...@chromium.org>
            Gerrit-Reviewer: Maksim Ivanov <em...@chromium.org>
            open
            diffy
            satisfied_requirement
            Reply all
            Reply to author
            Forward
            0 new messages