Changeset 21382 for trunk/src


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/src/kernel32/seh/sehutil.s

    r21381 r21382  
    4747
    4848    movl 12(%ebp), %ebx
    49     movl $0f, %eax
    50     movl %eax, 12(%ebx) /* pFrame->pHandlerCallback */
     49    movl $0f, 12(%ebx) /* pFrame->pHandlerCallback */
    5150
    5251    /* get the size of the handler's stack */
     
    8685
    8786    /* jump to the filter callback */
     87    movl $1, 56(%eax) /* pFrame->state */
    8888    jmp *8(%eax) /* pFrame->pFilterCallback */
    8989
     
    110110
    111111    /* analyze filter result */
    112     movl 20(%ebx), %eax
     112    movl 20(%ebx), %eax /* pFrame->filterResult */
    113113    cmpl $1, %eax /* EXCEPTION_EXECUTE_HANDLER? */
    114114    je ___seh_handler_Unwind
     
    141141    addl $12, %esp
    142142
    143     /* restore __try/__catch context */
     143    /* restore __try/__except context */
    144144    movl 12(%ebp), %eax
    145145    movl 24(%eax), %ebx
     
    149149    movl 40(%eax), %esp
    150150
    151     /* jump to __catch */
     151    /* jump to __except */
     152    movl $2, 56(%eax) /* pFrame->state */
    152153    jmp *8(%eax) /* pFrame->pFilterCallback */
    153154
Note: See TracChangeset for help on using the changeset viewer.