Author: hyperion
Date: Tue Dec 30 15:05:36 2008
New Revision: 38480
URL:
http://svn.reactos.org/svn/reactos?rev=38480&view=rev
Log:
modified include/reactos/libs/pseh/pseh2.h
modified lib/pseh/framebased-gcchack.c
Call _SEH2EnterFrame before any goto. Gotos confuse GCC's flow control analysis
making it disregard the returns_twice attribute on _SEH2EnterFrame. We avoid redundant
inline code (NULL-initializing the top trylevel pointer) by modifying the library
accordingly
Modified:
trunk/reactos/include/reactos/libs/pseh/pseh2.h
trunk/reactos/lib/pseh/framebased-gcchack.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] Tue Dec 30 15:05:36 2008
@@ -212,14 +212,15 @@
(void)_SEH2FrameP; \
(void)_SEH2TryLevelP; \
\
+ if(_SEHTopTryLevel) \
+ _SEH2EnterFrame(_SEH2FrameP); \
+ \
_SEHTryLevel.ST_Next = _SEHPrevTryLevelP; \
goto _SEHBeforeTry; \
\
_SEHDoTry:; \
- __SEH_ENTER_TRYLEVEL(); \
- \
- if(_SEHTopTryLevel) \
- _SEH2EnterFrame(_SEH2FrameP); \
+ \
+ __SEH_ENTER_TRYLEVEL();
#define __SEH_END_SCOPE \
} \
Modified: trunk/reactos/lib/pseh/framebased-gcchack.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/pseh/framebased-gcchac…
==============================================================================
--- trunk/reactos/lib/pseh/framebased-gcchack.c [iso-8859-1] (original)
+++ trunk/reactos/lib/pseh/framebased-gcchack.c [iso-8859-1] Tue Dec 30 15:05:36 2008
@@ -241,6 +241,7 @@
void __cdecl _SEH2EnterFrame(_SEH2Frame_t * frame)
{
frame->SF_Registration.SER_Handler = __SEH2FrameHandler;
+ frame->SF_TopTryLevel = 0;
frame->SF_Code = 0;
__SEH2EnterFrame(&frame->SF_Registration);
}