[compiler-rt] r315247 - [ubsan] Fix Asan internal alloc corruption in PR33221 test.
Evgeniy Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 9 15:52:13 PDT 2017
Author: eugenis
Date: Mon Oct 9 15:52:13 2017
New Revision: 315247
URL: http://llvm.org/viewvc/llvm-project?rev=315247&view=rev
Log:
[ubsan] Fix Asan internal alloc corruption in PR33221 test.
MAP_FIXED discards the existing mapping at the given address.
Modified:
compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Linux/PR33221.cpp
Modified: compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Linux/PR33221.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Linux/PR33221.cpp?rev=315247&r1=315246&r2=315247&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Linux/PR33221.cpp (original)
+++ compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/Linux/PR33221.cpp Mon Oct 9 15:52:13 2017
@@ -22,7 +22,7 @@ public:
int main() {
int page_size = getpagesize();
- void *non_accessible = mmap(nullptr, page_size, PROT_NONE,
+ void *non_accessible = mmap(nullptr, page_size * 2, PROT_NONE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if (non_accessible == MAP_FAILED)
More information about the llvm-commits
mailing list