[Sanitizers] Do not call internal_sigdelset() on non-Linux
authorViktor Kutuzov <vkutuzov@accesssoftek.com>
Fri, 24 Apr 2015 07:48:26 +0000 (07:48 +0000)
committerViktor Kutuzov <vkutuzov@accesssoftek.com>
Fri, 24 Apr 2015 07:48:26 +0000 (07:48 +0000)
Differential Revision: http://reviews.llvm.org/D9220

llvm-svn: 235701

compiler-rt/lib/sanitizer_common/sanitizer_linux.cc

index 3e34347..c1e5ef3 100644 (file)
@@ -915,9 +915,11 @@ void *internal_start_thread(void(*func)(void *arg), void *arg) {
   // Start the thread with signals blocked, otherwise it can steal user signals.
   __sanitizer_sigset_t set, old;
   internal_sigfillset(&set);
+#if SANITIZER_LINUX
   // Glibc uses SIGSETXID signal during setuid call. If this signal is blocked
   // on any thread, setuid call hangs (see test/tsan/setuid.c).
   internal_sigdelset(&set, 33);
+#endif
   internal_sigprocmask(SIG_SETMASK, &set, &old);
   void *th;
   real_pthread_create(&th, 0, (void*(*)(void *arg))func, arg);