@@ -109,54 +109,6 @@ static VOID PoolsTest(VOID)
109109 ExFreePoolWithTag (Allocs , TAG_POOLTEST );
110110}
111111
112- static VOID PoolsCorruption (VOID )
113- {
114- PULONG Ptr ;
115- ULONG AllocSize ;
116-
117- // start with non-paged pool
118- AllocSize = 4096 + 0x10 ;
119- Ptr = ExAllocatePoolWithTag (NonPagedPool , AllocSize , TAG_POOLTEST );
120-
121- // touch all bytes, it shouldn't cause an exception
122- RtlZeroMemory (Ptr , AllocSize );
123-
124- /* TODO: These fail because accessing invalid memory doesn't necessarily
125- cause an access violation */
126- #ifdef THIS_DOESNT_WORK
127- // test buffer overrun, right after our allocation ends
128- _SEH2_TRY
129- {
130- TestPtr = (PULONG )((PUCHAR )Ptr + AllocSize );
131- //Ptr[4] = 0xd33dbeef;
132- * TestPtr = 0xd33dbeef ;
133- }
134- _SEH2_EXCEPT (EXCEPTION_EXECUTE_HANDLER )
135- {
136- /* Get the status */
137- Status = _SEH2_GetExceptionCode ();
138- } _SEH2_END ;
139-
140- ok (Status == STATUS_ACCESS_VIOLATION , "Exception should occur, but got Status 0x%08lX\n" , Status );
141-
142- // test overrun in a distant byte range, but within 4096KB
143- _SEH2_TRY
144- {
145- Ptr [2020 ] = 0xdeadb33f ;
146- }
147- _SEH2_EXCEPT (EXCEPTION_EXECUTE_HANDLER )
148- {
149- /* Get the status */
150- Status = _SEH2_GetExceptionCode ();
151- } _SEH2_END ;
152-
153- ok (Status == STATUS_ACCESS_VIOLATION , "Exception should occur, but got Status 0x%08lX\n" , Status );
154- #endif
155-
156- // free the pool
157- ExFreePoolWithTag (Ptr , TAG_POOLTEST );
158- }
159-
160112static
161113VOID
162114TestPoolTags (VOID )
@@ -308,7 +260,6 @@ TestBigPoolExpansion(VOID)
308260START_TEST (ExPools )
309261{
310262 PoolsTest ();
311- PoolsCorruption ();
312263 TestPoolTags ();
313264 TestPoolQuota ();
314265 TestBigPoolExpansion ();
0 commit comments