[all-commits] [llvm/llvm-project] f7c673: [libc] Clean up sanitizer macros
Fangrui Song via All-commits
all-commits at lists.llvm.org
Wed Jul 10 15:42:53 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f7c673da00e5b0a4b14d059cfdbd7655259fd74c
https://github.com/llvm/llvm-project/commit/f7c673da00e5b0a4b14d059cfdbd7655259fd74c
Author: Fangrui Song <i at maskray.me>
Date: 2024-07-10 (Wed, 10 Jul 2024)
Changed paths:
M libc/src/__support/macros/sanitizer.h
Log Message:
-----------
[libc] Clean up sanitizer macros
https://reviews.llvm.org/D99598 introduced some unneeded macros
including `ADDRESS_SANITIZER` and `MEMORY_SANITIZER`. The definitions
appeared to be from older absl/base/internal/dynamic_annotations.h,
which has then been cleaned up.
`ADDRESS_SANITIZER` is not defined by compilers. Some Bazel users define
it as part of --config=asan. If a translation unit specifies
-fno-sanitize=address, libc/src/__support/macros/sanitizer.h and
sanitizer/asan_interface.h will define ASAN_POISON_MEMORY_REGION
differently, leading to
```
libc/src/__support/macros/sanitizer.h:66:9: error: 'ASAN_UNPOISON_MEMORY_REGION' macro redefined [-Werror,-Wmacro-redefined]
66 | #define ASAN_UNPOISON_MEMORY_REGION(addr, size) \
| ^
```
To fix this issue, just remove unneeded macros.
Pull Request: https://github.com/llvm/llvm-project/pull/98402
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list