26.08.2013 Views

366.7 KB - Evernote

366.7 KB - Evernote

366.7 KB - Evernote

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

This trace shows that the now current thread is indeed the same that nt!SwapContext was about to<br />

resume before, and confirms once more that this thread has no pending APCs of any kind.<br />

Thus, we can see that this APC interrupt really is a spurious one: it occurred because it was pending,<br />

but occurred in the wrong thread, so it is useless. It is also harmless, because nt!KiDeliverApc returns<br />

without causing any more trouble.<br />

The remainder of the trace shows that nt!SwapContext is called to resume the original thread, which<br />

still has its pending APCs, then, even though there is no outstanding APC interrupt, nt!KiDeliverApc<br />

gets called and finally delivers our APC. This is confirmed by the fact that we see the trace from the<br />

kernel routine:<br />

APCTEST - SWAP CONTEXT trace<br />

APCTEST - Current IRQL: 0x1b<br />

APCTEST - Current thread: 0X84CBB460<br />

APCTEST - Current thread K APC pending: 0<br />

APCTEST - Current thread K APC list empty: 1<br />

APCTEST - Current thread U APC pending: 0<br />

APCTEST - Current thread U APC list empty: 1<br />

APCTEST - New thread: 0X851D2030<br />

APCTEST - New thread K APC pending: 1<br />

APCTEST - New thread K APC list empty: 0<br />

APCTEST - New thread U APC pending: 0<br />

APCTEST - New thread U APC list empty: 1<br />

APCTEST - APC INT: 0<br />

APCTEST - DELIVER APC trace<br />

APCTEST - Current IRQL: 0x1<br />

APCTEST - Caller address: 0X81BB42F7<br />

APCTEST - Trap frame: 00000000<br />

APCTEST - Reserved: 00000000<br />

APCTEST - PreviousMode: 0<br />

APCTEST - Thread: 0X851D2030<br />

APCTEST - Thread K APC pending: 1<br />

APCTEST - Thread K APC list empty: 0<br />

APCTEST - Thread U APC pending: 0<br />

APCTEST - Thread U APC list empty: 1<br />

APCTEST - KERNEL ROUTINE trace<br />

APCTEST - Thread: 0X851D2030<br />

APCTEST - Thread K APC pending: 0<br />

APCTEST - Thread K APC list empty: 1<br />

APCTEST - Thread U APC pending: 0<br />

13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!