diff options
author | Thurston Dang <thurston@google.com> | 2025-08-04 15:39:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-04 15:39:56 -0700 |
commit | a708b4bf21d7c2298224cdacf7d424abc3c8fed4 (patch) | |
tree | 449d8659e1dedb10897882a03aed43a17626702f /llvm/utils/FileCheck/FileCheck.cpp | |
parent | 9f7f3d65483769cba287242120362f8e21407e8d (diff) | |
download | llvm-a708b4bf21d7c2298224cdacf7d424abc3c8fed4.zip llvm-a708b4bf21d7c2298224cdacf7d424abc3c8fed4.tar.gz llvm-a708b4bf21d7c2298224cdacf7d424abc3c8fed4.tar.bz2 |
[sanitizer] Print diagnostic if ptrace syscall fails (#151406)
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 https://github.com/llvm/llvm-project/issues/150380 and
https://github.com/google/sanitizers/issues/777
Diffstat (limited to 'llvm/utils/FileCheck/FileCheck.cpp')
0 files changed, 0 insertions, 0 deletions