diff options
| author | Kostya Kortchinsky <kostyak@google.com> | 2017-07-31 22:46:01 +0000 |
|---|---|---|
| committer | Kostya Kortchinsky <kostyak@google.com> | 2017-07-31 22:46:01 +0000 |
| commit | 9d52cedb2487ab85d65d9d582fb8519ea9b2cd52 (patch) | |
| tree | 7a3c9159b657fe99e1f038a4abd455968ba41aad /compiler-rt/lib | |
| parent | 086597aee343276757ae392ac43baa30ab910916 (diff) | |
| download | bcm5719-llvm-9d52cedb2487ab85d65d9d582fb8519ea9b2cd52.tar.gz bcm5719-llvm-9d52cedb2487ab85d65d9d582fb8519ea9b2cd52.zip | |
[msan] Reverting D36093
Summary:
Reverting D36093 until I can figure out how to launch the correct tests :/
My apologies.
Reviewers: alekseyshl
Reviewed By: alekseyshl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36120
llvm-svn: 309637
Diffstat (limited to 'compiler-rt/lib')
| -rw-r--r-- | compiler-rt/lib/msan/msan_allocator.cc | 4 | ||||
| -rw-r--r-- | compiler-rt/lib/msan/tests/msan_test.cc | 11 |
2 files changed, 0 insertions, 15 deletions
diff --git a/compiler-rt/lib/msan/msan_allocator.cc b/compiler-rt/lib/msan/msan_allocator.cc index 1b134e15a74..8e9d4d397b9 100644 --- a/compiler-rt/lib/msan/msan_allocator.cc +++ b/compiler-rt/lib/msan/msan_allocator.cc @@ -255,10 +255,6 @@ void *msan_valloc(uptr size, StackTrace *stack) { void *msan_pvalloc(uptr size, StackTrace *stack) { uptr PageSize = GetPageSizeCached(); - if (UNLIKELY(CheckForPvallocOverflow(size, PageSize))) { - errno = errno_ENOMEM; - return Allocator::FailureHandler::OnBadRequest(); - } // pvalloc(0) should allocate one page. size = size ? RoundUpTo(size, PageSize) : PageSize; return SetErrnoOnNull(MsanAllocate(stack, size, PageSize, false)); diff --git a/compiler-rt/lib/msan/tests/msan_test.cc b/compiler-rt/lib/msan/tests/msan_test.cc index b4cc8493ab3..b2d5f7c605e 100644 --- a/compiler-rt/lib/msan/tests/msan_test.cc +++ b/compiler-rt/lib/msan/tests/msan_test.cc @@ -3449,17 +3449,6 @@ TEST(MemorySanitizer, pvalloc) { EXPECT_EQ(0U, (uintptr_t)p % PageSize); EXPECT_EQ(PageSize, __sanitizer_get_allocated_size(p)); free(p); - - // Overflows in pvalloc should be caught. - errno = 0; - p = pvalloc((uintptr_t)-PageSize); - EXPECT_EQ(p, nullptr); - EXPECT_EQ(errno, ENOMEM); - - errno = 0; - p = pvalloc((uintptr_t)-1); - EXPECT_EQ(p, nullptr); - EXPECT_EQ(errno, ENOMEM); } #endif |

