Skip to content

[sanitizer] Print diagnostic if ptrace syscall fails #151406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 4, 2025

Conversation

thurstond
Copy link
Contributor

@thurstond thurstond commented Jul 30, 2025

StopTheWorld() clones a child process (with shared virtual address space and shared TLS) that calls ptrace before releasing a mutex; the parent process yields until the mutex is unlocked. If seccomp kills the child process, the parent process will silently hang. The parent process cannot use waitpid to detect that the child process has been killed, because the processes share errno.

This patch forks the process one-time to test whether ptrace is allowed. If it fails, it prints an informational message (though it does not abort the sanitizer).

Fixes #150380 and google/sanitizers#777

StopTheWorld() spins up a thread that calls ptrace before releasing a
mutex; the other thread yields until the mutex is unlocked. If seccomp
kills the thread that calls ptrace, the other thread will silently hang.
The latter thread cannot use waitpid to detect that the other thread has
been killed, because the threads share errno.

This patch forks the process to test whether ptrace is allowed. If it
fails, it prints an informational message (though it does not abort the
sanitizer).

Fixes llvm#150380 and google/sanitizers#777
@llvmbot
Copy link
Member

llvmbot commented Jul 30, 2025

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

Author: Thurston Dang (thurstond)

Changes

StopTheWorld() spins up a thread that calls ptrace before releasing a mutex; the other thread yields until the mutex is unlocked. If seccomp kills the thread that calls ptrace, the other thread will silently hang. The latter thread cannot use waitpid to detect that the other thread has been killed, because the threads share errno.

This patch forks the process to test whether ptrace is allowed. If it fails, it prints an informational message (though it does not abort the sanitizer).

Fixes #150380 and google/sanitizers#777


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

1 Files Affected:

  • (modified) compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp (+41)
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
index 24929b8c4bd7c..ce21a156d28b6 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
@@ -403,7 +403,48 @@ struct ScopedSetTracerPID {
   }
 };
 
