forked from OSchip/llvm-project
tsan: fix windows build
It's only asan that installs vectored SEH handler to map memory lazily. llvm-svn: 276112
This commit is contained in:
parent
056237a457
commit
080dcf7aa8
|
@ -173,10 +173,10 @@ void *MmapFixedNoReserve(uptr fixed_addr, uptr size, const char *name) {
|
|||
// FIXME: is this really "NoReserve"? On Win32 this does not matter much,
|
||||
// but on Win64 it does.
|
||||
(void)name; // unsupported
|
||||
#if SANITIZER_WINDOWS64
|
||||
// On Windows64, use MEM_COMMIT would result in error
|
||||
#if !SANITIZER_GO && SANITIZER_WINDOWS64
|
||||
// On asan/Windows64, use MEM_COMMIT would result in error
|
||||
// 1455:ERROR_COMMITMENT_LIMIT.
|
||||
// We use exception handler to commit page on demand.
|
||||
// Asan uses exception handler to commit page on demand.
|
||||
void *p = VirtualAlloc((LPVOID)fixed_addr, size, MEM_RESERVE, PAGE_READWRITE);
|
||||
#else
|
||||
void *p = VirtualAlloc((LPVOID)fixed_addr, size, MEM_RESERVE | MEM_COMMIT,
|
||||
|
|
Loading…
Reference in New Issue