[clang] [compiler-rt] Rtsan fbsd (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

[clang] [compiler-rt] Rtsan fbsd (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. cjappl wrote: Can you el

[clang] [compiler-rt] Rtsan fbsd (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 fbsd (PR #125389)

2025-02-05 Thread Chris Apple via cfe-commits
https://github.com/cjappl commented: (sorry meant to leave these comments the other day, these comments are separate from the "should we enable it" discussion) https://github.com/llvm/llvm-project/pull/125389 ___ cfe-commits mailing list cfe-commits@l

[clang] [compiler-rt] Rtsan fbsd (PR #125389)

2025-02-03 Thread Brooks Davis via cfe-commits
brooksdavis wrote: rtsan seems like something we'd want on FreeBSD. If this is all that's required it seems like a no-brainer. https://github.com/llvm/llvm-project/pull/125389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [compiler-rt] Rtsan fbsd (PR #125389)

2025-02-03 Thread Chris Apple via cfe-commits
cjappl wrote: > @devnexen in principle, I'm of course not opposed to rtsan supporting FreeBSD > - is there any motivation in particular for why you propose adding it here? > Is this the first of many patches that are needed, or is it the only one that > you can foresee? I'd like to make sure t

[clang] [compiler-rt] Rtsan fbsd (PR #125389)

2025-02-03 Thread David CARLIER via cfe-commits
devnexen wrote: I do not plan other commits, except maybe bug fixes. rtsan would have about the same potential usefulness than in macos. https://github.com/llvm/llvm-project/pull/125389 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [compiler-rt] Rtsan fbsd (PR #125389)

2025-02-03 Thread via cfe-commits
davidtrevelyan wrote: @devnexen in principle, I'm of course not opposed to rtsan supporting FreeBSD - is there any motivation in particular for why you propose adding it here? Is this the first of many patches that are needed, or is it the only one that you can foresee? I'd like to make sure t

[clang] [compiler-rt] Rtsan fbsd (PR #125389)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-compiler-rt-sanitizer Author: David CARLIER (devnexen) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/125389.diff 4 Files Affected: - (modified) clang/lib/Driver/ToolChains/FreeBSD.cpp (+1) - (modified) compiler-rt/lib/rtsan/rtsan

[clang] [compiler-rt] Rtsan fbsd (PR #125389)

2025-02-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: David CARLIER (devnexen) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/125389.diff 4 Files Affected: - (modified) clang/lib/Driver/ToolChains/FreeBSD.cpp (+1) - (modified) compiler-rt/lib/rtsan/rtsan_context.cpp (+1

[clang] [compiler-rt] Rtsan fbsd (PR #125389)

2025-02-02 Thread David CARLIER via cfe-commits
https://github.com/devnexen ready_for_review 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 fbsd (PR #125389)

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