Vendor import of compiler-rt release_39 branch r279477:
https://llvm.org/svn/llvm-project/compiler-rt/branches/release_39@279477
This commit is contained in:
parent
b5f99338f6
commit
b58b5b4a2e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
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
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user