Add alignment parameter to PartitionAllocHooks::AllocationOverrideHook. [chromium/src : main]

0 views
Skip to first unread message

Stephen Nusko (Gerrit)

unread,
Jun 23, 2026, 8:42:32 PM (4 days ago) Jun 23
to Kalvin Lee, chromium...@chromium.org, Chromium LUCI CQ, Kentaro Hara, android-bu...@system.gserviceaccount.com, bartek...@chromium.org, glazuno...@chromium.org, lizeb...@chromium.org, lize...@chromium.org, mpdento...@chromium.org, wfh+...@chromium.org
Attention needed from Kalvin Lee

Stephen Nusko voted and added 1 comment

Votes added by Stephen Nusko

Auto-Submit+1

1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Stephen Nusko . resolved

I'm not perfectly happy with having to pull this sort of logic into alloc::Flags and passing into AllocInternal (feels a bit messy).

The other thing I thought about was patchset 4 where I passed a kNoRequiredAlignment, and just always did an std::max... but I also didn't like that as a solution since passing zero is weird...

So I went with this solution which
1) Avoids any impact on the NONE aligned path through the use of constexpr
2) Since it is only used internally on inlined functions doesn't really impact binary size.

Thoughts? Other potential approaches here?

Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I14fcda98520e9749764140cc2eccdafe176e9113
Gerrit-Change-Number: 7838366
Gerrit-PatchSet: 6
Gerrit-Owner: Stephen Nusko <nus...@chromium.org>
Gerrit-Reviewer: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
Gerrit-Comment-Date: Wed, 24 Jun 2026 00:42:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Kalvin Lee (Gerrit)

unread,
Jun 24, 2026, 8:42:01 AM (3 days ago) Jun 24
to Stephen Nusko, Matthew Denton, chromium...@chromium.org, Chromium LUCI CQ, Kentaro Hara, android-bu...@system.gserviceaccount.com, bartek...@chromium.org, glazuno...@chromium.org, lizeb...@chromium.org, lize...@chromium.org, mpdento...@chromium.org, wfh+...@chromium.org
Attention needed from Matthew Denton and Stephen Nusko

Kalvin Lee voted and added 4 comments

Votes added by Kalvin Lee

Code-Review+1

4 comments

Patchset-level comments
Kalvin Lee . resolved

Non-owners vote, with some questions (but nothing blocking). Adding GWP-ASan owners optimistically.

File base/allocator/partition_allocator/src/partition_alloc/internal/partition_root_internal.h
Line 100, Patchset 6 (Latest): static_assert(!ContainsFlags(flags, AllocFlags::kAlignedAlloc));
Kalvin Lee . unresolved

Could you document why this is being introduced?

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h
Line 77, Patchset 6 (Latest): kAlignedFreeForMemoryTool = 1 << 7, // Internal.
Kalvin Lee . unresolved

Do we not need to adjust this at all? (If not, I would appreciate at least a comment here in this code review as to why not.)

File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.h
Line 36, Patchset 6 (Latest): std::optional<size_t> alignment);
Kalvin Lee . resolved

Random thought: the `std::optional` is good form, but I don't think anybody could ever request alignment of `0` --- maybe that could serve as a sentinel value. After all, that's what `GuardedPageAllocator::Allocate()` ends up using anyway.

Only applicable if the overhead is measurable, of course...

Open in Gerrit

Related details

