From 79679fb36281f2e330f75fb4b9f72755b98026bc Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 30 Dec 2012 18:01:34 +0000 Subject: [PATCH] [PSEH3] Apply the same mechanism to prevent inlining SEH using functions that was already applied to PSEH2. svn path=/trunk/; revision=58059 --- reactos/include/reactos/libs/pseh/pseh3.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reactos/include/reactos/libs/pseh/pseh3.h b/reactos/include/reactos/libs/pseh/pseh3.h index de9092c2428..b5ee1d874c0 100644 --- a/reactos/include/reactos/libs/pseh/pseh3.h +++ b/reactos/include/reactos/libs/pseh/pseh3.h @@ -45,6 +45,9 @@ typedef struct _SEH3$_REGISTRATION_FRAME } SEH3$_REGISTRATION_FRAME ,*PSEH3$_REGISTRATION_FRAME; +/* Prevent gcc from inlining functions that use SEH. */ +static inline __attribute__((always_inline)) __attribute__((returns_twice)) void _SEH3$_PreventInlining() {} + extern inline __attribute__((always_inline,gnu_inline)) void _SEH3$_UnregisterFrame(volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame) { @@ -174,6 +177,7 @@ void * __cdecl __attribute__((error("Can only be used inside an exception filter #define _SEH3_TRY \ + _SEH3$_PreventInlining(); \ /* Enter the outer scope */ \ do { \ /* Declare local labels */ \