Skip to content

Commit fdaf6e1

Browse files
author
git apple-llvm automerger
committed
Merge commit 'e0aeebe6803a' from apple/main into swift/next
2 parents e567ecb + e0aeebe commit fdaf6e1

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

compiler-rt/lib/dfsan/dfsan.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,10 @@ static void dfsan_init(int argc, char **argv, char **envp) {
475475

476476
::InitializePlatformEarly();
477477

478-
if (!MmapFixedNoReserve(ShadowAddr(), UnusedAddr() - ShadowAddr()))
478+
if (!MmapFixedSuperNoReserve(ShadowAddr(), UnusedAddr() - ShadowAddr()))
479479
Die();
480+
if (common_flags()->use_madv_dontdump)
481+
DontDumpShadowMemory(ShadowAddr(), UnusedAddr() - ShadowAddr());
480482

481483
// Protect the region of memory we don't use, to preserve the one-to-one
482484
// mapping from application to shadow memory. But if ASLR is disabled, Linux

compiler-rt/test/dfsan/release_shadow_space.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %clang_dfsan %s -o %t && %run %t
1+
// DFSAN_OPTIONS=no_huge_pages_for_shadow=false RUN: %clang_dfsan %s -o %t && %run %t
2+
// DFSAN_OPTIONS=no_huge_pages_for_shadow=true RUN: %clang_dfsan %s -o %t && %run %t
23

34
#include <assert.h>
45
#include <sanitizer/dfsan_interface.h>

0 commit comments

Comments
 (0)