Skip to content

Commit

Permalink
Merge pull request #1594 from jumormt/11.13fix
Browse files Browse the repository at this point in the history
fix npd issue#1591
  • Loading branch information
yuleisui authored Nov 13, 2024
2 parents 64e449c + aa1bdaa commit 2c256b6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions svf/lib/SABER/SaberCondAllocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@ SaberCondAllocator::evaluateTestNullLikeExpr(const BranchStmt *branchStmt, const
const SVFBasicBlock* succ1 = branchStmt->getSuccessor(0)->getBB();

const ValVar* condVar = SVFUtil::cast<ValVar>(branchStmt->getCondition());
if (condVar->isConstDataOrAggDataButNotNullPtr())
{
// branch condition is a constant value, return nullexpr because it cannot be test null
// br i1 false, label %44, label %75, !dbg !7669 { "ln": 2033, "cl": 7, "fl": "re_lexer.c" }
return Condition::nullExpr();
}
if (isTestNullExpr(SVFUtil::cast<ICFGNode>(condVar->getGNode())))
{
// succ is then branch
Expand Down

0 comments on commit 2c256b6

Please sign in to comment.