Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 39d33e4

Browse filesBrowse files
committed
Fix ASan error
When processing an CFG entrance, the expression engine does not have a CFG element reference set up, thus an Asan error would be triggered if we use the stale value. Instead, we pass the first element in the block which would be a workaround.
1 parent 90e82f1 commit 39d33e4
Copy full SHA for 39d33e4

File tree

1 file changed

+4
-3
lines changed
Filter options

1 file changed

+4
-3
lines changed

‎clang/lib/StaticAnalyzer/Core/ExprEngine.cpp

Copy file name to clipboardExpand all lines: clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2565,9 +2565,10 @@ void ExprEngine::processCFGBlockEntrance(const BlockEdge &L,
25652565
// since we are currently at the block entrance and the current reference
25662566
// would be stale. Ideally, we should pass on the terminator of the CFG
25672567
// block, but the terminator cannot be referred as a CFG element.
2568-
// Here we just pass the current stale block.
2569-
ProgramStateRef WidenedState = getWidenedLoopState(
2570-
Pred->getState(), LCtx, BlockCount, getCFGElementRef());
2568+
// Here we just pass the the first CFG element in the block.
2569+
ProgramStateRef WidenedState =
2570+
getWidenedLoopState(Pred->getState(), LCtx, BlockCount,
2571+
*nodeBuilder.getContext().getBlock()->ref_begin());
25712572
nodeBuilder.generateNode(WidenedState, Pred);
25722573
return;
25732574
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.