[compiler-rt] r208066 - [sanitizer] fix build with glibc 2.4, patch by Sandra Loosemore

Alexey Samsonov samsonov at google.com
Thu May 8 15:18:33 PDT 2014


This is incorrect. PTRACE_GETSIGINFO is defined as:

  /* Get siginfo for process.  */
  PTRACE_GETSIGINFO = 0x4202,
#define PT_GETSIGINFO PTRACE_GETSIGINFO

So, we should also use PT_GETSIGINFO macro for that. I've submitted a fix
in r208363.



On Tue, May 6, 2014 at 12:36 AM, Kostya Serebryany <kcc at google.com> wrote:

> Author: kcc
> Date: Tue May  6 02:36:51 2014
> New Revision: 208066
>
> URL: http://llvm.org/viewvc/llvm-project?rev=208066&view=rev
> Log:
> [sanitizer] fix build with glibc 2.4, patch by Sandra Loosemore
>
> Modified:
>
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
>
> Modified:
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc?rev=208066&r1=208065&r2=208066&view=diff
>
> ==============================================================================
> ---
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
> (original)
> +++
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
> Tue May  6 02:36:51 2014
> @@ -288,15 +288,20 @@ namespace __sanitizer {
>    int ptrace_setfpregs = PTRACE_SETFPREGS;
>    int ptrace_getfpxregs = PTRACE_GETFPXREGS;
>    int ptrace_setfpxregs = PTRACE_SETFPXREGS;
> +#if defined(PTRACE_GETSIGINFO) && defined(PTRACE_SETSIGINFO)
>    int ptrace_getsiginfo = PTRACE_GETSIGINFO;
>    int ptrace_setsiginfo = PTRACE_SETSIGINFO;
> +#else
> +  int ptrace_getsiginfo = -1;
> +  int ptrace_setsiginfo = -1;
> +#endif  // PTRACE_GETSIGINFO/PTRACE_SETSIGINFO
>  #if defined(PTRACE_GETREGSET) && defined(PTRACE_SETREGSET)
>    int ptrace_getregset = PTRACE_GETREGSET;
>    int ptrace_setregset = PTRACE_SETREGSET;
>  #else
>    int ptrace_getregset = -1;
>    int ptrace_setregset = -1;
> -#endif
> +#endif  // PTRACE_GETREGSET/PTRACE_SETREGSET
>  #endif
>
>    unsigned path_max = PATH_MAX;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



-- 
Alexey Samsonov, Mountain View, CA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140508/7eca701f/attachment.html>


More information about the llvm-commits mailing list