Hi,
I am running verifier to test my driver and I found that with verifier on checked build of windows 7, my driver causes the system to crash.
I know where it is crashing but I can’t quite figure out how to prevent it as I am a beginner in this area.
Followings are the part of code that kernel debugger displays when it is crashing.
DRIVER_IRQL_NOT_LESS_OR_EQUAL (d1)
An attempt was made to access a pageable (or completely invalid) address at an
interrupt request level (IRQL) that is too high. This is usually
caused by drivers using improper addresses.
If kernel debugger is available get stack backtrace.
Arguments:
Arg1: 805a0050, memory referenced
Arg2: 00000002, IRQL
Arg3: 00000000, value 0 = read operation, 1 = write operation
Arg4: 9edbb051, address which referenced memory
…
FAULTING_SOURCE_CODE:
217: (ExInterlockedCompareExchange64(
218: (LONGLONG *)&(g_af_trace.handle),
219: (LONGLONG *)&shandle,
220: (LONGLONG *)&zero_value,
221: NULL) == zero_value)) {
g_af_trace is a global variable and both shandle and zero_value are local variables declared as follows inside the function.
LONGLONG zero_value = 0;
LONGLONG socket_handle = handle;
How can I prevent my driver from crashing when it is faced with adverse situation caused by verifier? Thank you in advance.
YEH