Verifier crash

I recently discovered the Driver Verifier and decided to run my driver through it. Everything works great until I try to unload the driver.

I’m getting something very much like is seen in this thread;
http://www.osronline.com/showthread.cfm?link=264023

The problem is I never call any Etw… functions explicitly so I’m unclear on what the problem really is. Just as the other post mentions I too:
Call WPP_INIT_TRACING in DriverEntry and WPP_CLEANUP in
EvtCleanupCallback.

I make no excplicit Etw… calls.

I’m not clear what this code is or where it is called. I see the same error shown in the above post.

4622: WppReg = WppReg->Next;

it shows as an error in my device.tmh

I assume its in:
void EvtDriverContextCleanup(
IN WDFDRIVER Driver
)
{
PAGED_CODE ();

TraceEvents(TRACE_LEVEL_INFORMATION, DBG_PNP, __DRIVER_NAME " <– EvtDriverContextCleanup");

WPP_CLEANUP( WdfDriverWdmGetDriverObject( Driver ) );

TraceEvents(TRACE_LEVEL_INFORMATION, DBG_PNP, __DRIVER_NAME " –> EvtDriverContextCleanup");

return;
}

Thoughts?

xxxxx@yahoo.com wrote:

I assume its in:
void EvtDriverContextCleanup(
IN WDFDRIVER Driver
)
{
PAGED_CODE ();

TraceEvents(TRACE_LEVEL_INFORMATION, DBG_PNP, __DRIVER_NAME " <– EvtDriverContextCleanup");

WPP_CLEANUP( WdfDriverWdmGetDriverObject( Driver ) );

TraceEvents(TRACE_LEVEL_INFORMATION, DBG_PNP, __DRIVER_NAME " –> EvtDriverContextCleanup");

return;
}

Thoughts?

Yes. When you call WPP_CLEANUP, you are telling the kernel “OK, I am
through with WPP. You can free your buffers, there will be no more
trace calls.” You immediately follow that with another trace call. You
lied to the kernel, and it doesn’t like that.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Yes, that should have be obvious to me. Thanks.