Skip to content

Commit

Permalink
C++: Add a small amount of pruning to 'SizeBarrierConfig'.
Browse files Browse the repository at this point in the history
  • Loading branch information
MathiasVP committed Aug 25, 2023
1 parent ded06a7 commit 9c5d735
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,12 @@ private module InterestingPointerAddInstruction {
)
}

/**
* Holds if `n` is a size of an allocation whose result flows to the left operand
* of a pointer-arithmetic instruction.
*
* This predicate is used to reduce the set of tuples in `SizeBarrierConfig::isSource`.
*/
predicate isInterestingSize(DataFlow::Node n) {
exists(DataFlow::Node alloc |
hasSize(alloc.asConvertedExpr(), n, _) and
Expand Down

0 comments on commit 9c5d735

Please sign in to comment.