Skip to content

Commit 2e28165

Browse files
Fix very long delays during core dump (#1)
It seems that commit llvm/llvm-project@c2a5703 from upstream LLVM was cherry-picked slightly incorrectly. MADV_DONTNEED should have been used when _not_ executing a dry run.
1 parent 97d73cc commit 2e28165

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/msan/msan_linux.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static bool InitShadow(bool init_origins, bool dry_run) {
155155
if (!dry_run &&
156156
!MmapFixedSuperNoReserve(start, size, kMemoryLayout[i].name))
157157
return false;
158-
if (dry_run && common_flags()->use_madv_dontdump)
158+
if (!dry_run && common_flags()->use_madv_dontdump)
159159
DontDumpShadowMemory(start, size);
160160
}
161161
if (protect) {

0 commit comments

Comments
 (0)