C++: Generate SEH edges for pointer dereference loads in __try blocks

This commit is contained in:
Jeroen Ketema
2025-06-14 00:00:37 +02:00
parent 3eb768c1e9
commit 9d6a1a9885
3 changed files with 88 additions and 62 deletions

View File

@@ -400,7 +400,14 @@ class TranslatedLoad extends TranslatedValueCategoryAdjustment, TTranslatedLoad
override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) {
tag = LoadTag() and
result = this.getParent().getChildSuccessor(this, kind)
(
result = this.getParent().getChildSuccessor(this, kind)
or
expr instanceof PointerDereferenceExpr and
kind instanceof SehExceptionEdge and
exists(MicrosoftTryStmt tryStmt | tryStmt.getStmt() = expr.getEnclosingStmt().getParent*()) and
result = this.getParent().getExceptionSuccessorInstruction(any(GotoEdge e))
)
}
override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) {