+// This detects whether ptrace is blocked (e.g., by seccomp), by forking and
+// then attempting ptrace.
+// This separate check is necessary because StopTheWorld() creates a *thread*,
+// and therefore cannot use waitpid() due to the shared errno.
+static void TestPTrace() {
+  // Only check the first time this is called.
+  static bool checked = false;
+  if (checked)
+    return;
+  checked = true;
+
+  // fork() should be cheap because of copy-on-write. Besides, this is only
+  // called the first time.
+  int pid = internal_fork();
+
+  if (pid < 0) {
+    int rverrno;
+    if (internal_iserror(pid, &rverrno)) {
+      Report("WARNING: TestPTrace() failed to fork (errno %d)\n", rverrno);
+    }
+    _exit(-1);
+  }
+
+  if (pid == 0) {
+    // Child subprocess
+    internal_ptrace(PTRACE_ATTACH, 0, nullptr, nullptr);
+    _exit (0);
+  } else {
+    int wstatus;
+    internal_waitpid(pid, &wstatus, 0);
+
+    if (WIFSIGNALED(wstatus)) {
+      VReport(0, "Warning: ptrace appears to be blocked (is seccomp enabled?). LeakSanitizer may hang.\n");
+      VReport(0, "Child exited with signal %d.\n", WTERMSIG(wstatus));
+      // We don't abort the sanitizer - it's still worth letting the sanitizer try.
+    }
+  }
+}
+
 void StopTheWorld(StopTheWorldCallback callback, void *argument) {
+  TestPTrace();
+
   StopTheWorldScope in_stoptheworld;
   // Prepare the arguments for TracerThread.
   struct TracerThreadArgument tracer_thread_argument;

Copy link

github-actions bot commented Jul 30, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

// This detects whether ptrace is blocked (e.g., by seccomp), by forking and
// then attempting ptrace.
// This separate check is necessary because StopTheWorld() creates a *thread*,
// and therefore cannot use waitpid() due to the shared errno.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

errno should be thread local on any reasonable platform?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing comment on line 504 states that errno is shared. I think sanitizers run on all manner of unreasonable platforms?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole code is under SANITIZER_LINUX though

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe the real reason is the clone syscall?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe the real reason is the clone syscall?

*maybe the real treasure was the clones we made along the way

@thurstond thurstond requested a review from fmayer August 4, 2025 16:43
return;
checked = true;

// fork() should be cheap because of copy-on-write. Besides, this is only
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't call fork "cheap" exactly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded

// This detects whether ptrace is blocked (e.g., by seccomp), by forking and
// then attempting ptrace.
// This separate check is necessary because StopTheWorld() creates a *thread*,
// and therefore cannot use waitpid() due to the shared errno.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole code is under SANITIZER_LINUX though

@thurstond thurstond requested a review from fmayer August 4, 2025 19:59
// This separate check is necessary because StopTheWorld() creates a *thread*,
// and therefore cannot use waitpid() due to the shared errno.
// This separate check is necessary because StopTheWorld() creates a child
// process with a shared virtual address space, and therefore cannot use
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is true though. Thread locals should be relative to the thread pointer, which should be different. That wasn't a statement on my part, but a question (you can do all sorts of messed up stuff with clone flags)

Copy link
Contributor

@fmayer fmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. please change comment to explain the weird situation where we share both address space and thread pointer, so the TLS is shared.

@thurstond
Copy link
Contributor Author

LGTM. please change comment to explain the weird situation where we share both address space and thread pointer, so the TLS is shared.

Added comment on absence of CLONE_SETTLS

@thurstond thurstond merged commit a708b4b into llvm:main Aug 4, 2025
9 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 4, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-gcc-ubuntu running on sie-linux-worker3 while building compiler-rt at step 5 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
-- Compiler-RT supported architectures: x86_64
-- Generated Sanitizer SUPPORTED_TOOLS list on "Linux" is "asan;lsan;hwasan;msan;tsan;ubsan"
-- sanitizer_common tests on "Linux" will run against "asan;lsan;hwasan;msan;tsan;ubsan"
-- check-shadowcallstack does nothing.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/runtimes/runtimes-bins
27.005 [3/3/227] Linking CXX executable bin/clang-repl
27.064 [2/2/228] Performing build step for 'runtimes'
0.116 [52/3/1] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o
FAILED: compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -DHAVE_RPC_XDR_H=1 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/lib/sanitizer_common/.. -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -O3 -DNDEBUG -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -ftrivial-auto-var-init=pattern -nostdinc++ -Wno-format -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -std=c++17 -MD -MT compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -MF compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o.d -o compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -c /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:429:5: error: use of undeclared identifier '_exit'
  429 |     _exit(-1);
      |     ^~~~~
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:435:5: error: use of undeclared identifier '_exit'
  435 |     _exit(0);
      |     ^~~~~
2 errors generated.
0.118 [52/2/2] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibcNoHooks.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o
FAILED: compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibcNoHooks.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o 
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -DHAVE_RPC_XDR_H=1 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/lib/sanitizer_common/.. -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -O3 -DNDEBUG -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -ftrivial-auto-var-init=pattern -nostdinc++ -Wno-format -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -DSANITIZER_SUPPORTS_WEAK_HOOKS=0 -std=c++17 -MD -MT compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibcNoHooks.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -MF compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibcNoHooks.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o.d -o compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibcNoHooks.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -c /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:429:5: error: use of undeclared identifier '_exit'
  429 |     _exit(-1);
      |     ^~~~~
/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:435:5: error: use of undeclared identifier '_exit'
  435 |     _exit(0);
      |     ^~~~~
2 errors generated.
0.443 [52/1/3] Generating /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/compile_commands.json
ninja: build stopped: subcommand failed.
FAILED: runtimes/runtimes-stamps/runtimes-build /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/runtimes/runtimes-stamps/runtimes-build 
cd /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/runtimes/runtimes-bins && /usr/bin/cmake/bin/cmake --build .
29.461 [2/1/230] Linking CXX executable tools/clang/unittests/AllClangUnitTests
ninja: build stopped: subcommand failed.

thurstond added a commit that referenced this pull request Aug 4, 2025
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 4, 2025

LLVM Buildbot has detected a new failure on builder amdgpu-offload-rhel-8-cmake-build-only running on rocm-docker-rhel-8 while building compiler-rt at step 4 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/amdgpu-offload-cmake.py --jobs=32' (failure)
...
[8/117] Building LLVM bitcode Kernel.cpp-amdgpu.o
[9/117] Building LLVM bitcode Configuration.cpp-amdgpu.o
[10/117] Building include/OffloadInfo.inc...
[11/117] Building include/OffloadErrcodes.inc...
[12/97] Building generated/OffloadAPI.h.gen...
[13/97] Building generated/OffloadFuncs.inc.gen...
[14/96] Building generated/OffloadEntryPoints.inc.gen...
[15/96] Building generated/OffloadPrint.hpp.gen...
[16/96] Building generated/OffloadImplFuncDecls.inc.gen...
[17/96] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o
FAILED: compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o 
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -DHAVE_RPC_XDR_H=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/compiler-rt/lib/sanitizer_common/.. -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -ftrivial-auto-var-init=pattern -nostdinc++ -Wno-format -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -MD -MT compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -MF compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o.d -o compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -c /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:429:5: error: use of undeclared identifier '_exit'
  429 |     _exit(-1);
      |     ^~~~~
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:435:5: error: use of undeclared identifier '_exit'
  435 |     _exit(0);
      |     ^~~~~
2 errors generated.
[18/96] Building LLVM bitcode Reduction.cpp-amdgpu.o
[19/96] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibcNoHooks.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o
FAILED: compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibcNoHooks.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o 
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -DHAVE_RPC_XDR_H=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/compiler-rt/lib/sanitizer_common/.. -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -ftrivial-auto-var-init=pattern -nostdinc++ -Wno-format -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -DSANITIZER_SUPPORTS_WEAK_HOOKS=0 -MD -MT compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibcNoHooks.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -MF compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibcNoHooks.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o.d -o compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibcNoHooks.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -c /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:429:5: error: use of undeclared identifier '_exit'
  429 |     _exit(-1);
      |     ^~~~~
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:435:5: error: use of undeclared identifier '_exit'
  435 |     _exit(0);
      |     ^~~~~
2 errors generated.
[20/96] Building LLVM bitcode Mapping.cpp-amdgpu.o
[21/96] Building LLVM bitcode Synchronization.cpp-amdgpu.o
[22/96] Generating OffloadImplFuncDecls.inc
[23/96] Generating OffloadPrint.hpp
[24/96] Generating OffloadAPI.h
[25/91] Building LLVM bitcode Misc.cpp-amdgpu.o
[26/91] Generating OffloadEntryPoints.inc
[27/90] Building LLVM bitcode State.cpp-amdgpu.o
[28/90] Linking CXX shared library /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib/libomptarget.so.22.0git
[29/90] Generating /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/compile_commands.json
[30/90] Building LLVM bitcode Workshare.cpp-amdgpu.o
[31/90] Building LLVM bitcode Parallelism.cpp-amdgpu.o
ninja: build stopped: subcommand failed.
FAILED: runtimes/runtimes-stamps/runtimes-build /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/runtimes/runtimes-stamps/runtimes-build 
cd /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/runtimes/runtimes-bins && /usr/bin/cmake --build .
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):
Step 7 (build cmake config) failure: build cmake config (failure)
...
[8/117] Building LLVM bitcode Kernel.cpp-amdgpu.o
[9/117] Building LLVM bitcode Configuration.cpp-amdgpu.o
[10/117] Building include/OffloadInfo.inc...
[11/117] Building include/OffloadErrcodes.inc...
[12/97] Building generated/OffloadAPI.h.gen...
[13/97] Building generated/OffloadFuncs.inc.gen...
[14/96] Building generated/OffloadEntryPoints.inc.gen...
[15/96] Building generated/OffloadPrint.hpp.gen...
[16/96] Building generated/OffloadImplFuncDecls.inc.gen...
[17/96] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o
FAILED: compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o 
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -DHAVE_RPC_XDR_H=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/compiler-rt/lib/sanitizer_common/.. -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -ftrivial-auto-var-init=pattern -nostdinc++ -Wno-format -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -MD -MT compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -MF compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o.d -o compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -c /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:429:5: error: use of undeclared identifier '_exit'
  429 |     _exit(-1);
      |     ^~~~~
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:435:5: error: use of undeclared identifier '_exit'
  435 |     _exit(0);
      |     ^~~~~
