diff options
author | Fangrui Song <i@maskray.me> | 2024-01-10 11:13:28 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-10 11:13:28 -0800 |
commit | 51fbab134560ece663517bf1e8c2a30300d08f1a (patch) | |
tree | a8e7e8431b9191168dc9a9c3b3b345a6bbfcd28b /clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp | |
parent | 408dce82016463dcb5026b2ddfc62174970a88e9 (diff) | |
download | llvm-51fbab134560ece663517bf1e8c2a30300d08f1a.zip llvm-51fbab134560ece663517bf1e8c2a30300d08f1a.tar.gz llvm-51fbab134560ece663517bf1e8c2a30300d08f1a.tar.bz2 |
[asan] Enable StackSafetyAnalysis by default
StackSafetyAnalysis determines whether stack-allocated variables are
guaranteed to be safe from memory access bugs and enables the removal of
certain unneeded instrumentations.
(hwasan enables StackSafetyAnalysis in https://reviews.llvm.org/D108381)
Test updates:
* asan-stack-safety.ll: test the -asan-use-stack-safety=1 default
* lifetime-uar-uas.ll: switch to an indexed store to prevent
StackSafetyAnalysis from optimizing out instrumentation for %c
* alloca_vla_interact.cpp: add a load to prevent StackSafetyAnalysis
from optimizing out `__asan_alloca_poison` for the VLA `array`
* scariness_score_test.cpp: add -asan-use-stack-safety=0 to make a load
of a `__asan_poison_memory_region`-poisoned local variable fail as
intended.
* other .ll tests: add -asan-use-stack-safety=0
Reviewers: kstoimenov, eugenis, vitalybuka
Reviewed By: kstoimenov
Pull Request: https://github.com/llvm/llvm-project/pull/77210
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp')
0 files changed, 0 insertions, 0 deletions