Shadow memory was not marked as non-dumpable after a reset resulting in process taking a very long time to generate a coredump.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D139425
"TSAN_OPTIONS=%s=0\n";
# if !SANITIZER_GO
-static void DontDumpShadow(uptr addr, uptr size) {
+void DontDumpShadow(uptr addr, uptr size) {
if (common_flags()->use_madv_dontdump)
if (!DontDumpShadowMemory(addr, size)) {
Printf(kShadowMemoryMappingWarning, SanitizerToolName, addr, addr + size,
#else
auto resetFailed =
!MmapFixedSuperNoReserve(shadow_begin, shadow_end-shadow_begin, "shadow");
+# if !SANITIZER_GO
+ DontDumpShadow(shadow_begin, shadow_end - shadow_begin);
+# endif
#endif
if (resetFailed) {
Printf("failed to reset shadow memory\n");
void DontNeedShadowFor(uptr addr, uptr size);
void UnmapShadow(ThreadState *thr, uptr addr, uptr size);
void InitializeShadowMemory();
+void DontDumpShadow(uptr addr, uptr size);
void InitializeInterceptors();
void InitializeLibIgnore();
void InitializeDynamicAnnotations();