Attention is currently required from:
  • Matthew Denton
  • Stephen Nusko
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • 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: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I14fcda98520e9749764140cc2eccdafe176e9113
    Gerrit-Change-Number: 7838366
    Gerrit-PatchSet: 6
    Gerrit-Owner: Stephen Nusko <nus...@chromium.org>
    Gerrit-Reviewer: Kalvin Lee <kd...@chromium.org>
    Gerrit-Reviewer: Matthew Denton <mpde...@chromium.org>
    Gerrit-Attention: Matthew Denton <mpde...@chromium.org>
    Gerrit-Attention: Stephen Nusko <nus...@chromium.org>
    Gerrit-Comment-Date: Wed, 24 Jun 2026 12:41:18 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Stephen Nusko (Gerrit)

    unread,
    Jun 24, 2026, 9:22:40 PM (3 days ago) Jun 24
    to Matthew Denton, Kalvin Lee, chromium...@chromium.org, Chromium LUCI CQ, Kentaro Hara, android-bu...@system.gserviceaccount.com, bartek...@chromium.org, glazuno...@chromium.org, lizeb...@chromium.org, lize...@chromium.org, mpdento...@chromium.org, wfh+...@chromium.org
    Attention needed from Kalvin Lee and Matthew Denton

    Stephen Nusko added 3 comments

    File base/allocator/partition_allocator/src/partition_alloc/internal/partition_root_internal.h
    Line 100, Patchset 6 (Latest): static_assert(!ContainsFlags(flags, AllocFlags::kAlignedAlloc));
    Kalvin Lee . unresolved

    Could you document why this is being introduced?

    Stephen Nusko

    Yeah I hadn't really added comments. Wanted to get your thoughts on patchset 4 versus patchset 6 (see [comment](https://chromium-review.git.corp.google.com/c/chromium/src/+/7838366/comments/45f6865c_2604bfdb)).

    I just wanted to block any other function from setting it EXCEPT AlignedAlloc (to prevent misuse of kAlignedAlloc. So I went to every callsite of AllocInternal and added a static assert, but I guess we could allow it for AllocInternalForTesting (not that anyone currently uses it), so you could write a test about it.

    Note that I don't overly love this approach because in theory you could still add a new route to AllocInternal and not add the static assert... A bit annoying in terms of encapsulation and maintainablity, but I don't think we add new calls into AllocInternal much so perhaps it is okay.

    Should I keep this or remove? Or enforce it in a different way?

    (replying now but not resolving, will resolve once I add comments later today).

    File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h
    Line 77, Patchset 6 (Latest): kAlignedFreeForMemoryTool = 1 << 7, // Internal.
    Kalvin Lee . unresolved

    Do we not need to adjust this at all? (If not, I would appreciate at least a comment here in this code review as to why not.)

    Stephen Nusko

    No, we could do so to make it symmetrical to avoid stepping on it later. It isn't required because GWP-ASAN does aligned allocation by just moving the pointer it returns INSIDE the 4KB page that it allocated. This means it doesn't need to do anything special to free. It just looks up the page and proceeds as normal.

    This contrasts with using system APIs like aligned_alloc/aligned_free on windows, but we could make this consistent in case we need it for some future problem?

    I can see pros and cons to both sides, what are your thoughts?

    File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.h
    Line 36, Patchset 6 (Latest): std::optional<size_t> alignment);
    Kalvin Lee . resolved

    Random thought: the `std::optional` is good form, but I don't think anybody could ever request alignment of `0` --- maybe that could serve as a sentinel value. After all, that's what `GuardedPageAllocator::Allocate()` ends up using anyway.

    Only applicable if the overhead is measurable, of course...

    Stephen Nusko

    What you described I did in patchset 4.

    I think this should be fine. for two reasons

    1) on non-aligned alloc this is always std::nullopt, and we only check the optional AFTER we've decided to sample for GWP-asan. Likely not going to impact perf.
    2) On aligned alloc we do construct the optional, but again constexpr, so the compiler should determine that it just gets constructed in place and only gets checked after the fact.

    Performance impact should be tiny. I can run a pinpoint on the two patchsets though. Though I'm not sure how much GWP ASAN impacts speedometer.

    Take a look and let me know if you have strong preferences?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Kalvin Lee
    • Matthew Denton
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • 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: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I14fcda98520e9749764140cc2eccdafe176e9113
    Gerrit-Change-Number: 7838366
    Gerrit-PatchSet: 6
    Gerrit-Owner: Stephen Nusko <nus...@chromium.org>
    Gerrit-Reviewer: Kalvin Lee <kd...@chromium.org>
    Gerrit-Reviewer: Matthew Denton <mpde...@chromium.org>
    Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
    Gerrit-Attention: Matthew Denton <mpde...@chromium.org>
    Gerrit-Comment-Date: Thu, 25 Jun 2026 01:21:59 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Kalvin Lee <kd...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    chromeperf@appspot.gserviceaccount.com (Gerrit)

    unread,
    Jun 24, 2026, 9:30:15 PM (3 days ago) Jun 24
    to Stephen Nusko, Matthew Denton, Kalvin Lee, chromium...@chromium.org, Chromium LUCI CQ, Kentaro Hara, android-bu...@system.gserviceaccount.com, bartek...@chromium.org, glazuno...@chromium.org, lizeb...@chromium.org, lize...@chromium.org, mpdento...@chromium.org, wfh+...@chromium.org
    Attention needed from Kalvin Lee, Matthew Denton and Stephen Nusko

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

    😿 Job mac-m1_mini_2020-perf/speedometer3 failed.

    See results at: https://pinpoint-dot-chromeperf.appspot.com/job/105a5c76c90000

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Kalvin Lee
    • Matthew Denton
    • Stephen Nusko
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • 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: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I14fcda98520e9749764140cc2eccdafe176e9113
    Gerrit-Change-Number: 7838366
    Gerrit-PatchSet: 6
    Gerrit-Owner: Stephen Nusko <nus...@chromium.org>
    Gerrit-Reviewer: Kalvin Lee <kd...@chromium.org>
    Gerrit-Reviewer: Matthew Denton <mpde...@chromium.org>
    Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
    Gerrit-Attention: Matthew Denton <mpde...@chromium.org>
    Gerrit-Attention: Stephen Nusko <nus...@chromium.org>
    Gerrit-Comment-Date: Thu, 25 Jun 2026 01:29:55 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    chromeperf@appspot.gserviceaccount.com (Gerrit)

    unread,
    Jun 24, 2026, 9:30:44 PM (3 days ago) Jun 24
    to Stephen Nusko, Matthew Denton, Kalvin Lee, chromium...@chromium.org, Chromium LUCI CQ, Kentaro Hara, android-bu...@system.gserviceaccount.com, bartek...@chromium.org, glazuno...@chromium.org, lizeb...@chromium.org, lize...@chromium.org, mpdento...@chromium.org, wfh+...@chromium.org
    Attention needed from Kalvin Lee, Matthew Denton and Stephen Nusko

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

    😿 Job mac-m1_mini_2020-perf/speedometer3 failed.

    See results at: https://pinpoint-dot-chromeperf.appspot.com/job/16185171c90000

    Gerrit-Comment-Date: Thu, 25 Jun 2026 01:30:26 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    chromeperf@appspot.gserviceaccount.com (Gerrit)

    unread,
    Jun 24, 2026, 9:31:55 PM (3 days ago) Jun 24
    to Stephen Nusko, Matthew Denton, Kalvin Lee, chromium...@chromium.org, Chromium LUCI CQ, Kentaro Hara, android-bu...@system.gserviceaccount.com, bartek...@chromium.org, glazuno...@chromium.org, lizeb...@chromium.org, lize...@chromium.org, mpdento...@chromium.org, wfh+...@chromium.org
    Attention needed from Kalvin Lee, Matthew Denton and Stephen Nusko

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

    😿 Job mac-m1_mini_2020-perf/speedometer3 failed.

    See results at: https://pinpoint-dot-chromeperf.appspot.com/job/16617c81c90000

    Gerrit-Comment-Date: Thu, 25 Jun 2026 01:31:41 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    chromeperf@appspot.gserviceaccount.com (Gerrit)

    unread,
    Jun 24, 2026, 10:16:04 PM (3 days ago) Jun 24
    to Stephen Nusko, Matthew Denton, Kalvin Lee, chromium...@chromium.org, Chromium LUCI CQ, Kentaro Hara, android-bu...@system.gserviceaccount.com, bartek...@chromium.org, glazuno...@chromium.org, lizeb...@chromium.org, lize...@chromium.org, mpdento...@chromium.org, wfh+...@chromium.org
    Attention needed from Kalvin Lee, Matthew Denton and Stephen Nusko

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

    📍 Job mac-m1_mini_2020-perf/speedometer3 complete.

    See results at: https://pinpoint-dot-chromeperf.appspot.com/job/10795eeec90000

    Gerrit-Comment-Date: Thu, 25 Jun 2026 02:15:48 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    chromeperf@appspot.gserviceaccount.com (Gerrit)

    unread,
    Jun 24, 2026, 10:34:10 PM (3 days ago) Jun 24
    to Stephen Nusko, Matthew Denton, Kalvin Lee, chromium...@chromium.org, Chromium LUCI CQ, Kentaro Hara, android-bu...@system.gserviceaccount.com, bartek...@chromium.org, glazuno...@chromium.org, lizeb...@chromium.org, lize...@chromium.org, mpdento...@chromium.org, wfh+...@chromium.org
    Attention needed from Kalvin Lee, Matthew Denton and Stephen Nusko

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

    📍 Job mac-m1_mini_2020-perf/speedometer3 complete.

    See results at: https://pinpoint-dot-chromeperf.appspot.com/job/1470d6f9c90000

    Gerrit-Comment-Date: Thu, 25 Jun 2026 02:33:51 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    chromeperf@appspot.gserviceaccount.com (Gerrit)

    unread,
    Jun 24, 2026, 10:39:05 PM (3 days ago) Jun 24
    to Stephen Nusko, Matthew Denton, Kalvin Lee, chromium...@chromium.org, Chromium LUCI CQ, Kentaro Hara, android-bu...@system.gserviceaccount.com, bartek...@chromium.org, glazuno...@chromium.org, lizeb...@chromium.org, lize...@chromium.org, mpdento...@chromium.org, wfh+...@chromium.org
    Attention needed from Kalvin Lee, Matthew Denton and Stephen Nusko

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

    📍 Job mac-m1_mini_2020-perf/speedometer3 complete.

    See results at: https://pinpoint-dot-chromeperf.appspot.com/job/14adf3f6c90000

    Gerrit-Comment-Date: Thu, 25 Jun 2026 02:38:44 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Kalvin Lee (Gerrit)

    unread,
    Jun 25, 2026, 7:49:22 AM (3 days ago) Jun 25
    to Stephen Nusko, chrom...@appspot.gserviceaccount.com, Matthew Denton, chromium...@chromium.org, Chromium LUCI CQ, Kentaro Hara, android-bu...@system.gserviceaccount.com, bartek...@chromium.org, glazuno...@chromium.org, lizeb...@chromium.org, lize...@chromium.org, mpdento...@chromium.org, wfh+...@chromium.org
    Attention needed from Matthew Denton and Stephen Nusko

    Kalvin Lee added 4 comments

    Patchset-level comments
    Kalvin Lee . resolved

    Sustained non-owners vote. Matt, it's ready for you whenever you feel up for it 😊

    File base/allocator/partition_allocator/src/partition_alloc/internal/partition_root_internal.h
    Line 100, Patchset 6 (Latest): static_assert(!ContainsFlags(flags, AllocFlags::kAlignedAlloc));
    Kalvin Lee . resolved

    Could you document why this is being introduced?

    Stephen Nusko

    Yeah I hadn't really added comments. Wanted to get your thoughts on patchset 4 versus patchset 6 (see [comment](https://chromium-review.git.corp.google.com/c/chromium/src/+/7838366/comments/45f6865c_2604bfdb)).

    I just wanted to block any other function from setting it EXCEPT AlignedAlloc (to prevent misuse of kAlignedAlloc. So I went to every callsite of AllocInternal and added a static assert, but I guess we could allow it for AllocInternalForTesting (not that anyone currently uses it), so you could write a test about it.

    Note that I don't overly love this approach because in theory you could still add a new route to AllocInternal and not add the static assert... A bit annoying in terms of encapsulation and maintainablity, but I don't think we add new calls into AllocInternal much so perhaps it is okay.

    Should I keep this or remove? Or enforce it in a different way?

    (replying now but not resolving, will resolve once I add comments later today).

    Kalvin Lee

    I personally like the idea of

    ``` c++
    #include <concepts>

    // ...

    // narrative exposition to explain to kalvin why we are disallowing this
    // blah blah blah
    template <AllocFlags alloc_flags>
    concept AlignedAllocDisallowed =
    !ContainsFlags(alloc_flags, AllocFlags::kAlignedAlloc);

    // ...

    template <AllocFlags flags>
    requires AlignedAllocDisallowed<flags>
    PA_NOINLINE PA_MALLOC_FN void* PartitionRoot::AllocInternalForTesting(
    // ...

    ```

    Although it looks like this is generally [discouraged by the Google style guide](https://google.github.io/styleguide/cppguide.html#Concepts) (and not overridden by the Chromium style guide AFAICT), I personally think this is kind of okay since

    • this _is_ an internal header, and
    • encoding the requirement in the type of `AllocInternal*()` directly is kind of nice.

    That said, I don't feel strongly about this, and the `static_assert`s do a fine job as they are.

    I feel that `kNoRequiredAlignment` is a great name (very clear), but the thing we want it to do is kind of solved by `AllocFlags`. I have a slight preference for patchset 6 over patchset 4.

    File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h
    Line 77, Patchset 6 (Latest): kAlignedFreeForMemoryTool = 1 << 7, // Internal.
    Kalvin Lee . resolved

    Do we not need to adjust this at all? (If not, I would appreciate at least a comment here in this code review as to why not.)

    Stephen Nusko

    No, we could do so to make it symmetrical to avoid stepping on it later. It isn't required because GWP-ASAN does aligned allocation by just moving the pointer it returns INSIDE the 4KB page that it allocated. This means it doesn't need to do anything special to free. It just looks up the page and proceeds as normal.

    This contrasts with using system APIs like aligned_alloc/aligned_free on windows, but we could make this consistent in case we need it for some future problem?

    I can see pros and cons to both sides, what are your thoughts?

    Kalvin Lee

    D'oh, I hadn't realized there wasn't a platform-agnostic aligned `free()` function 😞

    This reads like an existing inconsistency, not being particularly exacerbated by this CL, so I'm inclined to let this go as is.

    File base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.h
    Line 36, Patchset 6 (Latest): std::optional<size_t> alignment);
    Kalvin Lee . resolved

    Random thought: the `std::optional` is good form, but I don't think anybody could ever request alignment of `0` --- maybe that could serve as a sentinel value. After all, that's what `GuardedPageAllocator::Allocate()` ends up using anyway.

    Only applicable if the overhead is measurable, of course...

    Stephen Nusko

    What you described I did in patchset 4.

    I think this should be fine. for two reasons

    1) on non-aligned alloc this is always std::nullopt, and we only check the optional AFTER we've decided to sample for GWP-asan. Likely not going to impact perf.
    2) On aligned alloc we do construct the optional, but again constexpr, so the compiler should determine that it just gets constructed in place and only gets checked after the fact.

    Performance impact should be tiny. I can run a pinpoint on the two patchsets though. Though I'm not sure how much GWP ASAN impacts speedometer.

    Take a look and let me know if you have strong preferences?

    Kalvin Lee

    No strong preferences, and Speedometer3 lying flat is the strongest endorsement there is 😊

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Matthew Denton
    • Stephen Nusko
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • 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: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I14fcda98520e9749764140cc2eccdafe176e9113
      Gerrit-Change-Number: 7838366
      Gerrit-PatchSet: 6
      Gerrit-Owner: Stephen Nusko <nus...@chromium.org>
      Gerrit-Reviewer: Kalvin Lee <kd...@chromium.org>
      Gerrit-Reviewer: Matthew Denton <mpde...@chromium.org>
      Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Attention: Matthew Denton <mpde...@chromium.org>
      Gerrit-Attention: Stephen Nusko <nus...@chromium.org>
      Gerrit-Comment-Date: Thu, 25 Jun 2026 11:48:55 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Kalvin Lee <kd...@chromium.org>
      Comment-In-Reply-To: Stephen Nusko <nus...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Matthew Denton (Gerrit)

      unread,
      Jun 26, 2026, 4:12:48 PM (yesterday) Jun 26
      to Stephen Nusko, chrom...@appspot.gserviceaccount.com, Kalvin Lee, chromium...@chromium.org, Chromium LUCI CQ, Kentaro Hara, android-bu...@system.gserviceaccount.com, bartek...@chromium.org, glazuno...@chromium.org, lizeb...@chromium.org, lize...@chromium.org, mpdento...@chromium.org, wfh+...@chromium.org
      Attention needed from Stephen Nusko

      Matthew Denton voted

      Code-Review+1
      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Stephen Nusko
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • 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: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I14fcda98520e9749764140cc2eccdafe176e9113
      Gerrit-Change-Number: 7838366
      Gerrit-PatchSet: 6
      Gerrit-Owner: Stephen Nusko <nus...@chromium.org>
      Gerrit-Reviewer: Kalvin Lee <kd...@chromium.org>
      Gerrit-Reviewer: Matthew Denton <mpde...@chromium.org>
      Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Attention: Stephen Nusko <nus...@chromium.org>
      Gerrit-Comment-Date: Fri, 26 Jun 2026 20:12:36 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Jun 26, 2026, 6:20:05 PM (yesterday) Jun 26
      to Stephen Nusko, Matthew Denton, chrom...@appspot.gserviceaccount.com, Kalvin Lee, chromium...@chromium.org, Kentaro Hara, android-bu...@system.gserviceaccount.com, bartek...@chromium.org, glazuno...@chromium.org, lizeb...@chromium.org, lize...@chromium.org, mpdento...@chromium.org, wfh+...@chromium.org

      Chromium LUCI CQ submitted the change

      Change information

      Commit message:
      Add alignment parameter to PartitionAllocHooks::AllocationOverrideHook.

      A crash has been seen in Audio code which we suspect is due to it
      requesting 32 alignment, but when it gets selected to be sampled by
      GWP-ASAN this requirement is lost and it falls back to the default
      GWP-ASAN alignment of 16.

      The AllocationOverrideHook now receives the requested alignment. The
      GWP-Asan sampling shim is updated to use this alignment when calling its
      internal allocator, and a new test case is added to verify correct
      handling of aligned allocations.
      Bug: 506860289
      Change-Id: I14fcda98520e9749764140cc2eccdafe176e9113
      Reviewed-by: Matthew Denton <mpde...@chromium.org>
      Auto-Submit: Stephen Nusko <nus...@chromium.org>
      Commit-Queue: Matthew Denton <mpde...@chromium.org>
      Reviewed-by: Kalvin Lee <kd...@chromium.org>
      Cr-Commit-Position: refs/heads/main@{#1653490}
      Files:
      • M base/allocator/partition_allocator/src/partition_alloc/internal/partition_root_internal.h
      • M base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h
      • M base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.cc
      • M base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.h
      • M base/allocator/partition_allocator/src/partition_alloc/partition_alloc_unittest.cc
      • M base/allocator/partition_allocator/src/partition_alloc/partition_root.cc
      • M base/allocator/partition_allocator/src/partition_alloc/partition_root.h
      • M components/gwp_asan/client/sampling_partitionalloc_shims.cc
      • M components/gwp_asan/client/sampling_partitionalloc_shims_unittest.cc
      Change size: M
      Delta: 9 files changed, 62 insertions(+), 36 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Kalvin Lee, +1 by Matthew Denton
      Open in Gerrit
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: merged
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I14fcda98520e9749764140cc2eccdafe176e9113
      Gerrit-Change-Number: 7838366
      Gerrit-PatchSet: 7
      Gerrit-Owner: Stephen Nusko <nus...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Kalvin Lee <kd...@chromium.org>
      Gerrit-Reviewer: Matthew Denton <mpde...@chromium.org>
      Gerrit-Reviewer: Stephen Nusko <nus...@chromium.org>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages