[llvm-commits] [compiler-rt] r147796 - in /compiler-rt/trunk/lib/asan: asan_interceptors.cc asan_stack.cc

Kostya Serebryany kcc at google.com
Tue Jan 10 09:20:44 PST 2012


I've been trying to eliminate most system headers from asan rt (almost
succeeded now).
This simplifies the code and portability.
The prototypes are different from the usual ones exactly because the system
headers are not included anymore.
On Mac and Linux we have different ways to intercepts functions, so what
initially worked on linux did not build on mac and I failed to properly
test it before commit.

--kcc

On Tue, Jan 10, 2012 at 4:50 AM, Alexander Potapenko <glider at google.com>wrote:

> Kostya, can you please elaborate what problem is fixed and why did you
> need this?
> We also wonder why the sigaction prototype is different from that
> declared in sigaction.h
>
> On Mon, Jan 9, 2012 at 11:50 PM, Kostya Serebryany <kcc at google.com> wrote:
> > Author: kcc
> > Date: Mon Jan  9 13:50:06 2012
> > New Revision: 147796
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=147796&view=rev
> > Log:
> > [asan] fix mac build once more
> >
> > Modified:
> >    compiler-rt/trunk/lib/asan/asan_interceptors.cc
> >    compiler-rt/trunk/lib/asan/asan_stack.cc
> >
> > Modified: compiler-rt/trunk/lib/asan/asan_interceptors.cc
> > URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_interceptors.cc?rev=147796&r1=147795&r2=147796&view=diff
> >
> ==============================================================================
> > --- compiler-rt/trunk/lib/asan/asan_interceptors.cc (original)
> > +++ compiler-rt/trunk/lib/asan/asan_interceptors.cc Mon Jan  9 13:50:06
> 2012
> > @@ -225,6 +225,9 @@
> >  }
> >
> >  extern "C"
> > +extern int (sigaction)(int signum, const void *act, void *oldact);
> > +
> > +extern "C"
> >  int WRAP(sigaction)(int signum, const void *act, void *oldact) {
> >   if (!AsanInterceptsSignal(signum)) {
> >     return real_sigaction(signum, act, oldact);
> >
> > Modified: compiler-rt/trunk/lib/asan/asan_stack.cc
> > URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_stack.cc?rev=147796&r1=147795&r2=147796&view=diff
> >
> ==============================================================================
> > --- compiler-rt/trunk/lib/asan/asan_stack.cc (original)
> > +++ compiler-rt/trunk/lib/asan/asan_stack.cc Mon Jan  9 13:50:06 2012
> > @@ -18,8 +18,6 @@
> >  #include "asan_thread.h"
> >  #include "asan_thread_registry.h"
> >
> > -#include <string.h>
> > -
> >  #if ASAN_USE_SYSINFO == 1
> >  #include "sysinfo/sysinfo.h"
> >  #endif
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>
> --
> Alexander Potapenko
> Software Engineer
> Google Moscow
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120110/57be74f2/attachment.html>


More information about the llvm-commits mailing list