Commit 84d2f334 authored by Sergei Glazunov's avatar Sergei Glazunov Committed by Chromium LUCI CQ

[BackupRefPtr] Temporarily add padding

We're seeing a lot of Canary crashes that occur when BRP treats a
freelist pointer as a reference count and corrupts it. Until we find
the root cause, modify the layout of PartitionRefCount so that the
count no longer overlaps with the pointer.

Bug: 1164636
Change-Id: I39934867e042a1e54caa933e8ab82496c15f37fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2622097Reviewed-by: default avatarBartek Nowierski <bartekn@chromium.org>
Reviewed-by: default avatarWill Harris <wfh@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Auto-Submit: Sergei Glazunov <glazunov@google.com>
Cr-Commit-Position: refs/heads/master@{#842308}
parent 6d452a98
...@@ -85,6 +85,16 @@ class BASE_EXPORT PartitionRefCount { ...@@ -85,6 +85,16 @@ class BASE_EXPORT PartitionRefCount {
} }
private: private:
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
void* padding_; // TODO(crbug.com/1164636): This "workaround" is meant to
// reduce the number of freelist corruption crashes we see in
// experiments. Remove once root cause has been found.
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
std::atomic<int32_t> count_{1}; std::atomic<int32_t> count_{1};
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment