[clang] Thread Safety Analysis: Support warning on obtaining address of guarded variables (PR #123063)

Marco Elver via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 4 07:03:56 PST 2025


melver wrote:

FWIW, the Linux kernel integration (draft, WIP) currently lives here: https://github.com/google/kernel-sanitizers/tree/cap-analysis
It currently enables -Wthread-safety-addressof if available. Thus far, I have not found any false positives due to -Wthread-safety-addressof in the 2 subsystems I converted over (more to follow).

And I want to re-iterate that without -Wthread-safety-addressof, the feature's coverage is significantly reduced, and I predict it to be one of the first complaints in later review.

Kindly take another look.

cc @bvanassche

https://github.com/llvm/llvm-project/pull/123063


More information about the cfe-commits mailing list