forked from OSchip/llvm-project
[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:
parent
eb4adc3daf
commit
cb993304ac
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue