[ubsan] Fix Asan internal alloc corruption in PR33221 test.

MAP_FIXED discards the existing mapping at the given address.

llvm-svn: 315247
This commit is contained in:
Evgeniy Stepanov 2017-10-09 22:52:13 +00:00
parent eb4adc3daf
commit cb993304ac
1 changed files with 1 additions and 1 deletions

View File

@ -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)