Skip to content

Commit 73c2107

Browse files
davidbenchromeos-ci-prod
authored and
chromeos-ci-prod
committed
Reland "Add -fsanitize=pointer-overflow to the UBSan config"
This is a reland of commit 103f0ee63afb8a42af04c9a152dc938e3571c128 The fix for leveldb is google/leveldb#1222, but add a suppression for now. Original change's description: > Add -fsanitize=pointer-overflow to the UBSan config > > This required adding a couple suppressions for issues. Also fixing > undefined behavior in BufferIteratorTest.ObjectSizeOverflow, which seems > to have not been testing SIZE_MAX at all, and just when the buffer > didn't have enough room. > > Bug: 40942951, 384391188, 385062729, 385155394 > Change-Id: If6defef3fbc4977632fccc63049901836d4a5347 > Cq-Include-Trybots: luci.chromium.try:linux_chromium_ubsan_rel_ng > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6108769 > Reviewed-by: Nico Weber <thakis@chromium.org> > Reviewed-by: Daniel Cheng <dcheng@chromium.org> > Auto-Submit: David Benjamin <davidben@chromium.org> > Commit-Queue: David Benjamin <davidben@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1399851} Bug: 40942951, 384391188, 385062729, 385155394 Change-Id: I535d865661be49f11a291c62671557f7541b2bb9 Cq-Include-Trybots: luci.chromium.try:linux_chromium_ubsan_rel_ng Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6120908 Auto-Submit: David Benjamin <davidben@chromium.org> Commit-Queue: David Benjamin <davidben@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Cr-Commit-Position: refs/heads/main@{#1399949} CrOS-Libchrome-Original-Commit: fd7de0b84913bda60edcf21ab6c7c0cd017b1d70
1 parent 33ad9e0 commit 73c2107

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

base/containers/buffer_iterator_unittest.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ TEST(BufferIteratorTest, MutableObject) {
7777
}
7878
}
7979

80-
TEST(BufferIteratorTest, ObjectSizeOverflow) {
80+
TEST(BufferIteratorTest, ObjectDoesNotFit) {
8181
char buffer[64];
82-
BufferIterator<char> iterator(buffer, std::numeric_limits<size_t>::max());
82+
BufferIterator<char> iterator(buffer);
8383

8484
auto* pointer = iterator.Object<uint64_t>();
8585
EXPECT_TRUE(pointer);

0 commit comments

Comments
 (0)