[all-commits] [llvm/llvm-project] af33fc: [asan] Enable StackSafetyAnalysis by default
Fangrui Song via All-commits
all-commits at lists.llvm.org
Sat Jan 6 20:15:31 PST 2024
Branch: refs/heads/users/MaskRay/spr/asan-enable-stacksafetyanalysis-by-default
Home: https://github.com/llvm/llvm-project
Commit: af33fcdf5a46c5bd34db89615a037e5eca421ef9
https://github.com/llvm/llvm-project/commit/af33fcdf5a46c5bd34db89615a037e5eca421ef9
Author: Fangrui Song <i at maskray.me>
Date: 2024-01-06 (Sat, 06 Jan 2024)
Changed paths:
M compiler-rt/test/asan/TestCases/alloca_vla_interact.cpp
M compiler-rt/test/asan/TestCases/scariness_score_test.cpp
M llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
M llvm/test/Instrumentation/AddressSanitizer/asan-stack-safety.ll
M llvm/test/Instrumentation/AddressSanitizer/debug_info.ll
M llvm/test/Instrumentation/AddressSanitizer/lifetime-uar-uas.ll
M llvm/test/Instrumentation/AddressSanitizer/lifetime.ll
M llvm/test/Instrumentation/AddressSanitizer/local_stack_base.ll
M llvm/test/Instrumentation/AddressSanitizer/stack_dynamic_alloca.ll
M llvm/test/Instrumentation/AddressSanitizer/stack_layout.ll
Log Message:
-----------
[asan] Enable StackSafetyAnalysis by default
StackSafetyAnalysis determines whether stack-allocated variables are
safe from memory access bugs and allows removing 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
Pull Request: https://github.com/llvm/llvm-project/pull/77210
More information about the All-commits
mailing list