[compiler-rt] r364070 - [asan] Avoid two compiler-synthesized calls to memset & memcpy
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 21 09:15:09 PDT 2019
Author: rnk
Date: Fri Jun 21 09:15:09 2019
New Revision: 364070
URL: http://llvm.org/viewvc/llvm-project?rev=364070&view=rev
Log:
[asan] Avoid two compiler-synthesized calls to memset & memcpy
Otherwise the tests hang on Windows attempting to report nested errors.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D63627
Modified:
compiler-rt/trunk/lib/asan/asan_globals.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_win.cc
Modified: compiler-rt/trunk/lib/asan/asan_globals.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_globals.cc?rev=364070&r1=364069&r2=364070&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_globals.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_globals.cc Fri Jun 21 09:15:09 2019
@@ -115,15 +115,12 @@ int GetGlobalsForAddress(uptr addr, Glob
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;
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_win.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_win.cc?rev=364070&r1=364069&r2=364070&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_win.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_symbolizer_win.cc Fri Jun 21 09:15:09 2019
@@ -35,6 +35,9 @@ namespace {
class WinSymbolizerTool : public SymbolizerTool {
public:
+ // The constructor is provided to avoid synthesized memsets.
+ WinSymbolizerTool() {}
+
bool SymbolizePC(uptr addr, SymbolizedStack *stack) override;
bool SymbolizeData(uptr addr, DataInfo *info) override {
return false;
More information about the llvm-commits
mailing list