[llvm-dev] Modifying Address Sanitizer

Mehdi Amini via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 9 22:21:59 PST 2017


> On Mar 9, 2017, at 10:19 PM, Aayushi Agrawal <aayushigrwl1 at gmail.com> wrote:
> 
> Thank you for the response.
> 
> Suppose I want to make changes in the LLVM part of Address Sanitizer. 
> Is there still a way to test the changes made to address sanitizer as a standalone.

I don’t know what you mean by "address sanitizer as a standalone”. If you change LLVM you need to rebuild it (or clang).

> Also can a pass be run after Address Sanitizer Pass is ran, where I can access the variables created by address sanitizer [LLVM Code] so that I avoid making changes directly to the address sanitizer?

Yes, but it may not be doable (or straightforward) to perform your logic separately as a post-pass, and you’ll still to build some infrastructure to be able to inject your pass at this point. I’m not sure what gain is expected from this, I’m missing the goal?

— 
Mehdi



> 
> 
> On Fri, Mar 10, 2017 at 12:55 AM, Mehdi Amini <mehdi.amini at apple.com <mailto:mehdi.amini at apple.com>> wrote:
> 
> > On Mar 9, 2017, at 9:25 PM, Aayushi Agrawal via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
> >
> > Hello
> >
> > I am willing to make changes in Address Sanitizer for experimentation. But as I am a naive user I am confused with the fact that if I make changes to Address Sanitizer do I have to rebuild the whole LLVM.
> >
> > Could somebody please help me figure out a way in which I can make changes to address sanitizer and do not have to compile the whole LLVM.
> 
> It depends what kind of changes your doing and what kind of test you need to perform I guess.
> AFAIK, ASAN is split between a transformation in LLVM and a runtime in compiler-rt.
> Ultimately I expect that if you already have a build, and you need to rebuild the runtime or clang after changing something in the code, the incremental build should be “fast” (few seconds to a few tens of seconds).
> 
>> Mehdi
> 
> 
> 
> 
> -- 
> Aayushi Agrawal
> B.Tech(Final Year)
> Computer Science Engineering Undergraduate
> LNMIIT,JAIPUR
> Contact - 09649357639

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170309/3c00de96/attachment.html>


More information about the llvm-dev mailing list