svn commit: r304763 - vendor/compiler-rt/dist/lib/msan/tests
Dimitry Andric
dim at FreeBSD.org
Wed Aug 24 17:37:07 UTC 2016
Author: dim
Date: Wed Aug 24 17:37:06 2016
New Revision: 304763
URL: https://svnweb.freebsd.org/changeset/base/304763
Log:
Vendor import of compiler-rt release_39 branch r279477:
https://llvm.org/svn/llvm-project/compiler-rt/branches/release_39@279477
Modified:
vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc
Modified: vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc
==============================================================================
--- vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc Wed Aug 24 17:36:39 2016 (r304762)
+++ vendor/compiler-rt/dist/lib/msan/tests/msan_test.cc Wed Aug 24 17:37:06 2016 (r304763)
@@ -2825,6 +2825,12 @@ TEST(MemorySanitizer, LongStruct) {
EXPECT_POISONED(s2.a8);
}
+#ifdef __GLIBC__
+#define MSAN_TEST_PRLIMIT __GLIBC_PREREQ(2, 13)
+#else
+#define MSAN_TEST_PRLIMIT 1
+#endif
+
TEST(MemorySanitizer, getrlimit) {
struct rlimit limit;
__msan_poison(&limit, sizeof(limit));
@@ -2833,6 +2839,7 @@ TEST(MemorySanitizer, getrlimit) {
EXPECT_NOT_POISONED(limit.rlim_cur);
EXPECT_NOT_POISONED(limit.rlim_max);
+#if MSAN_TEST_PRLIMIT
struct rlimit limit2;
__msan_poison(&limit2, sizeof(limit2));
result = prlimit(getpid(), RLIMIT_DATA, &limit, &limit2);
@@ -2848,6 +2855,7 @@ TEST(MemorySanitizer, getrlimit) {
result = prlimit(getpid(), RLIMIT_DATA, &limit, nullptr);
ASSERT_EQ(result, 0);
+#endif
}
TEST(MemorySanitizer, getrusage) {
More information about the svn-src-all
mailing list