2 errors generated.
[18/96] Building LLVM bitcode Reduction.cpp-amdgpu.o
[19/96] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibcNoHooks.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o
FAILED: compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibcNoHooks.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o 
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -DHAVE_RPC_XDR_H=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/compiler-rt/lib/sanitizer_common/.. -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -ftrivial-auto-var-init=pattern -nostdinc++ -Wno-format -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -DSANITIZER_SUPPORTS_WEAK_HOOKS=0 -MD -MT compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibcNoHooks.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -MF compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibcNoHooks.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o.d -o compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibcNoHooks.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -c /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:429:5: error: use of undeclared identifier '_exit'
  429 |     _exit(-1);
      |     ^~~~~
/home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:435:5: error: use of undeclared identifier '_exit'
  435 |     _exit(0);
      |     ^~~~~
2 errors generated.
[20/96] Building LLVM bitcode Mapping.cpp-amdgpu.o
[21/96] Building LLVM bitcode Synchronization.cpp-amdgpu.o
[22/96] Generating OffloadImplFuncDecls.inc
[23/96] Generating OffloadPrint.hpp
[24/96] Generating OffloadAPI.h
[25/91] Building LLVM bitcode Misc.cpp-amdgpu.o
[26/91] Generating OffloadEntryPoints.inc
[27/90] Building LLVM bitcode State.cpp-amdgpu.o
[28/90] Linking CXX shared library /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/lib/libomptarget.so.22.0git
[29/90] Generating /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/compile_commands.json
[30/90] Building LLVM bitcode Workshare.cpp-amdgpu.o
[31/90] Building LLVM bitcode Parallelism.cpp-amdgpu.o
ninja: build stopped: subcommand failed.
FAILED: runtimes/runtimes-stamps/runtimes-build /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/runtimes/runtimes-stamps/runtimes-build 
cd /home/botworker/bbot/amdgpu-offload-rhel-8-cmake-build-only/build/runtimes/runtimes-bins && /usr/bin/cmake --build .
ninja: build stopped: subcommand failed.
['ninja'] exited with return code 1.
The build step threw an exception...
Traceback (most recent call last):

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 4, 2025

