Ignore:
Timestamp:
Jun 22, 2011, 11:43:22 PM (14 years ago)
Author:
dmik
Message:

kernel32: SEH: Fixed crashes at process termination (exceptions c0010001 and c0010002 in POPUPLOG.OS2) caused by attempting to unwind the Win32 exception chain twice, the second time after destroying the Win32 TEB block.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/exceptions.cpp

    r21623 r21645  
    468468  dprintf(("KERNEL32: RtlUnwind pEndFrame=%08X, unusedEip=%08X, pRecord=%08X, returnEax=%#x\n", pEndFrame, unusedEip, pRecord, returnEax));
    469469
     470  TEB *winteb = GetThreadTEB();
     471  if (!winteb)
     472  {
     473      /* We're being called from __seh_handler called upon unwinding the OS/2
     474       * exception chain after the Win32 TIB structure is destroyed. This for
     475       * example happens when we terminate the thread or the process from within
     476       * the __try block. Just ignore this call retur (note that the Win32
     477       * exception chain should be already unwound by this moment). */
     478      dprintf(("KERNEL32: RtlUnwind returning due to zero Win32 TEB.\n"));
     479      return 0;
     480  }
    470481
    471482  memset(&context, 0, sizeof(context));
     
    504515
    505516  /* get chain of exception frames */
    506   TEB *winteb = GetThreadTEB();
    507517  frame       = (PWINEXCEPTION_FRAME)winteb->except;
    508518
Note: See TracChangeset for help on using the changeset viewer.