[llvm] [Sanitizers] Don't inline unpoisoning of small stacks when inlining disabled (PR #75555)
Mariusz Borsa via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 15 11:47:59 PST 2023
================
@@ -3505,7 +3505,7 @@ void FunctionStackPoisoner::processStaticAllocas() {
SplitBlockAndInsertIfThenElse(Cmp, Ret, &ThenTerm, &ElseTerm);
IRBuilder<> IRBPoison(ThenTerm);
- if (StackMallocIdx <= 4) {
+ if (ASan.MaxInlinePoisoningSize != 0 && StackMallocIdx <= 4) {
----------------
wrotki wrote:
Not sure if I understand - minimum ClassSize is going to be 64 (kMinStackMallocSize << StackMallocIdx), L.Granularity = 8 , so if ASan.MaxInlinePoisoningSize == 0, the whole condition will be true, so inlining will happen. ASan.MaxInlinePoisoningSize == 0 should guarantee not inlining. So I'd rather keep it explicitly the way I had it, unless I misunderstood your suggestion?
https://github.com/llvm/llvm-project/pull/75555
More information about the llvm-commits
mailing list