[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
This commit is contained in:
Reid Kleckner 2019-06-21 16:15:09 +00:00
parent 045b0f60b6
commit c90de6375e
2 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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;