[LLVMdev] AddressSanitizer flags in LLVM 3.5
Alexander Tarasikov
alexander.tarasikov at gmail.com
Fri Sep 26 04:10:39 PDT 2014
On Sep 26, 2014 5:33 AM, "Kostya Serebryany" <kcc at google.com> wrote:
>
Hi, Kostya. Thanks for replying
>
>
> Oh my... This is not as trivial as it sounds.
> We removed this option because (as we thought) no one was using it and
because it was actually hard to maintain.
> This is a compile-time option, which uses a different ABI, and objects
built with different flags are incompatible.
> GCC variant of asan does not support it either and GCC folks explicitly
said that they are not going to.
Thank for this. Now it makes sense. I did not actually think of it myself.
>
> I don't have a good solution. Others?
> In the meantime I would strongly suggest to try fixing the issue on the
NVIDIA side.
Unfortunately I am not working at NVIDIA so I cannot change that. But at
work we're using Nix package manager from NixOS so patching llvm, clang and
rebuilding all the packages is trivial though a bit time consuming.
>
>
>> It
>> is also interesting that OS X and FreeBSD use larger offset.
>
>
>
> Right. The small offset didn't work there for some reasons...
>
>>
>>
>> Meanwhile, those who are interested in using ASan and NVIDIA, can edit
>> "lib/Transforms/Instrumentation/AddressSanitizer.cpp" and replace
>> "Mapping.Offset = kSmallX86_64ShadowOffset" with "Mapping.Offset =
>> kDefaultShadowOffset64".
>
> you will also need to change the run-time library.
Sorry, do you mean libc or what runtime? I will take a deeper look into
llvm and clang source to make sure I didn't break anything while patching
our local tree. Basically we're now building our project with ASan and the
rest of system is not instrumented, so I think we don't have to worry about
using different offset sizes until we start instrumenting dependencies,
right?
>
> --kcc
>>
>>
>> --
>> Regards, Alexander
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140926/441e600c/attachment.html>
More information about the llvm-dev
mailing list