summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2019-06-21 16:15:09 +0000
committerReid Kleckner <rnk@google.com>2019-06-21 16:15:09 +0000
commitc90de6375e729642231160cd68902e4782894579 (patch)
tree76ac60aa9fc6358f1f2d54fc5687479d8095ce14 /compiler-rt/lib
parent045b0f60b61c8a104cd288fed7af8518c0089d86 (diff)
downloadbcm5719-llvm-c90de6375e729642231160cd68902e4782894579.tar.gz
bcm5719-llvm-c90de6375e729642231160cd68902e4782894579.zip
[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 llvm-svn: 364070
Diffstat (limited to 'compiler-rt/lib')
-rw-r--r--compiler-rt/lib/asan/asan_globals.cc7
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc3
2 files changed, 5 insertions, 5 deletions
diff --git a/compiler-rt/lib/asan/asan_globals.cc b/compiler-rt/lib/asan/asan_globals.cc
index 8b2fdb214fe..a831fdf9cd9 100644
--- a/compiler-rt/lib/asan/asan_globals.cc
+++ b/compiler-rt/lib/asan/asan_globals.cc
@@ -115,15 +115,12 @@ int GetGlobalsForAddress(uptr addr, Global *globals, u32 *reg_sites,
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
index d75fe9ae166..1badcf5f0a3 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc
@@ -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;
OpenPOWER on IntegriCloud