[compiler-rt] 6bc6e1a - [tsan][test] Switch setitimer(ITIMER_REAL, ...) to setitimer(ITIMER_VIRTUAL, ...)

via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 19 03:15:02 PDT 2024


Author: serge-sans-paille
Date: 2024-03-19T11:14:49+01:00
New Revision: 6bc6e1ace9fa8453e164fa04b5d9acd5a77e089a

URL: https://github.com/llvm/llvm-project/commit/6bc6e1ace9fa8453e164fa04b5d9acd5a77e089a
DIFF: https://github.com/llvm/llvm-project/commit/6bc6e1ace9fa8453e164fa04b5d9acd5a77e089a.diff

LOG: [tsan][test] Switch setitimer(ITIMER_REAL, ...) to setitimer(ITIMER_VIRTUAL, ...)

Followup to #85188.

Added: 
    

Modified: 
    compiler-rt/test/tsan/signal_thread.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/tsan/signal_thread.cpp b/compiler-rt/test/tsan/signal_thread.cpp
index e5ea44187e329d..7bba8159bf38fc 100644
--- a/compiler-rt/test/tsan/signal_thread.cpp
+++ b/compiler-rt/test/tsan/signal_thread.cpp
@@ -24,7 +24,7 @@ static void* thr(void *p) {
 int main() {
   struct sigaction act = {};
   act.sa_handler = &handler;
-  if (sigaction(SIGALRM, &act, 0)) {
+  if (sigaction(SIGVTALRM, &act, 0)) {
     perror("sigaction");
     exit(1);
   }
@@ -33,7 +33,7 @@ int main() {
   t.it_value.tv_sec = 0;
   t.it_value.tv_usec = 10;
   t.it_interval = t.it_value;
-  if (setitimer(ITIMER_REAL, &t, 0)) {
+  if (setitimer(ITIMER_VIRTUAL, &t, 0)) {
     perror("setitimer");
     exit(1);
   }


        


More information about the llvm-commits mailing list