[clang] [sanitizer] Allow use-after-scope front-end argument to take effect with -fsanitize=kernel-address (PR #137015)
Vitaly Buka via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 23 21:31:16 PDT 2025
================
@@ -1099,7 +1099,13 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC,
}
} else {
- AsanUseAfterScope = false;
+ if (AllAddedKinds & SanitizerKind::KernelAddress) {
----------------
vitalybuka wrote:
I see, there is Asan case already and we need kernel one
there is already one
```
AsanUseAfterScope = Args.hasFlag(
options::OPT_fsanitize_address_use_after_scope,
options::OPT_fno_sanitize_address_use_after_scope, AsanUseAfterScope);
```
can you instead move that out from asas case and do single:
if (asan || kasan) {
AsanUseAfterScope = Args.hasFlag(
options::OPT_fsanitize_address_use_after_scope,
options::OPT_fno_sanitize_address_use_after_scope, AsanUseAfterScope);
} else {
AsanUseAfterScope = false
}
https://github.com/llvm/llvm-project/pull/137015
More information about the cfe-commits
mailing list