Author: tkreuzer
Date: Thu May 1 10:27:38 2014
New Revision: 63092
URL:
http://svn.reactos.org/svn/reactos?rev=63092&view=rev
Log:
[PSEH]
When we use the dummy PSEH, use an if (ExternalVariable) around the except block. This is
to make Coverity check the except handler as well and take into account that it could be
executed.
Modified:
trunk/reactos/include/reactos/libs/pseh/pseh2.h
trunk/reactos/lib/pseh/dummy.c
Modified: trunk/reactos/include/reactos/libs/pseh/pseh2.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/pseh/…
==============================================================================
--- trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/libs/pseh/pseh2.h [iso-8859-1] Thu May 1 10:27:38 2014
@@ -39,12 +39,15 @@
#elif defined(_USE_DUMMY_PSEH) || defined (__arm__) || defined(__clang__) ||
defined(_M_AMD64)
+extern int _SEH2_Volatile0;
+extern int _SEH2_VolatileExceptionCode;
+
#define _SEH2_TRY {
#define _SEH2_FINALLY } {
-#define _SEH2_EXCEPT(...) } if (0) {
+#define _SEH2_EXCEPT(...) } if (_SEH2_Volatile0) {
#define _SEH2_END }
#define _SEH2_GetExceptionInformation()
-#define _SEH2_GetExceptionCode() 0
+#define _SEH2_GetExceptionCode() _SEH2_VolatileExceptionCode
#define _SEH2_AbnormalTermination()
#define _SEH2_YIELD(STMT_) STMT_
#define _SEH2_LEAVE
Modified: trunk/reactos/lib/pseh/dummy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/pseh/dummy.c?rev=63092…
==============================================================================
--- trunk/reactos/lib/pseh/dummy.c [iso-8859-1] (original)
+++ trunk/reactos/lib/pseh/dummy.c [iso-8859-1] Thu May 1 10:27:38 2014
@@ -1,2 +1,4 @@
/* intentionally empty file */
+int _SEH2_Volatile0 = 0;
+int _SEH2_VolatileExceptionCode = 0xC0000005;