roll: pigweed, pw_toolchain: pw_multibuf: Restructure ChunkIterable
MultiBuf is a byte-oriented view of a list of chunks, and this change
structures MultiBuf accordingly. This replaces the ChunkIterable class
with a private MultiBufChunks base class that provides the
Chunk-oriented view for MultiBuf.
Restructuring this way fixes an issue where MultiBuf data can be
modified from a const reference. MultiBuf originally returned a const
ChunkIterable, but since return values are copied, this becomes a
non-const ChunkIterable, giving mutable access to the multibuf.
const MultiBuf& const_mb = mb;
auto chunk_iterable = cmb.Chunks(); // chunk_iterable is non-const
iterable.front()[0] = std::byte(); // uh oh, chunk data is mutable!
Original-Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/230892
https://pigweed.googlesource.com/pigweed/pigweed
pigweed, pw_toolchain Rolled-Commits: 03da4a376d12ab8..7e7c141c8808200
Roller-URL: https://ci.chromium.org/b/8739059875420670833
GitWatcher: ignore
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: Id5bbf5c18e2a0d1be7d75a642526beadcdfd6915
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/showcase/sense/+/230874
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
diff --git a/MODULE.bazel b/MODULE.bazel
index 830a836..c4e73e8 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -48,8 +48,8 @@
module_name = "pigweed",
# ROLL: Warning: this entry is automatically updated.
# ROLL: Last updated 2024-08-20.
- # ROLL: By https://cr-buildbucket.appspot.com/build/8739061059456060161.
- commit = "03da4a376d12ab8173f250a14f703ae8a1571d3c",
+ # ROLL: By https://cr-buildbucket.appspot.com/build/8739059875420670833.
+ commit = "7e7c141c88082004fa8ae3682bf37f3a8229af11",
remote = "https://pigweed.googlesource.com/pigweed/pigweed",
)
@@ -57,8 +57,8 @@
module_name = "pw_toolchain",
# ROLL: Warning: this entry is automatically updated.
# ROLL: Last updated 2024-08-20.
- # ROLL: By https://cr-buildbucket.appspot.com/build/8739061059456060161.
- commit = "03da4a376d12ab8173f250a14f703ae8a1571d3c",
+ # ROLL: By https://cr-buildbucket.appspot.com/build/8739059875420670833.
+ commit = "7e7c141c88082004fa8ae3682bf37f3a8229af11",
remote = "https://pigweed.googlesource.com/pigweed/pigweed",
strip_prefix = "pw_toolchain_bazel",
)