diff --git a/compiler-rt/lib/asan/asan_globals.cc b/compiler-rt/lib/asan/asan_globals.cc --- a/compiler-rt/lib/asan/asan_globals.cc +++ b/compiler-rt/lib/asan/asan_globals.cc @@ -115,15 +115,12 @@ if (flags()->report_globals >= 2) ReportGlobal(g, "Search"); if (IsAddressNearGlobal(addr, g)) { -#if defined(__GNUC__) && defined(__sparc__) internal_memcpy(&globals[res], &g, sizeof(g)); -#else - globals[res] = g; -#endif if (reg_sites) reg_sites[res] = FindRegistrationSite(&g); res++; - if (res == max_globals) break; + if (res == max_globals) + break; } } return res; diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc --- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc @@ -35,6 +35,9 @@ class WinSymbolizerTool : public SymbolizerTool { public: + WinSymbolizerTool(bool avoid_memset) { + (void)avoid_memset; // Avoids a compiler-synthesized call to memset. + } bool SymbolizePC(uptr addr, SymbolizedStack *stack) override; bool SymbolizeData(uptr addr, DataInfo *info) override { return false; @@ -295,7 +298,7 @@ } // Add the dbghelp based symbolizer. - list->push_back(new(*allocator) WinSymbolizerTool()); + list->push_back(new(*allocator) WinSymbolizerTool(/*avoid_memset=*/true)); } Symbolizer *Symbolizer::PlatformInit() {