From: Eric Botcazou Date: Wed, 13 Mar 2019 09:15:02 +0000 (+0000) Subject: re PR sanitizer/80953 (Support libsanitizer on Solaris) X-Git-Tag: basepoints/gcc-10~649 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a196c82cf236299e00704f3fc23eba798bdc6e37;p=thirdparty%2Fgcc.git re PR sanitizer/80953 (Support libsanitizer on Solaris) PR sanitizer/80953 Merge from LLVM revision 355979 * asan/asan_globals.c (GetGlobalsForAddress): Use internal_memcpy to copy Global objects for SPARC with GCC. From-SVN: r269640 --- diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog index 65df77e742f1..4815db0c22c5 100644 --- a/libsanitizer/ChangeLog +++ b/libsanitizer/ChangeLog @@ -1,3 +1,10 @@ +2019-03-13 Eric Botcazou + + PR sanitizer/80953 + Merge from LLVM revision 355979 + * asan/asan_globals.c (GetGlobalsForAddress): Use internal_memcpy to + copy Global objects for SPARC with GCC. + 2019-03-13 Eric Botcazou PR sanitizer/80953 diff --git a/libsanitizer/asan/asan_globals.cc b/libsanitizer/asan/asan_globals.cc index a59a2dc27a47..10f090940fe3 100644 --- a/libsanitizer/asan/asan_globals.cc +++ b/libsanitizer/asan/asan_globals.cc @@ -112,7 +112,11 @@ 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++;