[llvm] [Sanitizers] Don't inline unpoisoning of small stacks when inlining disabled (PR #75555)

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 15 15:53: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) {
----------------
vitalybuka wrote:

> Or, ASAN.InstrumentationWithCallsThreshold as it is available in this code today

`InstrumentationWithCallsThreshold` is for checks
`MaxInlinePoisoningSize` for poisoning, like the code in question

https://github.com/llvm/llvm-project/pull/75555


More information about the llvm-commits mailing list