[LLVMdev] [cfe-dev] Address sanitizer regression test failures for PPC64 targets

Samuel F Antao sfantao at us.ibm.com
Fri Sep 26 08:40:06 PDT 2014


Hi Will,

Do the sanitizer tests work for you with gcc 4.9? I was using clang 3.4.2
and started using clang 3.5.0. For both versions, I configured clang to use
the gcc 4.8.2 tooIchain.

My understanding is that the compiler was not the problem but an endianess
issue in the sanitizer implementation that was causing memory to get
corrupted. The different versions of compiler just caused the memory
corruption to affect different ranges, causing some tests that were not
working to start working and vice-versa.

I identified one of the places with the endianess issue in my previous
email. I'm unsure whether there are other places in the code that only work
for little endian.

Thanks,
Samuel



From:	Will Schmidt <will_schmidt at vnet.ibm.com>
To:	Samuel F Antao/Watson/IBM at IBMUS
Cc:	Alexander Potapenko <glider at google.com>, Clang Developers List
            <cfe-dev at cs.uiuc.edu>, LLVM Dev <llvmdev at cs.uiuc.edu>
Date:	09/26/2014 11:25 AM
Subject:	Re: [LLVMdev] [cfe-dev] Address sanitizer regression test
            failures for PPC64 targets



On Mon, 2014-09-08 at 22:00 -0400, Samuel F Antao wrote:
> Alexey, Alexander,
>
> Thanks for the suggestions. I tried removing the flag SA_NODEFER but
> it didn't do any good... I have been digging into the problem with the
> null_deref test today but I was unable to clearly identify the
> problem. I suspect that it was either a bug with the calling
> convention/unwinding that lead to the flags() pointer to get
> corrupted. It is also possible that it was related with endianess
> issues caused by some bug in the pointer arithmetic inserted by the
> sanitizer code (there are many type and bit casts which makes hard to
> follow the

>  references). I decided to upgrade the compiler I was using to build
> clang which made the problem with this testcase to go away (!).

Hi Samuel,
Which compiler versions were you using before/after ?   At the moment,
I'm building with a gcc 4.9 snapshot, but can switch to something newer
if you had a recommendation.

Thanks,
-Will

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140926/f7a6d823/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140926/f7a6d823/attachment.gif>


More information about the llvm-dev mailing list