[PATCH] D58433: AddressSanitizer: fix for SPARC with GCC

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 14:01:31 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT355979: AddressSanitizer: fix for SPARC with GCC (authored by vitalybuka, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D58433?vs=187789&id=190331#toc

Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58433/new/

https://reviews.llvm.org/D58433

Files:
  lib/asan/asan_globals.cc


Index: lib/asan/asan_globals.cc
===================================================================
--- lib/asan/asan_globals.cc
+++ lib/asan/asan_globals.cc
@@ -115,7 +115,11 @@
     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++;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58433.190331.patch
Type: text/x-patch
Size: 520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190312/18e9009c/attachment.bin>


More information about the llvm-commits mailing list