summaryrefslogtreecommitdiffstats
path: root/libcxx/test
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-08-15 20:50:01 +0000
committerEric Fiselier <eric@efcs.ca>2016-08-15 20:50:01 +0000
commit5f6100260b4d1f9fe194e21ad5a9184c3fc5d137 (patch)
tree253eefa508f3217ad58224fd0af6f7c557d969c6 /libcxx/test
parent60dcc1344a27c62ba7b49dc1ff39881b606a97a3 (diff)
downloadbcm5719-llvm-5f6100260b4d1f9fe194e21ad5a9184c3fc5d137.tar.gz
bcm5719-llvm-5f6100260b4d1f9fe194e21ad5a9184c3fc5d137.zip
Fix new ASAN failures
llvm-svn: 278736
Diffstat (limited to 'libcxx/test')
-rw-r--r--libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp4
-rw-r--r--libcxx/test/support/test.support/test_macros_header_rtti.pass.cpp1
2 files changed, 3 insertions, 2 deletions
diff --git a/libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp
index b102fc08daf..d3604f0c3a5 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/asan.pass.cpp
@@ -61,8 +61,8 @@ int main()
C c(std::begin(t), std::end(t));
c.reserve(2*c.size());
assert(is_contiguous_container_asan_correct(c));
- assert(!__sanitizer_verify_contiguous_container ( c.data(), c.data() + 1, c.data() + c.capacity()));
- T foo = c[c.size()]; // should trigger ASAN
+ assert(!__sanitizer_verify_contiguous_container( c.data(), c.data() + 1, c.data() + c.capacity()));
+ volatile T foo = c[c.size()]; // should trigger ASAN. Use volatile to prevent being optimized away.
assert(false); // if we got here, ASAN didn't trigger
}
}
diff --git a/libcxx/test/support/test.support/test_macros_header_rtti.pass.cpp b/libcxx/test/support/test.support/test_macros_header_rtti.pass.cpp
index d189a0efc2f..dee1a049457 100644
--- a/libcxx/test/support/test.support/test_macros_header_rtti.pass.cpp
+++ b/libcxx/test/support/test.support/test_macros_header_rtti.pass.cpp
@@ -25,4 +25,5 @@ struct B : A {};
int main() {
A* ptr = new B;
(void)dynamic_cast<B*>(ptr);
+ delete ptr;
}
OpenPOWER on IntegriCloud