Hi,
I have been using the driver verifier and PREfast (from the Win2003 DDK)
to find out problems with my driver. And I have been having some odd
problems with both,
When I build under PREfast (prefast build -cZ), the defect list includes
this line:
IoSetCompletionRoutine(irp,
USBwinReadWrite_Complete, pCfContext, TRUE, TRUE, TRUE);
with this warning:
usbaccess.c(701) : warning 314: Incorrect order of operations: bitwise-or has higher precedence than the conditional-expression operator. Add parenthesies to clarify intent.
problem occurs in function ‘AsyncCallUSBD’
I can’t understand the problem. The statement in question does not have
bitwise-or or the conditional-expression operators. What is PREfast trying
to tell me?
And the driver verifier stats aren’t getting updated.
The driver verifier settings are:
C:\userdata\hchhaya\net>verifier /querysettings
Special pool: Enabled
Force IRQL checking: Enabled
Low resources simulation: Disabled
Pool tracking: Enabled
I/O verification: Enabled
Deadlock detection: Enabled
Enhanced I/O verification: Disabled
DMA checking: Enabled
Verified drivers:
umacusb.sys
However, I don’t see any updated stats when the driver is loaded
and working:
C:\userdata\hchhaya\net>verifier /query
12/30/2004, 12:18:03 PM
Level: 000000BB
RaiseIrqls: 0
AcquireSpinLocks: 0
SynchronizeExecutions: 0
AllocationsAttempted: 0
AllocationsSucceeded: 0
AllocationsSucceededSpecialPool: 0
AllocationsWithNoTag: 0
AllocationsFailed: 0
AllocationsFailedDeliberately: 0
Trims: 0
UnTrackedPool: 0
Verified drivers:
Name: umacusb.sys, loads: 4, unloads: 3
CurrentPagedPoolAllocations: 0
CurrentNonPagedPoolAllocations: 0
PeakPagedPoolAllocations: 0
PeakNonPagedPoolAllocations: 0
PagedPoolUsageInBytes: 0
NonPagedPoolUsageInBytes: 0
PeakPagedPoolUsageInBytes: 0
PeakNonPagedPoolUsageInBytes: 0
I see a non-zero number of allocs from non-paged memory in the
PoolTag utility for the tag used by the driver.
Should I be setting some environment variable or some registry entry
for the verifier to update its stats?
Thanks,
- Harshal