diff options
author | Vitaly Buka <vitalybuka@google.com> | 2017-11-10 04:27:47 +0000 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2017-11-10 04:27:47 +0000 |
commit | 8d93d94612443a03d2e211d944e3097f66ba75d5 (patch) | |
tree | 1d79280237204e8d0fce63276d127fd8f33a1046 /lib/sanitizer_common/sanitizer_platform_limits_posix.h | |
parent | 0ed4f7262b862aec163f074a60d7710fc99d2d38 (diff) |
[tsan] Use __sanitizer_siginfo from sanitizer_common
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_platform_limits_posix.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_platform_limits_posix.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/lib/sanitizer_common/sanitizer_platform_limits_posix.h index 45b9d8e24..9fa5b51ec 100644 --- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h +++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h @@ -594,12 +594,17 @@ namespace __sanitizer { }; #endif + struct __sanitizer_siginfo { + // The size is determined by looking at sizeof of real siginfo_t on linux. + u64 opaque[128 / sizeof(u64)]; + }; + // Linux system headers define the 'sa_handler' and 'sa_sigaction' macros. #if SANITIZER_ANDROID && (SANITIZER_WORDSIZE == 64) struct __sanitizer_sigaction { unsigned sa_flags; union { - void (*sigaction)(int sig, void *siginfo, void *uctx); + void (*sigaction)(int sig, __sanitizer_siginfo *siginfo, void *uctx); void (*handler)(int sig); }; __sanitizer_sigset_t sa_mask; @@ -609,7 +614,7 @@ namespace __sanitizer { struct __sanitizer_sigaction { unsigned sa_flags; union { - void (*sigaction)(int sig, void *siginfo, void *uctx); + void (*sigaction)(int sig, __sanitizer_siginfo *siginfo, void *uctx); void (*handler)(int sig); }; __sanitizer_sigset_t sa_mask; @@ -617,7 +622,7 @@ namespace __sanitizer { #elif SANITIZER_ANDROID && (SANITIZER_WORDSIZE == 32) struct __sanitizer_sigaction { union { - void (*sigaction)(int sig, void *siginfo, void *uctx); + void (*sigaction)(int sig, __sanitizer_siginfo *siginfo, void *uctx); void (*handler)(int sig); }; __sanitizer_sigset_t sa_mask; @@ -630,7 +635,7 @@ namespace __sanitizer { unsigned int sa_flags; #endif union { - void (*sigaction)(int sig, void *siginfo, void *uctx); + void (*sigaction)(int sig, __sanitizer_siginfo *siginfo, void *uctx); void (*handler)(int sig); }; #if SANITIZER_FREEBSD @@ -690,7 +695,7 @@ namespace __sanitizer { unsigned int sa_flags; union { void (*handler)(int signo); - void (*sigaction)(int signo, void *info, void *ctx); + void (*sigaction)(int signo, __sanitizer_siginfo *info, void *ctx); }; __sanitizer_kernel_sigset_t sa_mask; void (*sa_restorer)(void); @@ -699,7 +704,7 @@ namespace __sanitizer { struct __sanitizer_kernel_sigaction_t { union { void (*handler)(int signo); - void (*sigaction)(int signo, void *info, void *ctx); + void (*sigaction)(int signo, __sanitizer_siginfo *info, void *ctx); }; unsigned long sa_flags; void (*sa_restorer)(void); |