mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 10:01:43 +00:00
[KMTEST] Remove totally broken PoolsCorruption test
It was already disabled.
This commit is contained in:
parent
671935f24b
commit
00f45a4a73
1 changed files with 0 additions and 49 deletions
|
@ -109,54 +109,6 @@ static VOID PoolsTest(VOID)
|
|||
ExFreePoolWithTag(Allocs, TAG_POOLTEST);
|
||||
}
|
||||
|
||||
static VOID PoolsCorruption(VOID)
|
||||
{
|
||||
PULONG Ptr;
|
||||
ULONG AllocSize;
|
||||
|
||||
// start with non-paged pool
|
||||
AllocSize = 4096 + 0x10;
|
||||
Ptr = ExAllocatePoolWithTag(NonPagedPool, AllocSize, TAG_POOLTEST);
|
||||
|
||||
// touch all bytes, it shouldn't cause an exception
|
||||
RtlZeroMemory(Ptr, AllocSize);
|
||||
|
||||
/* TODO: These fail because accessing invalid memory doesn't necessarily
|
||||
cause an access violation */
|
||||
#ifdef THIS_DOESNT_WORK
|
||||
// test buffer overrun, right after our allocation ends
|
||||
_SEH2_TRY
|
||||
{
|
||||
TestPtr = (PULONG)((PUCHAR)Ptr + AllocSize);
|
||||
//Ptr[4] = 0xd33dbeef;
|
||||
*TestPtr = 0xd33dbeef;
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
/* Get the status */
|
||||
Status = _SEH2_GetExceptionCode();
|
||||
} _SEH2_END;
|
||||
|
||||
ok(Status == STATUS_ACCESS_VIOLATION, "Exception should occur, but got Status 0x%08lX\n", Status);
|
||||
|
||||
// test overrun in a distant byte range, but within 4096KB
|
||||
_SEH2_TRY
|
||||
{
|
||||
Ptr[2020] = 0xdeadb33f;
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
/* Get the status */
|
||||
Status = _SEH2_GetExceptionCode();
|
||||
} _SEH2_END;
|
||||
|
||||
ok(Status == STATUS_ACCESS_VIOLATION, "Exception should occur, but got Status 0x%08lX\n", Status);
|
||||
#endif
|
||||
|
||||
// free the pool
|
||||
ExFreePoolWithTag(Ptr, TAG_POOLTEST);
|
||||
}
|
||||
|
||||
static
|
||||
VOID
|
||||
TestPoolTags(VOID)
|
||||
|
@ -308,7 +260,6 @@ TestBigPoolExpansion(VOID)
|
|||
START_TEST(ExPools)
|
||||
{
|
||||
PoolsTest();
|
||||
PoolsCorruption();
|
||||
TestPoolTags();
|
||||
TestPoolQuota();
|
||||
TestBigPoolExpansion();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue