Skip to content

Conversation

@fmayer
Copy link
Contributor

@fmayer fmayer commented Nov 12, 2024

Reverts #110274

Buildbots broke

@fmayer fmayer added the skip-precommit-approval PR for CI feedback, not intended for review label Nov 12, 2024
@fmayer fmayer merged commit f9125dd into main Nov 12, 2024
1 of 2 checks passed
@fmayer fmayer deleted the revert-110274-libfuzzer-patch branch November 12, 2024 03:50
@llvmbot
Copy link
Member

llvmbot commented Nov 12, 2024

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Florian Mayer (fmayer)

Changes

Reverts llvm/llvm-project#110274

Buildbots broke


Full diff: https://github.com/llvm/llvm-project/pull/115811.diff

1 Files Affected:

  • (modified) compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp (+4-9)
diff --git a/compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp b/compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp
index 36a1122c9f7cc8..392c1e5be4eea3 100644
--- a/compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp
@@ -104,19 +104,14 @@ bool ExecuteCommand(const Command &Cmd, std::string *CmdOutput) {
 }
 
 void SetTimer(int Seconds) {
-  timer_t TimerId;
-  struct itimerspec T {
+  struct itimerval T {
     {Seconds, 0}, { Seconds, 0 }
   };
-  SetSigaction(SIGALRM, AlarmHandler);
-  if (timer_create(CLOCK_REALTIME, nullptr, &TimerId) == -1) {
-    Printf("libFuzzer: timer_create failed with %d\n", errno);
-    exit(1);
-  }
-  if (timer_settime(TimerId, 0, &T, nullptr) == -1) {
-    Printf("libFuzzer: timer_settime failed with %d\n", errno);
+  if (setitimer(ITIMER_REAL, &T, nullptr)) {
+    Printf("libFuzzer: setitimer failed with %d\n", errno);
     exit(1);
   }
+  SetSigaction(SIGALRM, AlarmHandler);
 }
 
 void SetSignalHandler(const FuzzingOptions& Options) {

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 12, 2024

LLVM Buildbot has detected a new failure on builder clang-s390x-linux running on systemz-1 while building compiler-rt at step 5 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/42/builds/1861

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'SanitizerCommon-tsan-s390x-Linux :: Linux/getpwnam_r_invalid_user.cpp' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
RUN: at line 2: /home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/./bin/clang  --driver-mode=g++ -gline-tables-only -fsanitize=thread  -funwind-tables  -I/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/compiler-rt/test -ldl -O0 -g /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp -o /home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/tsan-s390x-Linux/Linux/Output/getpwnam_r_invalid_user.cpp.tmp &&  /home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/tsan-s390x-Linux/Linux/Output/getpwnam_r_invalid_user.cpp.tmp
+ /home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/./bin/clang --driver-mode=g++ -gline-tables-only -fsanitize=thread -funwind-tables -I/home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/compiler-rt/test -ldl -O0 -g /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp -o /home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/tsan-s390x-Linux/Linux/Output/getpwnam_r_invalid_user.cpp.tmp
+ /home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/tsan-s390x-Linux/Linux/Output/getpwnam_r_invalid_user.cpp.tmp
getpwnam_r_invalid_user.cpp.tmp: /home/uweigand/sandbox/buildbot/clang-s390x-linux/llvm/compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp:17: int main(): Assertion `res == 0 || res == ENOENT' failed.
/home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/tsan-s390x-Linux/Linux/Output/getpwnam_r_invalid_user.cpp.script: line 1: 3254217 Aborted                 /home/uweigand/sandbox/buildbot/clang-s390x-linux/stage1/runtimes/runtimes-bins/compiler-rt/test/sanitizer_common/tsan-s390x-Linux/Linux/Output/getpwnam_r_invalid_user.cpp.tmp

--

********************


Groverkss pushed a commit to iree-org/llvm-project that referenced this pull request Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants