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>
1 file changed
tree: 49d119fe1d3949a464c28dd72a01d3938db964a0
  1. .github/
  2. .vscode/
  3. apps/
  4. device/
  5. modules/
  6. system/
  7. targets/
  8. tools/
  9. web_app/
  10. .bazelignore
  11. .bazelrc
  12. .bazelversion
  13. .buildifier.json
  14. .clang-format
  15. .clangd.shared
  16. .gitignore
  17. .pw_console.yaml
  18. AUTHORS
  19. BUILD.bazel
  20. CONTRIBUTING.md
  21. LICENSE
  22. MODULE.bazel
  23. MODULE.bazel.lock
  24. OWNERS
  25. pigweed.json
  26. README.md
README.md

Sense

git clone https://pigweed.googlesource.com/pigweed/showcase/sense

Welcome to Pigweed Sense, a tour of key Pigweed components experienced through an imagined air quality product.

Please visit Sense: An interactive tour through Pigweed to get started.