[PATCH] D102280: [analyzer] Engine: fix crash with SEH __leave keyword
Balázs Benics via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 17 11:12:30 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGebcf030efc5e: [analyzer] Engine: fix crash with SEH __leave keyword (authored by AbbasSabra, committed by steakhal).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102280/new/
https://reviews.llvm.org/D102280
Files:
clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
clang/test/Analysis/ms-seh.cpp
Index: clang/test/Analysis/ms-seh.cpp
===================================================================
--- /dev/null
+++ clang/test/Analysis/ms-seh.cpp
@@ -0,0 +1,13 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -triple x86_64-pc-windows-msvc19.11.0 -fms-extensions -verify %s
+
+void clang_analyzer_warnIfReached();
+int filter();
+
+void try_except_leave() {
+ __try {
+ __leave; // no-crash
+ clang_analyzer_warnIfReached(); // no-warning
+ } __except (filter()) {
+ }
+ clang_analyzer_warnIfReached(); // expected-warning{{REACHABLE}}
+}
Index: clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
===================================================================
--- clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
+++ clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
@@ -349,6 +349,7 @@
HandleBranch(cast<ForStmt>(Term)->getCond(), Term, B, Pred);
return;
+ case Stmt::SEHLeaveStmtClass:
case Stmt::ContinueStmtClass:
case Stmt::BreakStmtClass:
case Stmt::GotoStmtClass:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102280.345943.patch
Type: text/x-patch
Size: 1075 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210517/61fa287e/attachment.bin>
More information about the cfe-commits
mailing list