Skip to content
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

TSAN doesn't support real-time signals on FreeBSD #92313

Open
tavianator opened this issue May 15, 2024 · 0 comments
Open

TSAN doesn't support real-time signals on FreeBSD #92313

tavianator opened this issue May 15, 2024 · 0 comments

Comments

@tavianator
Copy link
Contributor

tavianator@muon $ cat foo.c
#include <signal.h>
#include <stdio.h>

int main(void) {
        if (signal(SIGRTMIN, SIG_DFL) == SIG_ERR) {
                perror("signal()");
        }
        return 0;
}
tavianator@muon $ clang18 foo.c -o foo
tavianator@muon $ ./foo
tavianator@muon $ clang18 -fsanitize=thread foo.c -o foo
tavianator@muon $ ./foo
signal(): Invalid argument
tavianator@muon $ clang18 --version
clang version 18.1.3
Target: x86_64-portbld-freebsd14.0
Thread model: posix
InstalledDir: /usr/local/llvm18/bin
tavianator@muon $ uname -a
FreeBSD muon 14.0-RELEASE-p5 FreeBSD 14.0-RELEASE-p5 #0: Tue Feb 13 23:37:36 UTC 2024     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64

I think kSigCount is wrong here:

tavianator added a commit to tavianator/bfs that referenced this issue May 15, 2024
tavianator added a commit to tavianator/bfs that referenced this issue May 16, 2024
tavianator added a commit to tavianator/bfs that referenced this issue May 16, 2024
tavianator added a commit to tavianator/bfs that referenced this issue May 16, 2024
ThreadSanitizer has some FreeBSD-specific bugs that are too difficult to
work around.  In particular, deadlock is possible if any signal with a
user-defined handler interrupts an atomic operation.

Link: llvm/llvm-project#92313
Link: llvm/llvm-project#92437
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants