aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-08-24 17:37:06 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-08-24 17:37:06 +0000
commitb58b5b4a2eef87f528c56a9e91d9bfeba74ac210 (patch)
treef231482b0ae4d5d2e1ba44ed324529b3d1514c12
parentb5f99338f6073aeb6e393caea8ac1148af69bf2c (diff)
downloadsrc-b58b5b4a2eef87f528c56a9e91d9bfeba74ac210.tar.gz
src-b58b5b4a2eef87f528c56a9e91d9bfeba74ac210.zip
Notes
Notes: svn path=/vendor/compiler-rt/dist/; revision=304763 svn path=/vendor/compiler-rt/compiler-rt-release_390-r280324/; revision=305294; tag=vendor/compiler-rt/compiler-rt-release_390-r280324
-rw-r--r--lib/msan/tests/msan_test.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/msan/tests/msan_test.cc b/lib/msan/tests/msan_test.cc
index e4076b5bd24d..9ec1e28374db 100644
--- a/lib/msan/tests/msan_test.cc
+++ b/lib/msan/tests/msan_test.cc
@@ -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) {