[llvm-commits] [compiler-rt] r169616 - in /compiler-rt/trunk/lib/asan: asan_intercepted_functions.h asan_interceptors.cc

Kostya Serebryany kcc at google.com
Fri Dec 7 09:57:52 PST 2012


Thanks! (and sorry for the breakage)

On Fri, Dec 7, 2012 at 9:54 PM, Alexey Samsonov <samsonov at google.com> wrote:

> Author: samsonov
> Date: Fri Dec  7 11:54:38 2012
> New Revision: 169616
>
> URL: http://llvm.org/viewvc/llvm-project?rev=169616&view=rev
> Log:
> ASan: intercept prctl on Linux only
>
> Modified:
>     compiler-rt/trunk/lib/asan/asan_intercepted_functions.h
>     compiler-rt/trunk/lib/asan/asan_interceptors.cc
>
> Modified: compiler-rt/trunk/lib/asan/asan_intercepted_functions.h
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_intercepted_functions.h?rev=169616&r1=169615&r2=169616&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/asan/asan_intercepted_functions.h (original)
> +++ compiler-rt/trunk/lib/asan/asan_intercepted_functions.h Fri Dec  7
> 11:54:38 2012
> @@ -41,8 +41,10 @@
>
>  #if defined(__linux__)
>  # define ASAN_USE_ALIAS_ATTRIBUTE_FOR_INDEX 1
> +# define ASAN_INTERCEPT_PRCTL 1
>  #else
>  # define ASAN_USE_ALIAS_ATTRIBUTE_FOR_INDEX 0
> +# define ASAN_INTERCEPT_PRCTL 0
>  #endif
>
>  #if !defined(__APPLE__)
>
> 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=169616&r1=169615&r2=169616&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/asan/asan_interceptors.cc (original)
> +++ compiler-rt/trunk/lib/asan/asan_interceptors.cc Fri Dec  7 11:54:38
> 2012
> @@ -177,10 +177,11 @@
>  }
>  #endif
>
> +#if ASAN_INTERCEPT_PRCTL
>  #define PR_SET_NAME 15
> -
> -INTERCEPTOR(int, prctl, int option, unsigned long arg2, unsigned long
> arg3,
> -            unsigned long arg4, unsigned long arg5) {
> +INTERCEPTOR(int, prctl, int option,
> +            unsigned long arg2, unsigned long arg3,  // NOLINT
> +            unsigned long arg4, unsigned long arg5) {  // NOLINT
>    int res = REAL(prctl(option, arg2, arg3, arg4, arg5));
>    if (option == PR_SET_NAME) {
>      AsanThread *t = asanThreadRegistry().GetCurrent();
> @@ -193,6 +194,7 @@
>    }
>    return res;
>  }
> +#endif
>
>  #if ASAN_INTERCEPT___CXA_THROW
>  INTERCEPTOR(void, __cxa_throw, void *a, void *b, void *c) {
> @@ -737,7 +739,9 @@
>  #if ASAN_INTERCEPT_SIGLONGJMP
>    ASAN_INTERCEPT_FUNC(siglongjmp);
>  #endif
> +#if ASAN_INTERCEPT_PRCTL
>    ASAN_INTERCEPT_FUNC(prctl);
> +#endif
>
>    // Intercept exception handling functions.
>  #if ASAN_INTERCEPT___CXA_THROW
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121207/c1e47bf1/attachment.html>


More information about the llvm-commits mailing list