mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:52:56 +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);
|
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
|
static
|
||||||
VOID
|
VOID
|
||||||
TestPoolTags(VOID)
|
TestPoolTags(VOID)
|
||||||
|
@ -308,7 +260,6 @@ TestBigPoolExpansion(VOID)
|
||||||
START_TEST(ExPools)
|
START_TEST(ExPools)
|
||||||
{
|
{
|
||||||
PoolsTest();
|
PoolsTest();
|
||||||
PoolsCorruption();
|
|
||||||
TestPoolTags();
|
TestPoolTags();
|
||||||
TestPoolQuota();
|
TestPoolQuota();
|
||||||
TestBigPoolExpansion();
|
TestBigPoolExpansion();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue