[compiler-rt] [NFCI] clarify that asan-*linux.cpp files affect *nix OS'es (PR #195565)
via llvm-commits
llvm-commits at lists.llvm.org
Sun May 3 18:07:23 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: David Justo (davidmrdavid)
<details>
<summary>Changes</summary>
**Prior Work:** Aims to supersede (#<!-- -->132263), which seems abandoned, specifically by applying my own comment: https://github.com/llvm/llvm-project/pull/132263#issuecomment-3051238734
**Context:** It aims to minimally document that the `asan_(malloc_)?linux.cpp` files may impact non-linux OS'es (despite the name) such as Solaris, BSD, and other *nix OS'es. This is worth documenting as otherwise we risk breakage due to confusion, as occurred [here](https://github.com/llvm/llvm-project/pull/131975#issuecomment-2741097471).
This is done simply by minimally augmenting the file header comment saying precisely this.
Unlike the prior PR, this does not rename any files, which should reduce the 'git noise' impact of this change.
_Thanks!_
---
Full diff: https://github.com/llvm/llvm-project/pull/195565.diff
2 Files Affected:
- (modified) compiler-rt/lib/asan/asan_linux.cpp (+1-1)
- (modified) compiler-rt/lib/asan/asan_malloc_linux.cpp (+1-1)
``````````diff
diff --git a/compiler-rt/lib/asan/asan_linux.cpp b/compiler-rt/lib/asan/asan_linux.cpp
index d2c2a394b06c2..5eedebf0b58cc 100644
--- a/compiler-rt/lib/asan/asan_linux.cpp
+++ b/compiler-rt/lib/asan/asan_linux.cpp
@@ -8,7 +8,7 @@
//
// This file is a part of AddressSanitizer, an address sanity checker.
//
-// Linux-specific details.
+// Linux-specific (and Unix/Unix-like) details.
//===----------------------------------------------------------------------===//
#include "sanitizer_common/sanitizer_platform.h"
diff --git a/compiler-rt/lib/asan/asan_malloc_linux.cpp b/compiler-rt/lib/asan/asan_malloc_linux.cpp
index 35bf55da1c66b..f48d3cbe07b15 100644
--- a/compiler-rt/lib/asan/asan_malloc_linux.cpp
+++ b/compiler-rt/lib/asan/asan_malloc_linux.cpp
@@ -8,7 +8,7 @@
//
// This file is a part of AddressSanitizer, an address sanity checker.
//
-// Linux-specific malloc interception.
+// Linux-speficic (and Unix/Unix-like) malloc interception.
// We simply define functions like malloc, free, realloc, etc.
// They will replace the corresponding libc functions automagically.
//===----------------------------------------------------------------------===//
``````````
</details>
https://github.com/llvm/llvm-project/pull/195565
More information about the llvm-commits
mailing list