diff options
author | Anna Zaks <ganna@apple.com> | 2013-12-19 02:35:26 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2013-12-19 02:35:26 +0000 |
commit | 629f3b229e58bd930f87a9a3c01aec52daf5bc87 (patch) | |
tree | 11626d5df649f67d37d3bd14599e2c536f67840c /unittests | |
parent | 33f01f9848bacd31cec613d1b4341e24eb527845 (diff) |
Fix a buffer overrun detected by AddressSanitizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197647 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/ADT/BitVectorTest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/ADT/BitVectorTest.cpp b/unittests/ADT/BitVectorTest.cpp index d7cde891fb5..3deaff0fe35 100644 --- a/unittests/ADT/BitVectorTest.cpp +++ b/unittests/ADT/BitVectorTest.cpp @@ -356,6 +356,12 @@ TYPED_TEST(BitVectorTest, RangeOps) { EXPECT_TRUE( E.test(1)); EXPECT_TRUE( E.test(32)); EXPECT_FALSE(E.test(33)); + + TypeParam BufferOverrun; + unsigned size = sizeof(unsigned long) * 8; + BufferOverrun.resize(size); + BufferOverrun.reset(0, size); + BufferOverrun.set(0, size); } TYPED_TEST(BitVectorTest, CompoundTestReset) { |