LLVM Buildbot has detected a new failure on builder openmp-offload-sles-build-only running on rocm-worker-hw-04-sles while building compiler-rt at step 5 "compile-openmp".

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

Here is the relevant piece of the build log for the reference
Step 5 (compile-openmp) failure: build (failure)
...
0.197 [861/34/102] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_common.cpp.o
0.202 [860/34/103] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.x86_64.dir/sanitizer_errno.cpp.o
0.204 [859/34/104] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_thread_arg_retval.cpp.o
0.210 [858/34/105] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_tls_get_addr.cpp.o
0.210 [857/34/106] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_platform_limits_posix.cpp.o
0.212 [856/34/107] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.x86_64.dir/sanitizer_fuchsia.cpp.o
0.215 [855/34/108] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_range.cpp.o
0.216 [854/34/109] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.x86_64.dir/sanitizer_haiku.cpp.o
0.220 [853/34/110] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_procmaps_common.cpp.o
0.223 [852/34/111] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o
FAILED: compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o 
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/./bin/clang++ --target=x86_64-unknown-linux-gnu -DHAVE_RPC_XDR_H=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/compiler-rt/lib/sanitizer_common/.. -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -O3 -DNDEBUG -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -ftrivial-auto-var-init=pattern -nostdinc++ -Wno-format -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -std=c++17 -MD -MT compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -MF compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o.d -o compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -c /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:429:5: error: use of undeclared identifier '_exit'
  429 |     _exit(-1);
      |     ^~~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:435:5: error: use of undeclared identifier '_exit'
  435 |     _exit(0);
      |     ^~~~~
