Rework all tests that interact with use after return to correctly handle the case where the mode has been explicitly set to Never or Always.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | ||
---|---|---|
261–263 | we are going to have two conflicting flags. static cl::opt<AsanDetectStackUseAfterReturnMode> ClUseAfterReturn("asan-use-after-return"... |
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | ||
---|---|---|
268–270 | I added this one and the one below ('1') to avoid updating tests. |
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | ||
---|---|---|
261–263 | 0,1 is fine | |
268–270 | then maybe '2' as well? | |
273 | it should be ASAN_OPTIONS=detect_stack_use_after_return=1 | |
3326–3330 | this comment applies to inside of the "then" branch only Please insert corresponsing spseudo code for else branch: | |
3348–3360 | we porbably need entire thing in the else branch This is future oportunity to improve: make compiler-rt never return NULL so we can remove CreateICmpEQ and one branch | |
3362 | do you want to uncomment and keep it? | |
3370 | FakeStack is LLVM object which represent result of the function call | |
llvm/test/Instrumentation/AddressSanitizer/stack-poisoning.ll | ||
23 | this statements checks that there is no this line in after previous check | |
25 | It would be nice to check for CreateICmpEQ | |
llvm/test/Instrumentation/AddressSanitizer/stack_dynamic_alloca.ll | ||
26 | same |
we are going to have two conflicting flags.
Could you please just change this bool flag into Enum, probably without renaming?
static cl::opt<AsanDetectStackUseAfterReturnMode> ClUseAfterReturn("asan-use-after-return"...
0,1 should match current behavior