re PR sanitizer/81066 (sanitizer_stoptheworld_linux_libcdep.cc:276:22: error: aggrega...
authorJakub Jelinek <jakub@redhat.com>
Fri, 14 Jul 2017 09:10:45 +0000 (11:10 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 14 Jul 2017 09:10:45 +0000 (11:10 +0200)
PR sanitizer/81066
* sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969.
* sanitizer_common/sanitizer_linux.cc: Likewise.
* sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise.
* tsan/tsan_platform_linux.cc: Likewise.

From-SVN: r250200

libsanitizer/ChangeLog
libsanitizer/sanitizer_common/sanitizer_linux.cc
libsanitizer/sanitizer_common/sanitizer_linux.h
libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
libsanitizer/tsan/tsan_platform_linux.cc

index 106e168007c8948b0f804a038d826ffe167d840a..192318390d354a18c6b2d3fee3e3969af43bb352 100644 (file)
@@ -1,3 +1,11 @@
+2017-07-14  Jakub Jelinek  <jakub@redhat.com>
+
+       PR sanitizer/81066
+       * sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969.
+       * sanitizer_common/sanitizer_linux.cc: Likewise.
+       * sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise.
+       * tsan/tsan_platform_linux.cc: Likewise.
+
 2017-04-06  Martin Liska  <mliska@suse.cz>
 
        PR sanitizer/80166
index 806fcd5e2847945124cfd9f8b422a590d655dd42..5b6f18602e7dc0b0ba21ee7bb64af9415d87bbb5 100644 (file)
@@ -605,8 +605,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
 }
 #endif
 
-uptr internal_sigaltstack(const struct sigaltstack *ss,
-                         struct sigaltstack *oss) {
+uptr internal_sigaltstack(const void *ss, void *oss) {
   return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
 }
 
index 895bfc18195c4f534ec0c83c6d9a4d3001b77d97..a42df576405279edb299485ae8a293444a8937fb 100644 (file)
@@ -19,7 +19,6 @@
 #include "sanitizer_platform_limits_posix.h"
 
 struct link_map;  // Opaque type returned by dlopen().
-struct sigaltstack;
 
 namespace __sanitizer {
 // Dirent structure for getdents(). Note that this structure is different from
@@ -28,8 +27,7 @@ struct linux_dirent;
 
 // Syscall wrappers.
 uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
-uptr internal_sigaltstack(const struct sigaltstack* ss,
-                          struct sigaltstack* oss);
+uptr internal_sigaltstack(const void* ss, void* oss);
 uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
     __sanitizer_sigset_t *oldset);
 
index 891386dc0ba79d4bf5aa9154a2db679c17df73f8..234e8c652c6758ea3ac6d4acad745bf882a378df 100644 (file)
@@ -273,7 +273,7 @@ static int TracerThread(void* argument) {
 
   // Alternate stack for signal handling.
   InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
-  struct sigaltstack handler_stack;
+  stack_t handler_stack;
   internal_memset(&handler_stack, 0, sizeof(handler_stack));
   handler_stack.ss_sp = handler_stack_memory.data();
   handler_stack.ss_size = kHandlerStackSize;
index 2ed5718a12e3c546ab3fe58d51a0392e22173e77..6f972ab0dd649eaacd1847c1df196d2469149a2c 100644 (file)
@@ -287,7 +287,7 @@ void InitializePlatform() {
 int ExtractResolvFDs(void *state, int *fds, int nfd) {
 #if SANITIZER_LINUX && !SANITIZER_ANDROID
   int cnt = 0;
-  __res_state *statp = (__res_state*)state;
+  struct __res_state *statp = (struct __res_state*)state;
   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
     if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
       fds[cnt++] = statp->_u._ext.nssocks[i];