[compiler-rt] e4e4198 - [NFCI] clarify that asan-*linux.cpp files affect *nix OS'es (#195565)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 09:36:29 PDT 2026


Author: David Justo
Date: 2026-05-05T09:36:24-07:00
New Revision: e4e41984bd92d3afb363ce4ae03c3dbf291b10c1

URL: https://github.com/llvm/llvm-project/commit/e4e41984bd92d3afb363ce4ae03c3dbf291b10c1
DIFF: https://github.com/llvm/llvm-project/commit/e4e41984bd92d3afb363ce4ae03c3dbf291b10c1.diff

LOG: [NFCI] clarify that asan-*linux.cpp files affect *nix OS'es (#195565)

**Prior Work:** Aims to supersede (#132263), which seems inactive,
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!_

Added: 
    

Modified: 
    compiler-rt/lib/asan/asan_linux.cpp
    compiler-rt/lib/asan/asan_malloc_linux.cpp

Removed: 
    


################################################################################
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..20a231d345710 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-specific (and Unix/Unix-like) malloc interception.
 // We simply define functions like malloc, free, realloc, etc.
 // They will replace the corresponding libc functions automagically.
 //===----------------------------------------------------------------------===//


        


More information about the llvm-commits mailing list