2 errors generated.
0.223 [852/33/112] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.x86_64.dir/sanitizer_linux_s390.cpp.o
0.227 [852/32/113] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.x86_64.dir/sanitizer_mac.cpp.o
0.232 [852/31/114] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.x86_64.dir/sanitizer_netbsd.cpp.o
0.234 [852/30/115] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.x86_64.dir/sanitizer_platform_limits_freebsd.cpp.o
0.240 [852/29/116] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.x86_64.dir/sanitizer_deadlock_detector2.cpp.o
0.240 [852/28/117] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_printf.cpp.o
0.242 [852/27/118] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_posix.cpp.o
0.250 [852/26/119] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_libc.cpp.o
0.255 [852/25/120] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_common_libcdep.cpp.o
0.259 [852/24/121] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.x86_64.dir/sanitizer_mutex.cpp.o
0.270 [852/23/122] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_suppressions.cpp.o
0.273 [852/22/123] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_allocator.cpp.o
0.275 [852/21/124] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_deadlock_detector1.cpp.o
0.278 [852/20/125] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_linux.cpp.o
0.282 [852/19/126] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.x86_64.dir/sanitizer_file.cpp.o
0.284 [852/18/127] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.x86_64.dir/sanitizer_flag_parser.cpp.o
0.288 [852/17/128] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_libc.cpp.o
0.293 [852/16/129] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_allocator.cpp.o
0.300 [852/15/130] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.x86_64.dir/sanitizer_flags.cpp.o
0.300 [852/14/131] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_posix_libcdep.cpp.o
0.305 [852/13/132] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonCoverage.x86_64.dir/sanitizer_coverage_libcdep_new.cpp.o
0.305 [852/12/133] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_deadlock_detector1.cpp.o
0.313 [852/11/134] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_thread_arg_retval.cpp.o
0.320 [852/10/135] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.x86_64.dir/sanitizer_libignore.cpp.o
0.321 [852/9/136] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_linux.cpp.o
0.322 [852/8/137] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.x86_64.dir/sanitizer_common.cpp.o
0.337 [852/7/138] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_thread_registry.cpp.o
0.350 [852/6/139] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_linux_libcdep.cpp.o
0.425 [852/5/140] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.x86_64.dir/sanitizer_allocator.cpp.o
0.441 [852/4/141] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.x86_64.dir/sanitizer_libc.cpp.o

thurstond added a commit to thurstond/llvm-project that referenced this pull request Aug 5, 2025
Fixes corner case of llvm#151406

internal_fork() on SPARC actually calls __fork(). We can't safely fork,
because it's possible seccomp has been configured to disallow fork() but
allow clone().

Also adds some comments/TODOs.
thurstond added a commit to thurstond/llvm-project that referenced this pull request Aug 5, 2025
Fixes corner case of llvm#151406

internal_fork() on SPARC actually calls __fork(). We can't safely fork,
because it's possible seccomp has been configured to disallow fork() but
allow clone().

Also adds some comments/TODOs.
thurstond added a commit to thurstond/llvm-project that referenced this pull request Aug 5, 2025
Fixes corner case of llvm#151406

internal_fork() on SPARC actually calls __fork(). We can't safely fork,
because it's possible seccomp has been configured to disallow fork() but
allow clone().

Also adds some comments/TODOs.
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 5, 2025

