forked from OSchip/llvm-project
[NFC] Move setuid.c test into sanitizer_common
This commit is contained in:
parent
937e40a8cf
commit
33af9a31c0
|
@ -1745,7 +1745,8 @@ void *internal_start_thread(void *(*func)(void *arg), void *arg) {
|
|||
internal_sigfillset(&set);
|
||||
#if SANITIZER_LINUX && !SANITIZER_ANDROID
|
||||
// Glibc uses SIGSETXID signal during setuid call. If this signal is blocked
|
||||
// on any thread, setuid call hangs (see test/tsan/setuid.c).
|
||||
// on any thread, setuid call hangs.
|
||||
// See test/sanitizer_common/TestCases/Linux/setuid.c.
|
||||
internal_sigdelset(&set, 33);
|
||||
#endif
|
||||
internal_sigprocmask(SIG_SETMASK, &set, &old);
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
// RUN: %clang_tsan -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
|
||||
// RUN: %clang -O1 %s -o %t && %run %t 2>&1 | FileCheck %s
|
||||
//
|
||||
// setuid(0) hangs on powerpc64 big endian. When this is fixed remove
|
||||
// the unsupported flag.
|
||||
// https://llvm.org/bugs/show_bug.cgi?id=25799
|
||||
//
|
||||
// UNSUPPORTED: powerpc64-unknown-linux-gnu
|
||||
#include "test.h"
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
// Setuid call used to hang because the background tsan thread did not handle
|
||||
// Setuid call used to hang because the new thread did not handle
|
||||
// SIGSETXID signal. Note that we don't care whether setuid call succeeds
|
||||
// or not.
|
||||
|
Loading…
Reference in New Issue