mirror of
https://github.com/github/codeql.git
synced 2026-01-30 14:52:57 +01:00
Improve performance of new barrier guard
Some projects on lgtm were taking >1 hour, and with this commit they take <10 minutes
This commit is contained in:
@@ -75,7 +75,7 @@ module AllocationSizeOverflow {
|
||||
/** A check of the allocation size, acting as a guard to prevent allocation-size overflow. */
|
||||
class AllocationSizeCheck extends DataFlow::BarrierGuard, DataFlow::RelationalComparisonNode {
|
||||
override predicate checks(Expr e, boolean branch) {
|
||||
exists(DataFlow::Node lesser | this.leq(branch, lesser, _, _) |
|
||||
exists(DataFlow::Node lesser | this.leq(branch, lesser, _, _) and not lesser.isConst() |
|
||||
globalValueNumber(DataFlow::exprNode(e)) = globalValueNumber(lesser)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user