LLVM Buildbot has detected a new failure on builder clang-x86_64-debian-fast running on gribozavr4 while building compiler-rt at step 5 "build-unified-tree".

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

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
0.243 [255/98/142] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.i386.dir/sanitizer_symbolizer_report_fuchsia.cpp.o
0.243 [254/98/143] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_file.cpp.o
0.244 [253/98/144] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_procmaps_common.cpp.o
0.244 [252/98/145] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.i386.dir/sanitizer_file.cpp.o
0.246 [251/98/146] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_tls_get_addr.cpp.o
0.253 [250/98/147] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.i386.dir/sanitizer_symbolizer_markup_fuchsia.cpp.o
0.254 [249/98/148] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.i386.dir/sanitizer_symbolizer_win.cpp.o
0.255 [248/98/149] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.i386.dir/sanitizer_unwind_win.cpp.o
0.262 [247/98/150] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.i386.dir/sanitizer_unwind_fuchsia.cpp.o
0.269 [246/98/151] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.i386.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o
FAILED: compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.i386.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o 
/b/1/clang-x86_64-debian-fast/llvm.obj/./bin/clang++ --target=x86_64-unknown-linux-gnu -DHAVE_RPC_XDR_H=1 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/1/clang-x86_64-debian-fast/llvm.src/compiler-rt/lib/sanitizer_common/.. -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -O3 -DNDEBUG -m32 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -ftrivial-auto-var-init=pattern -nostdinc++ -Wno-format -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -std=c++17 -MD -MT compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.i386.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -MF compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.i386.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o.d -o compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.i386.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -c /b/1/clang-x86_64-debian-fast/llvm.src/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
/b/1/clang-x86_64-debian-fast/llvm.src/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:429:5: error: use of undeclared identifier '_exit'
  429 |     _exit(-1);
      |     ^~~~~
/b/1/clang-x86_64-debian-fast/llvm.src/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:435:5: error: use of undeclared identifier '_exit'
  435 |     _exit(0);
      |     ^~~~~
2 errors generated.
0.269 [246/97/152] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_stacktrace_sparc.cpp.o
0.269 [246/96/153] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.i386.dir/sanitizer_libignore.cpp.o
0.270 [246/95/154] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonCoverage.i386.dir/sancov_flags.cpp.o
0.271 [246/94/155] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.i386.dir/sanitizer_procmaps_common.cpp.o
0.273 [246/93/156] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_printf.cpp.o
0.275 [246/92/157] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_file.cpp.o
0.276 [246/91/158] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_platform_limits_posix.cpp.o
0.279 [246/90/159] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_range.cpp.o
0.281 [246/89/160] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_symbolizer_markup_fuchsia.cpp.o
0.285 [246/88/161] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_flags.cpp.o
0.288 [246/87/162] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_flags.cpp.o
0.288 [246/86/163] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.i386.dir/sanitizer_flags.cpp.o
0.289 [246/85/164] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonCoverage.x86_64.dir/sancov_flags.cpp.o
0.292 [246/84/165] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o
FAILED: compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o 
/b/1/clang-x86_64-debian-fast/llvm.obj/./bin/clang++ --target=x86_64-unknown-linux-gnu -DHAVE_RPC_XDR_H=1 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/1/clang-x86_64-debian-fast/llvm.src/compiler-rt/lib/sanitizer_common/.. -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -O3 -DNDEBUG -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -ftrivial-auto-var-init=pattern -nostdinc++ -Wno-format -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -std=c++17 -MD -MT compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -MF compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o.d -o compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_stoptheworld_linux_libcdep.cpp.o -c /b/1/clang-x86_64-debian-fast/llvm.src/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
/b/1/clang-x86_64-debian-fast/llvm.src/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:429:5: error: use of undeclared identifier '_exit'
  429 |     _exit(-1);
      |     ^~~~~
/b/1/clang-x86_64-debian-fast/llvm.src/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp:435:5: error: use of undeclared identifier '_exit'
  435 |     _exit(0);
      |     ^~~~~
2 errors generated.
0.292 [246/83/166] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_libignore.cpp.o
0.296 [246/82/167] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_symbolizer_mac.cpp.o
0.304 [246/81/168] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_flags.cpp.o
0.306 [246/80/169] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoTermination.x86_64.dir/sanitizer_procmaps_common.cpp.o
0.310 [246/79/170] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.x86_64.dir/sanitizer_common.cpp.o
0.312 [246/78/171] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_suppressions.cpp.o
0.314 [246/77/172] Building CXX object compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.i386.dir/sanitizer_stacktrace.cpp.o

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.

Hang in __sanitizer::StopTheWorld when ptrace system call is disallowed
4 participants