Skip to content

Commit

Permalink
C++: Generate an SEH exception edge for each call inside a SEH block
Browse files Browse the repository at this point in the history
  • Loading branch information
jketema committed Dec 13, 2024
1 parent 5d67381 commit 4942608
Show file tree
Hide file tree
Showing 4 changed files with 433 additions and 202 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,12 @@ class TranslatedFunctionCall extends TranslatedCallExpr, TranslatedDirectCall {
not exists(MemberFunction func | expr.getTarget() = func and func.isStatic())
}

final override predicate mayThrowException(ExceptionEdge e) { this.mustThrowException(e) }
final override predicate mayThrowException(ExceptionEdge e) {
this.mustThrowException(e)
or
expr.getEnclosingStmt().getParentStmt*() instanceof MicrosoftTryStmt and
e instanceof SehExceptionEdge
}

final override predicate mustThrowException(ExceptionEdge e) {
expr.getTarget() instanceof AlwaysSehThrowingFunction and
Expand Down
Loading

0 comments on commit 4942608

Please sign in to comment.