roll: pigweed pw_allocator: Fix data race
Prior to this CL, a corruption existed in the following scenario:
- Block 1 is allocated.
- Block 2 is allocated with an alignment requirement that results in
a small gap of less than a minimumu-sized block between blocks 1
and 2. The extra bytes are added to the end of block 1.
- Block 1 is resized to be slightly bigger by less than the extra
bytes. Since the block size does not change, `Resize` trivially
returns.
- Block 2 is freed, and reclaims the bytes it lent to block 1.
- Block 1 tries to access its trailing bytes concurrently with a new
block being allocated.
The fix is simply to update the tracked number of extra bytes, even when
the `Resize` is trivial.
Original-Bug: 372446436
Original-Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/242736
Original-Revision: 57183dee645126c67dcccbb479c730492ef168f6
Rolled-Repo: https://pigweed.googlesource.com/pigweed/pigweed
Rolled-Commits: 8e0d91c3f7da31..57183dee645126
Roll-Count: 1
Roller-URL: https://ci.chromium.org/b/8733807452911354513
GitWatcher: ignore
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I3618f92df81a9f4a144461b8bd7b66fe126830c9
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/showcase/sense/+/242922
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
diff --git a/MODULE.bazel b/MODULE.bazel
index b43edd4..7412959 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -49,8 +49,8 @@
module_name = "pigweed",
# ROLL: Warning: this entry is automatically updated.
# ROLL: Last updated 2024-10-17.
- # ROLL: By https://cr-buildbucket.appspot.com/build/8733808803626671041.
- commit = "8e0d91c3f7da31448419584ae9287de57ed5452f",
+ # ROLL: By https://cr-buildbucket.appspot.com/build/8733807452911354513.
+ commit = "57183dee645126c67dcccbb479c730492ef168f6",
remote = "https://pigweed.googlesource.com/pigweed/pigweed",
)
@@ -58,8 +58,8 @@
module_name = "pw_toolchain",
# ROLL: Warning: this entry is automatically updated.
# ROLL: Last updated 2024-10-17.
- # ROLL: By https://cr-buildbucket.appspot.com/build/8733808803626671041.
- commit = "8e0d91c3f7da31448419584ae9287de57ed5452f",
+ # ROLL: By https://cr-buildbucket.appspot.com/build/8733807452911354513.
+ commit = "57183dee645126c67dcccbb479c730492ef168f6",
remote = "https://pigweed.googlesource.com/pigweed/pigweed",
strip_prefix = "pw_toolchain_bazel",
)