We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4d89838 + 10de931 commit 9897a81Copy full SHA for 9897a81
cpp/ql/src/semmle/code/cpp/dataflow/internal/FlowVar.qll
@@ -620,7 +620,8 @@ module FlowVar_internal {
620
private predicate largeVariable(Variable v, int liveBlocks, int defs) {
621
liveBlocks = strictcount(SubBasicBlock sbb | variableLiveInSBB(sbb, v)) and
622
defs = strictcount(SubBasicBlock sbb | exists(TBlockVar(sbb, v))) and
623
- liveBlocks * defs > 1000000
+ // Convert to float to avoid int overflow (32-bit two's complement)
624
+ liveBlocks.(float) * defs.(float) > 100000.0
625
}
626
627
/**
0 commit comments