Merge pull request #18309 from github/calumgrant/bmn/return-stack-allocated-memory

C++: Fix FPs to cpp/return-stack-allocated-memory
This commit is contained in:
Calum Grant
2024-12-20 10:54:24 +00:00
committed by GitHub
4 changed files with 24 additions and 1 deletions

View File

@@ -92,6 +92,8 @@ class ReturnStackAllocatedMemoryConfig extends MustFlowConfiguration {
or
node2.(PointerOffsetInstruction).getLeftOperand() = node1
}
override predicate isBarrier(Instruction n) { n.getResultType() instanceof ErroneousType }
}
from

View File

@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* The "Returning stack-allocated memory" query (`cpp/return-stack-allocated-memory`) no longer produces results if there is an extraction error in the returned expression.