[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-10 Thread Chris Apple via cfe-commits
@@ -864,11 +864,18 @@ INTERCEPTOR(void *, pvalloc, size_t size) { #define RTSAN_MAYBE_INTERCEPT_PVALLOC #endif +#if !SANITIZER_FREEBSD +// enabling this interception on freebsd leads to infinite recursion +// on pthread lib initialization cjappl wrote: It loo

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-10 Thread David CARLIER via cfe-commits
@@ -864,11 +864,18 @@ INTERCEPTOR(void *, pvalloc, size_t size) { #define RTSAN_MAYBE_INTERCEPT_PVALLOC #endif +#if !SANITIZER_FREEBSD +// enabling this interception on freebsd leads to infinite recursion +// on pthread lib initialization devnexen wrote: sure

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-10 Thread via cfe-commits
@@ -864,11 +864,18 @@ INTERCEPTOR(void *, pvalloc, size_t size) { #define RTSAN_MAYBE_INTERCEPT_PVALLOC #endif +#if !SANITIZER_FREEBSD +// enabling this interception on freebsd leads to infinite recursion +// on pthread lib initialization davidtrevelyan wrote:

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-10 Thread David CARLIER via cfe-commits
@@ -864,11 +864,18 @@ INTERCEPTOR(void *, pvalloc, size_t size) { #define RTSAN_MAYBE_INTERCEPT_PVALLOC #endif +#if !SANITIZER_FREEBSD +// enabling this interception on freebsd leads to infinite recursion +// on pthread lib initialization devnexen wrote: ![im

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-10 Thread via cfe-commits
@@ -864,11 +864,18 @@ INTERCEPTOR(void *, pvalloc, size_t size) { #define RTSAN_MAYBE_INTERCEPT_PVALLOC #endif +#if !SANITIZER_FREEBSD +// enabling this interception on freebsd leads to infinite recursion +// on pthread lib initialization davidtrevelyan wrote:

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-10 Thread David CARLIER via cfe-commits
@@ -864,11 +864,18 @@ INTERCEPTOR(void *, pvalloc, size_t size) { #define RTSAN_MAYBE_INTERCEPT_PVALLOC #endif +#if !SANITIZER_FREEBSD +// enabling this interception on freebsd leads to infinite recursion +// on pthread lib initialization devnexen wrote: ![im

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-10 Thread David CARLIER via cfe-commits
@@ -864,11 +864,18 @@ INTERCEPTOR(void *, pvalloc, size_t size) { #define RTSAN_MAYBE_INTERCEPT_PVALLOC #endif +#if !SANITIZER_FREEBSD +// enabling this interception on freebsd leads to infinite recursion +// on pthread lib initialization devnexen wrote: oh y

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-10 Thread via cfe-commits
@@ -864,11 +864,18 @@ INTERCEPTOR(void *, pvalloc, size_t size) { #define RTSAN_MAYBE_INTERCEPT_PVALLOC #endif +#if !SANITIZER_FREEBSD +// enabling this interception on freebsd leads to infinite recursion +// on pthread lib initialization davidtrevelyan wrote:

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-09 Thread David CARLIER via cfe-commits
@@ -864,11 +864,18 @@ INTERCEPTOR(void *, pvalloc, size_t size) { #define RTSAN_MAYBE_INTERCEPT_PVALLOC #endif +#if !SANITIZER_FREEBSD +// enabling this interception on freebsd leads to infinite recursion +// on pthread lib initialization devnexen wrote: ![im

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-09 Thread via cfe-commits
@@ -864,11 +864,18 @@ INTERCEPTOR(void *, pvalloc, size_t size) { #define RTSAN_MAYBE_INTERCEPT_PVALLOC #endif +#if !SANITIZER_FREEBSD +// enabling this interception on freebsd leads to infinite recursion +// on pthread lib initialization davidtrevelyan wrote:

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-07 Thread David CARLIER via cfe-commits
@@ -864,11 +864,18 @@ INTERCEPTOR(void *, pvalloc, size_t size) { #define RTSAN_MAYBE_INTERCEPT_PVALLOC #endif +#if !SANITIZER_FREEBSD +// enabling this interception on freebsd leads to infinite recursion +// on pthread lib initialization devnexen wrote: Unfo

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-07 Thread Chris Apple via cfe-commits
@@ -1539,6 +1543,7 @@ TEST_F(KqueueTest, KeventDiesWhenRealtime) { ExpectNonRealtimeSurvival(Func); } +#if SANITIZER_APPLE cjappl wrote: ah, fine to leave then probably. Thanks for pointing that out https://github.com/llvm/llvm-project/pull/125389

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-07 Thread Chris Apple via cfe-commits
@@ -864,11 +864,18 @@ INTERCEPTOR(void *, pvalloc, size_t size) { #define RTSAN_MAYBE_INTERCEPT_PVALLOC #endif +#if !SANITIZER_FREEBSD +// enabling this interception on freebsd leads to infinite recursion +// on pthread lib initialization cjappl wrote: Can yo

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-07 Thread Chris Apple via cfe-commits
https://github.com/cjappl edited https://github.com/llvm/llvm-project/pull/125389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-07 Thread Chris Apple via cfe-commits
@@ -1539,6 +1543,7 @@ TEST_F(KqueueTest, KeventDiesWhenRealtime) { ExpectNonRealtimeSurvival(Func); } +#if SANITIZER_APPLE cjappl wrote: "Kqueue is a scalable event notification interface introduced in FreeBSD 4.1 in July 2000, also supported in NetBSD, Op

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-07 Thread Chris Apple via cfe-commits
https://github.com/cjappl commented: Cool, much better with this version of the init! A few more smaller scale things and this is looking good https://github.com/llvm/llvm-project/pull/125389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-07 Thread David CARLIER via cfe-commits
https://github.com/devnexen updated https://github.com/llvm/llvm-project/pull/125389 >From e40672e8137c0546b1604795901ccea8b15f7932 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sun, 2 Feb 2025 09:36:50 + Subject: [PATCH 1/3] [compiler-rt][rtsan] porting the sanitizer to FreeBSD. Most

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-07 Thread David CARLIER via cfe-commits
https://github.com/devnexen edited https://github.com/llvm/llvm-project/pull/125389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-07 Thread David CARLIER via cfe-commits
@@ -43,6 +44,21 @@ static __rtsan::Context &GetContextForThisThreadImpl() { return *current_thread_context; } +#else + +// On FreeBSD, pthread api cannot be used as calloc is called under the hood +// at library initialization time. devnexen wrote: So I kno

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-05 Thread Chris Apple via cfe-commits
@@ -43,6 +44,21 @@ static __rtsan::Context &GetContextForThisThreadImpl() { return *current_thread_context; } +#else + +// On FreeBSD, pthread api cannot be used as calloc is called under the hood +// at library initialization time. +static __thread Context *ctx = nullptr; +

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-05 Thread David CARLIER via cfe-commits
@@ -43,6 +44,21 @@ static __rtsan::Context &GetContextForThisThreadImpl() { return *current_thread_context; } +#else + +// On FreeBSD, pthread api cannot be used as calloc is called under the hood +// at library initialization time. +static __thread Context *ctx = nullptr; +

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-05 Thread David CARLIER via cfe-commits
@@ -43,6 +44,21 @@ static __rtsan::Context &GetContextForThisThreadImpl() { return *current_thread_context; } +#else + +// On FreeBSD, pthread api cannot be used as calloc is called under the hood +// at library initialization time. devnexen wrote: I ll try

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-05 Thread Allan Jude via cfe-commits
allanjude wrote: We have seen interest in all of the different sanitizers from our embedded customers who use FreeBSD to build appliances. We have done work to extend support in FreeBSD for LLVM's KASAN and KMSAN, and have also seen commercial interest in KCSAN and RTSAN https://github.com/ll

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-05 Thread Chris Apple via cfe-commits
cjappl wrote: Thanks for the feedback @brooksdavis and @bsdimp - always hard to tell how popular or unpopular a change would be, especially from "outside the community" (aka me not knowing much about the BSD flavors :) > Sure we can keep it open for a while, still a long road before 21.x anyw

[clang] [compiler-rt] [rtsan] Enable RealtimeSanitizer for FreeBSD (PR #125389)

2025-02-05 Thread Chris Apple via cfe-commits
https://github.com/cjappl edited https://github.com/llvm/llvm-project/pull/125389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits