This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -fsanitize=thread support on ppc64


On Mon, Jan 23, 2017 at 04:10:01PM +0100, Ulrich Weigand wrote:
> Bill Schmidt wrote:
> > On Jan 23, 2017, at 8:32 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> > >
> > > Another question is, it seems upstream has s390{,x}-*-linux* support for
> > > asan/ubsan, does that work?  In that case we should add it to configure.tgt
> > > too (similarly to the sparc*-*-linux* entry).
> > 
> > CCing Uli for the s390 question.
> 
> Asan support was added just recently to LLVM for s390x-linux.  However,
> I'm not sure it will work out-of-the-box on GCC, since we haven't done any
> back-end work to enable it.  Also, LLVM is 64-bit only, so there probably
> would have to be extra work in the libraries to enable 31-bit mode.

It could be enabled for 64-bit s390 only too (by setting
UNSUPPORTED=1
if test x$ac_cv_sizeof_void_p != x8
).
And indeed, it would require at least something like:
/* Implement the TARGET_ASAN_SHADOW_OFFSET hook.  */

static unsigned HOST_WIDE_INT
s390_asan_shadow_offset (void)
{
  return TARGET_64BIT ? (HOST_WIDE_INT_1 << 52) : HOST_WIDE_INT_C (0x20000000);
}

and

#undef TARGET_ASAN_SHADOW_OFFSET
#define TARGET_ASAN_SHADOW_OFFSET s390_asan_shadow_offset

(the constants are just from quick skimming of
libsanitizer/asan/asan_mapping.h).

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]