Ignore:
Timestamp:
Aug 27, 2010, 2:20:14 AM (15 years ago)
Author:
dmik
Message:

SEH: Save EXCEPTION_RECORD and CONTEXT on heap when jumping back from the exception handler to execute the except() filter expression because they are stored on stack and may be overwritten during execution of the filter expression. This fixes garbage in structures pointed to by _exception_info()'s pointers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/excpt.h

    r21387 r21427  
    4949#define __try \
    5050    volatile __seh_PEXCEPTION_FRAME __seh_frame;                               \
     51    __seh_frame.Pointers.ExceptionRecord = NULL;                               \
     52    __seh_frame.Pointers.ContextRecord = NULL;                                 \
    5153    __seh_frame.state = 0;                                                     \
    5254    __asm__("\n0:\n"); /* pFilterCallback */                                   \
Note: See TracChangeset for help on using the changeset viewer.