Changeset 21382 for trunk/include


Ignore:
Timestamp:
Jul 5, 2010, 3:13:08 PM (15 years ago)
Author:
dmik
Message:

SEH: Fixed: Nested try/except statements would produce wrong execution flow.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/excpt.h

    r21381 r21382  
    4646#define __try \
    4747    volatile __seh_PEXCEPTION_FRAME __seh_frame;                               \
    48     for (__seh_frame.state = 0; __seh_frame.state <= 3; ++__seh_frame.state)   \
     48    __seh_frame.state = 0;                                                     \
     49    __asm__("\n0:\n"); /* pFilterCallback */                                   \
     50    for (; __seh_frame.state <= 3; ++__seh_frame.state)                        \
    4951        if (__seh_frame.state == 0)                                            \
    5052        {                                                                      \
     
    6062                     "movl $___seh_handler, %%eax; "                           \
    6163                     "movl %%eax, 4(%%ecx); "                                  \
    62                      "movl $0f, %%eax; "                                       \
    63                      "movl %%eax, 8(%%ecx); "                                  \
     64                     "movl $0b, 8(%%ecx); "                                    \
    6465                     ""                                                        \
    6566                     "movl %%ebx, 24(%%ecx); "                                 \
     
    8485            }                                                                  \
    8586            __seh_frame.state = 2;                                             \
    86             __asm__("\n0:\n"); /* pFilterCallback */                           \
    87             continue;                                                          \
    8887        }                                                                      \
    8988        else if (__seh_frame.state == 1) {                                     \
Note: See TracChangeset for help on using the changeset viewer.