- Remove KEBUGCHECK and KEBUGCHECKEX macros

- Replace "KeBugCheck(0)" by ASSERT(FALSE)
- Replace deprecated "CPRINT" by DRINT1

svn path=/trunk/; revision=35600
This commit is contained in:
Stefan Ginsberg 2008-08-24 15:48:05 +00:00
parent e0e86d6092
commit 13362ee99b
76 changed files with 443 additions and 452 deletions

View file

@ -81,7 +81,7 @@ vfatInitFcb(PVFATFCB Fcb, PUNICODE_STRING NameU)
{
/* FIXME: what to do if no more memory? */
DPRINT1("Unable to initialize FCB for filename '%wZ'\n", NameU);
KEBUGCHECKEX(0, (ULONG_PTR)Fcb, (ULONG_PTR)NameU, 0, 0);
KeBugCheckEx(0, (ULONG_PTR)Fcb, (ULONG_PTR)NameU, 0, 0);
}
Fcb->PathNameU.Length = 0;

View file

@ -69,7 +69,7 @@ OffsetToCluster(PDEVICE_EXTENSION DeviceExt,
if (FirstCluster == 0)
{
DbgPrint("OffsetToCluster is called with FirstCluster = 0!\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (FirstCluster == 1)
@ -233,7 +233,7 @@ VfatReadFileData (PVFAT_IRP_CONTEXT IrpContext,
ROUND_DOWN(ReadOffset.u.LowPart, BytesPerCluster),
&CorrectCluster, FALSE);
if (CorrectCluster != CurrentCluster)
KEBUGCHECK(FAT_FILE_SYSTEM);
KeBugCheck(FAT_FILE_SYSTEM);
}
#endif
}
@ -442,7 +442,7 @@ VfatWriteFileData(PVFAT_IRP_CONTEXT IrpContext,
ROUND_DOWN(WriteOffset.u.LowPart, BytesPerCluster),
&CorrectCluster, FALSE);
if (CorrectCluster != CurrentCluster)
KEBUGCHECK(FAT_FILE_SYSTEM);
KeBugCheck(FAT_FILE_SYSTEM);
}
#endif
}

View file

@ -80,7 +80,7 @@ NpfsReadWriteCancelRoutine(IN PDEVICE_OBJECT DeviceObject,
}
break;
default:
KEBUGCHECK(0);
ASSERT(FALSE);
}
ExReleaseFastMutex(&Ccb->DataListLock);
KeUnlockMutex(&DeviceExt->PipeListLock);
@ -130,7 +130,7 @@ NpfsWaiterThread(PVOID InitContext)
NpfsRead(IoStack->DeviceObject, Irp);
break;
default:
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
}
@ -148,7 +148,7 @@ NpfsWaiterThread(PVOID InitContext)
ThreadContext->WaitBlockArray);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
KeLockMutex(&ThreadContext->DeviceExt->PipeListLock);
Count = Status - STATUS_SUCCESS;
@ -185,7 +185,7 @@ NpfsWaiterThread(PVOID InitContext)
}
break;
default:
KEBUGCHECK(0);
ASSERT(FALSE);
}
ExReleaseFastMutex(&Ccb->DataListLock);
}
@ -357,7 +357,7 @@ NpfsRead(IN PDEVICE_OBJECT DeviceObject,
NULL);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
ExAcquireFastMutex(&Ccb->DataListLock);
}

View file

@ -49,7 +49,7 @@ VOID
NTAPI
HalStopProfileInterrupt(IN KPROFILE_SOURCE ProfileSource)
{
KEBUGCHECK(0);
ASSERT(FALSE);
return;
}
@ -60,7 +60,7 @@ VOID
NTAPI
HalStartProfileInterrupt(IN KPROFILE_SOURCE ProfileSource)
{
KEBUGCHECK(0);
ASSERT(FALSE);
return;
}
@ -71,7 +71,7 @@ ULONG_PTR
NTAPI
HalSetProfileInterval(IN ULONG_PTR Interval)
{
KEBUGCHECK(0);
ASSERT(FALSE);
return Interval;
}

View file

@ -222,7 +222,7 @@ HalGetBusDataByOffset(IN BUS_DATA_TYPE BusDataType,
else if (BusDataType == EisaConfiguration)
{
/* FIXME: TODO */
KEBUGCHECK(0);
ASSERT(FALSE);
}
else if ((BusDataType == PCIConfiguration) &&
(HalpPCIConfigInitialized) &&

View file

@ -1487,7 +1487,7 @@ HalpCopyBufferMap(
*/
/* FIXME: The correct bug check code isn't defined. */
/* KEBUGCHECKEX(HAL_MEMORY_ALLOCATION, PAGE_SIZE, 0, (ULONG_PTR)__FILE__, 0); */
KEBUGCHECK(0);
ASSERT(FALSE);;
}
CurrentAddress = (ULONG_PTR)VirtualAddress +

View file

@ -21,7 +21,7 @@ VOID
NTAPI
HalStopProfileInterrupt(IN KPROFILE_SOURCE ProfileSource)
{
KEBUGCHECK(0);
ASSERT(FALSE);
return;
}
@ -32,7 +32,7 @@ VOID
NTAPI
HalStartProfileInterrupt(IN KPROFILE_SOURCE ProfileSource)
{
KEBUGCHECK(0);
ASSERT(FALSE);
return;
}
@ -43,6 +43,6 @@ ULONG_PTR
NTAPI
HalSetProfileInterval(IN ULONG_PTR Interval)
{
KEBUGCHECK(0);
ASSERT(FALSE);
return Interval;
}

View file

@ -939,7 +939,7 @@ VOID HaliInitBSP(VOID)
/* Only initialize the BSP once */
if (BSPInitialized)
{
KEBUGCHECK(0);
ASSERT(FALSE);
return;
}
@ -961,7 +961,7 @@ VOID HaliInitBSP(VOID)
else
{
DPRINT("No APIC found\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (APICMode == amPIC)
@ -1013,7 +1013,7 @@ HaliStartApplicationProcessor(ULONG Cpu, ULONG Stack)
Cpu >= CPUCount ||
OnlineCPUs & (1 << Cpu))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
DPRINT1("Attempting to boot CPU %d\n", Cpu);

View file

@ -43,14 +43,14 @@ HalpInitPhase0(PLOADER_PARAMETER_BLOCK LoaderBlock)
if (MPSInitialized)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
MPSInitialized = TRUE;
if (!HaliFindSmpConfig())
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
/* store the kernel base for later use */

View file

@ -256,7 +256,7 @@ AssignIrqVector(ULONG irq)
else if (current_vector == FIRST_SYSTEM_VECTOR)
{
DPRINT1("Ran out of interrupt sources!");
KEBUGCHECK(0);
ASSERT(FALSE);
}
vector = current_vector;
@ -489,7 +489,7 @@ IOAPICSetupIds(VOID)
if (GET_IOAPIC_ID(tmp) != IOAPICMap[apic].ApicId)
{
DPRINT1("Could not set I/O APIC ID!\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
}

View file

@ -45,7 +45,7 @@ HaliMPIntSrcInfo(PMP_CONFIGURATION_INTSRC m)
if (IRQCount > MAX_IRQ_SOURCE)
{
DPRINT1("Max # of irq sources exceeded!!\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
IRQMap[IRQCount] = *m;
@ -217,7 +217,7 @@ HaliMPIOApicInfo(PMP_CONFIGURATION_IOAPIC m)
DPRINT("Max # of I/O APICs (%d) exceeded (found %d).\n",
MAX_IOAPIC, IOAPICCount);
DPRINT1("Recompile with bigger MAX_IOAPIC!.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
IOAPICMap[IOAPICCount].ApicId = m->ApicId;
@ -245,12 +245,12 @@ HaliMPIntLocalInfo(PMP_CONFIGURATION_INTLOCAL m)
if ((m->IrqType == INT_EXTINT) && (m->DstApicLInt != 0))
{
DPRINT1("Invalid MP table!\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if ((m->IrqType == INT_NMI) && (m->DstApicLInt != 1))
{
DPRINT1("Invalid MP table!\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
@ -271,14 +271,14 @@ HaliReadMPConfigTable(PMP_CONFIGURATION_TABLE Table)
DPRINT1("Bad MP configuration block signature: %c%c%c%c\n",
pc[0], pc[1], pc[2], pc[3]);
KEBUGCHECKEX(0, pc[0], pc[1], pc[2], pc[3]);
KeBugCheckEx(0, pc[0], pc[1], pc[2], pc[3]);
return FALSE;
}
if (MPChecksum((PUCHAR)Table, Table->Length))
{
DPRINT1("Bad MP configuration block checksum\n");
KEBUGCHECK(0);
ASSERT(FALSE);
return FALSE;
}
@ -286,7 +286,7 @@ HaliReadMPConfigTable(PMP_CONFIGURATION_TABLE Table)
{
DPRINT1("Bad MP configuration table version (%d)\n",
Table->Specification);
KEBUGCHECK(0);
ASSERT(FALSE);
return FALSE;
}
@ -294,7 +294,7 @@ HaliReadMPConfigTable(PMP_CONFIGURATION_TABLE Table)
{
DPRINT1("APIC base address is at 0x%X. I cannot handle non-standard adresses\n",
Table->LocalAPICAddress);
KEBUGCHECK(0);
ASSERT(FALSE);
return FALSE;
}
@ -346,7 +346,7 @@ HaliReadMPConfigTable(PMP_CONFIGURATION_TABLE Table)
}
default:
DPRINT1("Unknown entry in MPC table\n");
KEBUGCHECK(0);
ASSERT(FALSE);
return FALSE;
}
}
@ -597,7 +597,7 @@ HaliGetSmpConfig(VOID)
}
else
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
return TRUE;
}

View file

@ -37,7 +37,7 @@ KIRQL STDCALL KeGetCurrentIrql (VOID)
if (irql > HIGH_LEVEL)
{
DPRINT1 ("CurrentIrql %x\n", irql);
KEBUGCHECK (0);
ASSERT(FALSE);
}
if (Flags & EFLAGS_INTERRUPT_MASK)
{
@ -57,7 +57,7 @@ VOID KeSetCurrentIrql (KIRQL NewIrql)
if (NewIrql > HIGH_LEVEL)
{
DPRINT1 ("NewIrql %x\n", NewIrql);
KEBUGCHECK (0);
ASSERT(FALSE);
}
Ke386SaveFlags(Flags);
_disable();
@ -138,7 +138,7 @@ KfLowerIrql (KIRQL NewIrql)
if (NewIrql > oldIrql)
{
DPRINT1 ("NewIrql %x CurrentIrql %x\n", NewIrql, oldIrql);
KEBUGCHECK (0);
ASSERT(FALSE);
}
HalpLowerIrql (NewIrql, FALSE);
}
@ -198,7 +198,7 @@ KfRaiseIrql (KIRQL NewIrql)
if (NewIrql < OldIrql)
{
DPRINT1 ("CurrentIrql %x NewIrql %x\n", KeGetCurrentIrql (), NewIrql);
KEBUGCHECK (0);
ASSERT(FALSE);
}
@ -301,14 +301,14 @@ HalBeginSystemInterrupt (KIRQL Irql,
if (KeGetCurrentIrql () >= Irql)
{
DPRINT1("current irql %d, new irql %d\n", KeGetCurrentIrql(), Irql);
KEBUGCHECK(0);
ASSERT(FALSE);
}
Ke386SaveFlags(Flags);
if (Flags & EFLAGS_INTERRUPT_MASK)
{
DPRINT1("HalBeginSystemInterrupt was called with interrupt's enabled\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
APICWrite (APIC_TPR, IRQL2TPR (Irql) & APIC_TPR_PRI);
*OldIrql = KeGetCurrentIrql ();
@ -330,7 +330,7 @@ HalEndSystemInterrupt (KIRQL Irql,
if (Flags & EFLAGS_INTERRUPT_MASK)
{
DPRINT1("HalEndSystemInterrupt was called with interrupt's enabled\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
APICSendEOI();
HalpLowerIrql (Irql, TRUE);
@ -394,7 +394,7 @@ HalRequestSoftwareInterrupt(IN KIRQL Request)
break;
default:
KEBUGCHECK(0);
ASSERT(FALSE);
}
}

View file

@ -31,7 +31,7 @@ HalInitializeProcessor(ULONG ProcessorNumber,
CPU = ThisCPU();
if (OnlineCPUs & (1 << CPU))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (ProcessorNumber == 0)
@ -70,7 +70,7 @@ HalAllProcessorsStarted (VOID)
}
if (CPUs > CPUCount)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
else if (CPUs == CPUCount)
{
@ -108,7 +108,7 @@ HalStartNextProcessor(
if (CPU >= CPUCount)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
DPRINT1("Attempting to boot CPU %d\n", CPU);

View file

@ -47,13 +47,13 @@ CcInitCacheZeroPage(VOID)
if (!NT_SUCCESS(Status))
{
DbgPrint("Can't allocate CcZeroPage.\n");
KEBUGCHECKCC;
KeBugCheck(CACHE_MANAGER);
}
Status = MiZeroPage(CcZeroPage);
if (!NT_SUCCESS(Status))
{
DbgPrint("Can't zero out CcZeroPage.\n");
KEBUGCHECKCC;
KeBugCheck(CACHE_MANAGER);
}
}

View file

@ -183,7 +183,7 @@ CcSetFileSizes (IN PFILE_OBJECT FileObject,
else
{
DPRINT1("Anyone has referenced a cache segment behind the new size.\n");
KEBUGCHECKCC;
KeBugCheck(CACHE_MANAGER);
}
}
}
@ -202,7 +202,7 @@ CcSetFileSizes (IN PFILE_OBJECT FileObject,
if (!NT_SUCCESS(Status))
{
DPRINT1("CcRosInternalFreeCacheSegment failed, status = %x\n", Status);
KEBUGCHECK(0);
KeBugCheck(CACHE_MANAGER);
}
}
}

View file

@ -485,7 +485,7 @@ CcRosMarkDirtyCacheSegment(PBCB Bcb, ULONG FileOffset)
CacheSeg = CcRosLookupCacheSegment(Bcb, FileOffset);
if (CacheSeg == NULL)
{
KEBUGCHECKCC;
KeBugCheck(CACHE_MANAGER);
}
if (!CacheSeg->Dirty)
{
@ -674,7 +674,7 @@ CcRosCreateCacheSegment(PBCB Bcb,
if (StartingOffset == 0xffffffff)
{
DPRINT1("Out of CacheSeg mapping space\n");
KEBUGCHECKCC;
KeBugCheck(CACHE_MANAGER);
}
current->BaseAddress = CiCacheSegMappingRegionBase + StartingOffset * PAGE_SIZE;
@ -700,7 +700,7 @@ CcRosCreateCacheSegment(PBCB Bcb,
MmUnlockAddressSpace(MmGetKernelAddressSpace());
if (!NT_SUCCESS(Status))
{
KEBUGCHECKCC;
KeBugCheck(CACHE_MANAGER);
}
#endif
@ -834,9 +834,9 @@ CcRosRequestCacheSegment(PBCB Bcb,
if ((FileOffset % Bcb->CacheSegmentSize) != 0)
{
CPRINT("Bad fileoffset %x should be multiple of %x",
DPRINT1("Bad fileoffset %x should be multiple of %x",
FileOffset, Bcb->CacheSegmentSize);
KEBUGCHECKCC;
KeBugCheck(CACHE_MANAGER);
}
return(CcRosGetCacheSegment(Bcb,
@ -1339,7 +1339,7 @@ CmLazyCloseThreadMain(PVOID Ignored)
if (!NT_SUCCESS(Status))
{
DbgPrint("LazyCloseThread: Wait failed\n");
KEBUGCHECKCC;
KeBugCheck(CACHE_MANAGER);
break;
}
if (LazyCloseThreadShouldTerminate)
@ -1401,7 +1401,7 @@ CcInitView(VOID)
MmUnlockAddressSpace(MmGetKernelAddressSpace());
if (!NT_SUCCESS(Status))
{
KEBUGCHECKCC;
KeBugCheck(CACHE_MANAGER);
}
Buffer = ExAllocatePool(NonPagedPool, CI_CACHESEG_MAPPING_REGION_SIZE / (PAGE_SIZE * 8));

View file

@ -43,7 +43,7 @@ CmpHiveRootSecurityDescriptor(VOID)
if (!(Sid[0]) || !(Sid[1]) || !(Sid[2]) || !(Sid[3]))
{
/* Bugcheck */
KEBUGCHECKEX(REGISTRY_ERROR, 11, 1, 0, 0);
KeBugCheckEx(REGISTRY_ERROR, 11, 1, 0, 0);
}
/* Phase 2: Initialize all SIDs */
@ -51,7 +51,7 @@ CmpHiveRootSecurityDescriptor(VOID)
Status |= RtlInitializeSid(Sid[1], &NtAuthority, 1);
Status |= RtlInitializeSid(Sid[2], &NtAuthority, 1);
Status |= RtlInitializeSid(Sid[3], &NtAuthority, 2);
if (!NT_SUCCESS(Status)) KEBUGCHECKEX(REGISTRY_ERROR, 11, 2, 0, 0);
if (!NT_SUCCESS(Status)) KeBugCheckEx(REGISTRY_ERROR, 11, 2, 0, 0);
/* Phase 2: Setup SID Sub Authorities */
*RtlSubAuthoritySid(Sid[0], 0) = SECURITY_WORLD_RID;
@ -78,18 +78,18 @@ CmpHiveRootSecurityDescriptor(VOID)
/* Phase 3: Allocate the ACL */
Acl = ExAllocatePoolWithTag(PagedPool, AclLength, TAG_CM);
if (!Acl) KEBUGCHECKEX(REGISTRY_ERROR, 11, 3, 0, 0);
if (!Acl) KeBugCheckEx(REGISTRY_ERROR, 11, 3, 0, 0);
/* Phase 4: Create the ACL */
Status = RtlCreateAcl(Acl, AclLength, ACL_REVISION);
if (!NT_SUCCESS(Status)) KEBUGCHECKEX(REGISTRY_ERROR, 11, 4, Status, 0);
if (!NT_SUCCESS(Status)) KeBugCheckEx(REGISTRY_ERROR, 11, 4, Status, 0);
/* Phase 5: Build the ACL */
Status = RtlAddAccessAllowedAce(Acl, ACL_REVISION, KEY_ALL_ACCESS, Sid[0]);
Status |= RtlAddAccessAllowedAce(Acl, ACL_REVISION, KEY_ALL_ACCESS, Sid[1]);
Status |= RtlAddAccessAllowedAce(Acl, ACL_REVISION, KEY_READ, Sid[2]);
Status |= RtlAddAccessAllowedAce(Acl, ACL_REVISION, KEY_READ, Sid[3]);
if (!NT_SUCCESS(Status)) KEBUGCHECKEX(REGISTRY_ERROR, 11, 5, Status, 0);
if (!NT_SUCCESS(Status)) KeBugCheckEx(REGISTRY_ERROR, 11, 5, Status, 0);
/* Phase 5: Make the ACEs inheritable */
Status = RtlGetAce(Acl, 0,( PVOID*)&AceHeader);
@ -110,7 +110,7 @@ CmpHiveRootSecurityDescriptor(VOID)
sizeof(SECURITY_DESCRIPTOR) +
AclLength,
TAG_CM);
if (!SecurityDescriptor) KEBUGCHECKEX(REGISTRY_ERROR, 11, 6, 0, 0);
if (!SecurityDescriptor) KeBugCheckEx(REGISTRY_ERROR, 11, 6, 0, 0);
/* Phase 6: Make a copy of the ACL */
AclCopy = (PACL)((PISECURITY_DESCRIPTOR)SecurityDescriptor + 1);
@ -119,14 +119,14 @@ CmpHiveRootSecurityDescriptor(VOID)
/* Phase 7: Create the security descriptor */
Status = RtlCreateSecurityDescriptor(SecurityDescriptor,
SECURITY_DESCRIPTOR_REVISION);
if (!NT_SUCCESS(Status)) KEBUGCHECKEX(REGISTRY_ERROR, 11, 7, Status, 0);
if (!NT_SUCCESS(Status)) KeBugCheckEx(REGISTRY_ERROR, 11, 7, Status, 0);
/* Phase 8: Set the ACL as a DACL */
Status = RtlSetDaclSecurityDescriptor(SecurityDescriptor,
TRUE,
AclCopy,
FALSE);
if (!NT_SUCCESS(Status)) KEBUGCHECKEX(REGISTRY_ERROR, 11, 8, Status, 0);
if (!NT_SUCCESS(Status)) KeBugCheckEx(REGISTRY_ERROR, 11, 8, Status, 0);
/* Free the SIDs and original ACL */
for (i = 0; i < 4; i++) ExFreePool(Sid[i]);

View file

@ -643,7 +643,7 @@ CmpInitializeSystemHive(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
if (!Buffer)
{
/* Fail */
KEBUGCHECKEX(BAD_SYSTEM_CONFIG_INFO, 3, 1, (ULONG_PTR)LoaderBlock, 0);
KeBugCheckEx(BAD_SYSTEM_CONFIG_INFO, 3, 1, (ULONG_PTR)LoaderBlock, 0);
}
/* Setup the unicode string */
@ -716,7 +716,7 @@ CmpInitializeSystemHive(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
if (CmpBootType & 4)
{
/* We're disabled, so bugcheck */
KEBUGCHECKEX(BAD_SYSTEM_CONFIG_INFO,
KeBugCheckEx(BAD_SYSTEM_CONFIG_INFO,
3,
3,
(ULONG_PTR)SystemHive,
@ -1346,7 +1346,7 @@ CmInitSystem1(VOID)
if (!NT_SUCCESS(Status))
{
/* Bugcheck */
KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 1, Status, 0);
KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 1, Status, 0);
}
/* Build the master hive */
@ -1363,14 +1363,14 @@ CmInitSystem1(VOID)
if (!NT_SUCCESS(Status))
{
/* Bugcheck */
KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 2, Status, 0);
KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 2, Status, 0);
}
/* Create the \REGISTRY key node */
if (!CmpCreateRegistryRoot())
{
/* Bugcheck */
KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 3, 0, 0);
KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 3, 0, 0);
}
/* Create the default security descriptor */
@ -1393,7 +1393,7 @@ CmInitSystem1(VOID)
if (!NT_SUCCESS(Status))
{
/* Bugcheck */
KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 5, Status, 0);
KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 5, Status, 0);
}
/* Close the handle */
@ -1416,7 +1416,7 @@ CmInitSystem1(VOID)
if (!NT_SUCCESS(Status))
{
/* Bugcheck */
KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 6, Status, 0);
KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 6, Status, 0);
}
/* Close the handle */
@ -1426,7 +1426,7 @@ CmInitSystem1(VOID)
if (!CmpInitializeSystemHive(KeLoaderBlock))
{
/* Bugcheck */
KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 7, 0, 0);
KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 7, 0, 0);
}
/* Create the 'CurrentControlSet' link. */
@ -1434,7 +1434,7 @@ CmInitSystem1(VOID)
if (!NT_SUCCESS(Status))
{
/* Bugcheck */
KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 8, Status, 0);
KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 8, Status, 0);
}
/* Create the hardware hive */
@ -1451,7 +1451,7 @@ CmInitSystem1(VOID)
if (!NT_SUCCESS(Status))
{
/* Bugcheck */
KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 11, Status, 0);
KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 11, Status, 0);
}
/* Add the hive to the hive list */
@ -1467,7 +1467,7 @@ CmInitSystem1(VOID)
if (!NT_SUCCESS(Status))
{
/* Bugcheck */
KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 12, Status, 0);
KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 12, Status, 0);
}
/* FIXME: Add to HiveList key */
@ -1480,7 +1480,7 @@ CmInitSystem1(VOID)
if (!NT_SUCCESS(Status))
{
/* Bugcheck */
KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 13, Status, 0);
KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 13, Status, 0);
}
/* Initialize machine-dependent information into the registry */
@ -1488,7 +1488,7 @@ CmInitSystem1(VOID)
if (!NT_SUCCESS(Status))
{
/* Bugcheck */
KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 14, Status, 0);
KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 14, Status, 0);
}
/* Initialize volatile registry settings */
@ -1496,7 +1496,7 @@ CmInitSystem1(VOID)
if (!NT_SUCCESS(Status))
{
/* Bugcheck */
KEBUGCHECKEX(CONFIG_INITIALIZATION_FAILED, 1, 15, Status, 0);
KeBugCheckEx(CONFIG_INITIALIZATION_FAILED, 1, 15, Status, 0);
}
/* Free the load options */

View file

@ -189,7 +189,7 @@ CmpValueToData(IN PHHIVE Hive,
{
/* Free the buffer and bugcheck */
ExFreePool(Buffer);
KEBUGCHECKEX(REGISTRY_ERROR, 8, 0, (ULONG_PTR)Hive, (ULONG_PTR)Value);
KeBugCheckEx(REGISTRY_ERROR, 8, 0, (ULONG_PTR)Hive, (ULONG_PTR)Value);
}
/* Otherwise, return the cell data */

View file

@ -712,7 +712,7 @@ DbgkpPostFakeThreadMessages(IN PEPROCESS Process,
{
/* We failed. FIXME: Handle this */
DPRINT1("Unhandled Dbgk codepath!\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/* Check if this was the first message */
@ -736,7 +736,7 @@ DbgkpPostFakeThreadMessages(IN PEPROCESS Process,
{
/* We failed. FIXME: Handle this */
DPRINT1("Unhandled Dbgk codepath!\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/* Make sure we have a first thread */

View file

@ -177,7 +177,7 @@ ExReferenceCallBackBlock(IN OUT PEX_CALLBACK CallBack)
/* FIXME: Race */
CallbackRoutineBlock = NULL;
DPRINT1("Unhandled callback race condition\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
else
{

View file

@ -661,7 +661,7 @@ ExpMoveFreeHandles(IN PHANDLE_TABLE HandleTable)
}
/* We are strict FIFO, we need to reverse the entries */
KEBUGCHECK(0);
ASSERT(FALSE);
return LastFree;
}
@ -958,7 +958,7 @@ ExDestroyHandleTable(IN PHANDLE_TABLE HandleTable,
if (DestroyHandleProcedure)
{
/* FIXME: */
KEBUGCHECK(0);
ASSERT(FALSE);
}
/* Free the handle table */

View file

@ -981,7 +981,7 @@ ExpInitializeExecutive(IN ULONG Cpu,
/* Now fill it in */
Status = RtlAnsiStringToUnicodeString(&NtSystemRoot, &AnsiPath, FALSE);
if (!NT_SUCCESS(Status)) KEBUGCHECK(SESSION3_INITIALIZATION_FAILED);
if (!NT_SUCCESS(Status)) KeBugCheck(SESSION3_INITIALIZATION_FAILED);
/* Setup bugcheck messages */
KiInitializeBugCheck();
@ -1002,7 +1002,7 @@ ExpInitializeExecutive(IN ULONG Cpu,
}
/* Initialize the executive at phase 0 */
if (!ExInitSystem()) KEBUGCHECK(PHASE0_INITIALIZATION_FAILED);
if (!ExInitSystem()) KeBugCheck(PHASE0_INITIALIZATION_FAILED);
/* Initialize the memory manager at phase 0 */
if (!MmInitSystem(0, LoaderBlock)) KeBugCheck(PHASE0_INITIALIZATION_FAILED);
@ -1203,16 +1203,16 @@ ExpInitializeExecutive(IN ULONG Cpu,
#endif
/* Create the Basic Object Manager Types to allow new Object Types */
if (!ObInitSystem()) KEBUGCHECK(OBJECT_INITIALIZATION_FAILED);
if (!ObInitSystem()) KeBugCheck(OBJECT_INITIALIZATION_FAILED);
/* Load basic Security for other Managers */
if (!SeInitSystem()) KEBUGCHECK(SECURITY_INITIALIZATION_FAILED);
if (!SeInitSystem()) KeBugCheck(SECURITY_INITIALIZATION_FAILED);
/* Initialize the Process Manager */
if (!PsInitSystem(LoaderBlock)) KEBUGCHECK(PROCESS_INITIALIZATION_FAILED);
if (!PsInitSystem(LoaderBlock)) KeBugCheck(PROCESS_INITIALIZATION_FAILED);
/* Initialize the PnP Manager */
if (!PpInitSystem()) KEBUGCHECK(PP0_INITIALIZATION_FAILED);
if (!PpInitSystem()) KeBugCheck(PP0_INITIALIZATION_FAILED);
/* Initialize the User-Mode Debugging Subsystem */
DbgkInitialize();
@ -1532,7 +1532,7 @@ Phase1InitializationDiscard(IN PVOID Context)
}
/* Initialize the SRM in Phase 1 */
if (!SeInitSystem()) KEBUGCHECK(SECURITY1_INITIALIZATION_FAILED);
if (!SeInitSystem()) KeBugCheck(SECURITY1_INITIALIZATION_FAILED);
/* Update the progress bar */
InbvUpdateProgressBar(10);

View file

@ -245,7 +245,7 @@ NtSetDefaultLocale(IN BOOLEAN UserProfile,
{
DPRINT1("TODO\n");
Status = STATUS_SUCCESS;
KEBUGCHECK(0);
ASSERT(FALSE);
}
else
{
@ -395,7 +395,7 @@ NtSetDefaultUILanguage(IN LANGID LanguageId)
{
/* FIXME */
DPRINT1("TODO\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/* Otherwise, call the internal routine */

View file

@ -185,7 +185,7 @@ ShutdownThreadMain(PVOID Context)
PKDPC Dpc = ExAllocatePool(NonPagedPool, sizeof(KDPC));
if (Dpc == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
KeInitializeDpc(Dpc, KiHaltProcessorDpcRoutine, (PVOID)Dpc);
KeSetTargetProcessorDpc(Dpc, i);
@ -245,7 +245,7 @@ NtShutdownSystem(IN SHUTDOWN_ACTION Action)
(PVOID)Action);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Status = ObReferenceObjectByHandle(ThreadHandle,
THREAD_ALL_ACCESS,
@ -256,7 +256,7 @@ NtShutdownSystem(IN SHUTDOWN_ACTION Action)
NtClose(ThreadHandle);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
KeSetPriorityThread(&ShutdownThread->Tcb, LOW_REALTIME_PRIORITY + 1);

View file

@ -177,7 +177,7 @@ ProcessLoop:
if (KeGetCurrentIrql() != PASSIVE_LEVEL)
{
/* It didn't, bugcheck! */
KEBUGCHECKEX(WORKER_THREAD_RETURNED_AT_BAD_IRQL,
KeBugCheckEx(WORKER_THREAD_RETURNED_AT_BAD_IRQL,
(ULONG_PTR)WorkItem->WorkerRoutine,
KeGetCurrentIrql(),
(ULONG_PTR)WorkItem->Parameter,
@ -188,7 +188,7 @@ ProcessLoop:
if (Thread->ActiveImpersonationInfo)
{
/* It didn't, bugcheck! */
KEBUGCHECKEX(IMPERSONATING_WORKER_THREAD,
KeBugCheckEx(IMPERSONATING_WORKER_THREAD,
(ULONG_PTR)WorkItem->WorkerRoutine,
(ULONG_PTR)WorkItem->Parameter,
(ULONG_PTR)WorkItem,
@ -628,7 +628,7 @@ ExQueueWorkItem(IN PWORK_QUEUE_ITEM WorkItem,
if ((ULONG_PTR)WorkItem->WorkerRoutine < MmUserProbeAddress)
{
/* Bugcheck the system */
KEBUGCHECKEX(WORKER_INVALID,
KeBugCheckEx(WORKER_INVALID,
1,
(ULONG_PTR)WorkItem,
(ULONG_PTR)WorkItem->WorkerRoutine,

View file

@ -301,13 +301,4 @@ NTSTATUS
NTAPI
CcTryToInitializeFileCache(PFILE_OBJECT FileObject);
/*
* Macro for generic cache manage bugchecking. Note that this macro assumes
* that the file name including extension is always longer than 4 characters.
*/
#define KEBUGCHECKCC \
KEBUGCHECKEX(CACHE_MANAGER, \
(*(ULONG*)(__FILE__ + sizeof(__FILE__) - 4) << 16) | \
(__LINE__ & 0xFFFF), 0, 0, 0)
#endif

View file

@ -113,7 +113,7 @@ ObpReferenceNameInfo(IN POBJECT_HEADER ObjectHeader)
{
/* FIXME: Unhandled*/
DbgPrint("OB: Unhandled path\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/* Return the name information */

View file

@ -1195,7 +1195,7 @@ IoGetRelatedDeviceObject(IN PFILE_OBJECT FileObject)
{
/* FIXME: Unhandled yet */
DPRINT1("FOEs not supported\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
}

View file

@ -819,7 +819,7 @@ IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY LdrEntry)
Status = IopCreateDeviceNode(IopRootDeviceNode, NULL, &ServiceName, &DeviceNode);
if (!NT_SUCCESS(Status))
{
CPRINT("Driver '%wZ' load failed, status (%x)\n", ModuleName, Status);
DPRINT1("Driver '%wZ' load failed, status (%x)\n", ModuleName, Status);
return(Status);
}
DeviceNode->ServiceName = ServiceName;

View file

@ -786,7 +786,7 @@ IopParseDevice(IN PVOID ParseObject,
else if (Status == STATUS_REPARSE)
{
/* FIXME: We don't handle this at all! */
KEBUGCHECK(0);
ASSERT(FALSE);
}
/* Get the owner of the File Object */
@ -1405,7 +1405,7 @@ IopCloseFile(IN PEPROCESS Process OPTIONAL,
if ((FileObject->LockOperation) && (SystemHandleCount != 1))
{
DPRINT1("We need to unlock this file!\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/* Make sure this is the last handle */

View file

@ -74,7 +74,7 @@ IoAcquireRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock,
{
/* FIXME: Not yet supported */
DPRINT1("UNIMPLEMENTED\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
else
@ -110,7 +110,7 @@ IoReleaseRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock,
{
/* FIXME: Not yet supported */
DPRINT1("UNIMPLEMENTED\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/* Decrement the lock count */
@ -150,7 +150,7 @@ IoReleaseRemoveLockAndWaitEx(IN PIO_REMOVE_LOCK RemoveLock,
{
/* FIXME: Not yet supported */
DPRINT1("UNIMPLEMENTED\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
}

View file

@ -140,7 +140,7 @@ IopDereferenceVpb(IN PVPB Vpb)
if (!Vpb->ReferenceCount)
{
/* FIXME: IMPLEMENT CLEANUP! */
KEBUGCHECK(0);
ASSERT(FALSE);
}
/* Release VPB lock */

View file

@ -937,7 +937,7 @@ IopAssignDeviceResources(
0x3c /* PCI_INTERRUPT_LINE */,
sizeof(UCHAR));
if (ret == 0 || ret == 2)
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
}
@ -2057,7 +2057,7 @@ IopActionInitChildServices(PDEVICE_NODE DeviceNode,
IopDeviceNodeSetFlag(DeviceNode, DNF_DISABLED);
IopDeviceNodeSetFlag(DeviceNode, DNF_START_FAILED);
/* FIXME: Log the error (possibly in IopInitializeDeviceNodeService) */
CPRINT("Initialization of service %S failed (Status %x)\n",
DPRINT1("Initialization of service %S failed (Status %x)\n",
DeviceNode->ServiceName.Buffer, Status);
}
}
@ -2846,8 +2846,8 @@ PnpInit(VOID)
Status = IopInitPlugPlayEvents();
if (!NT_SUCCESS(Status))
{
CPRINT("IopInitPlugPlayEvents() failed\n");
KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
DPRINT1("IopInitPlugPlayEvents() failed\n");
KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
}
/*
@ -2857,30 +2857,30 @@ PnpInit(VOID)
Status = IopCreateDriver(NULL, PnpDriverInitializeEmpty, NULL, 0, 0, &IopRootDriverObject);
if (!NT_SUCCESS(Status))
{
CPRINT("IoCreateDriverObject() failed\n");
KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
DPRINT1("IoCreateDriverObject() failed\n");
KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
}
Status = IoCreateDevice(IopRootDriverObject, 0, NULL, FILE_DEVICE_CONTROLLER,
0, FALSE, &Pdo);
if (!NT_SUCCESS(Status))
{
CPRINT("IoCreateDevice() failed\n");
KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
DPRINT1("IoCreateDevice() failed\n");
KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
}
Status = IopCreateDeviceNode(NULL, Pdo, NULL, &IopRootDeviceNode);
if (!NT_SUCCESS(Status))
{
CPRINT("Insufficient resources\n");
KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
DPRINT1("Insufficient resources\n");
KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
}
if (!RtlCreateUnicodeString(&IopRootDeviceNode->InstancePath,
L"HTREE\\ROOT\\0"))
{
CPRINT("Failed to create the instance path!\n");
KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, STATUS_NO_MEMORY, 0, 0, 0);
DPRINT1("Failed to create the instance path!\n");
KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, STATUS_NO_MEMORY, 0, 0, 0);
}
/* Report the device to the user-mode pnp manager */
@ -2898,8 +2898,8 @@ PnpInit(VOID)
Status = IopUpdateRootKey();
if (!NT_SUCCESS(Status))
{
CPRINT("IopUpdateRootKey() failed\n");
KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
DPRINT1("IopUpdateRootKey() failed\n");
KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
}
}
@ -2910,7 +2910,7 @@ PiCompareInstancePath(IN PRTL_AVL_TABLE Table,
IN PVOID SecondStruct)
{
/* FIXME: TODO */
KEBUGCHECK(0);
ASSERT(FALSE);
return 0;
}
@ -2925,7 +2925,7 @@ PiAllocateGenericTableEntry(IN PRTL_AVL_TABLE Table,
IN CLONG ByteSize)
{
/* FIXME: TODO */
KEBUGCHECK(0);
ASSERT(FALSE);
return NULL;
}
@ -2935,7 +2935,7 @@ PiFreeGenericTableEntry(IN PRTL_AVL_TABLE Table,
IN PVOID Buffer)
{
/* FIXME: TODO */
KEBUGCHECK(0);
ASSERT(FALSE);
}
VOID

View file

@ -1076,7 +1076,7 @@ PnpRootAddDevice(
{
DPRINT("PhysicalDeviceObject 0x%p\n", PhysicalDeviceObject);
Status = STATUS_INSUFFICIENT_RESOURCES;
KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
}
Status = IoCreateDevice(
@ -1090,7 +1090,7 @@ PnpRootAddDevice(
if (!NT_SUCCESS(Status))
{
DPRINT("IoCreateDevice() failed with status 0x%08lx\n", Status);
KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
}
DPRINT("Created FDO %p\n", PnpRootDeviceObject);
@ -1110,7 +1110,7 @@ PnpRootAddDevice(
if (!NT_SUCCESS(Status))
{
DPRINT("IoAttachDeviceToDeviceStackSafe() failed with status 0x%08lx\n", Status);
KEBUGCHECKEX(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
KeBugCheckEx(PHASE1_INITIALIZATION_FAILED, Status, 0, 0, 0);
}
PnpRootDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING;

View file

@ -59,7 +59,7 @@ KdpServiceDispatcher(ULONG Service,
break;
case ManualBugCheck:
KEBUGCHECK(MANUALLY_INITIATED_CRASH);
KeBugCheck(MANUALLY_INITIATED_CRASH);
break;
case DumpNonPagedPoolStats:

View file

@ -1331,7 +1331,7 @@ KdbEnterDebuggerException(
BreakPoint->Data.SavedInstruction, NULL)))
{
KdbpPrint("Couldn't restore original instruction after INT3! Cannot continue execution.\n");
KEBUGCHECK(0);
KeBugCheck(0); // FIXME: Proper bugcode!
}
}

View file

@ -1689,7 +1689,7 @@ KdbpCmdTss(ULONG Argc, PCHAR Argv[])
STATIC BOOLEAN
KdbpCmdBugCheck(ULONG Argc, PCHAR Argv[])
{
KEBUGCHECK(0xDEADDEAD);
KeBugCheck(0xDEADDEAD);
return TRUE;
}

View file

@ -478,7 +478,7 @@ Quickie:
if (Process != Thread->ApcState.Process)
{
/* Erm, we got attached or something! BAD! */
KEBUGCHECKEX(INVALID_PROCESS_ATTACH_ATTEMPT,
KeBugCheckEx(INVALID_PROCESS_ATTACH_ATTEMPT,
(ULONG_PTR)Process,
(ULONG_PTR)Thread->ApcState.Process,
Thread->ApcStateIndex,

View file

@ -76,7 +76,7 @@ KeSetSystemTime(IN PLARGE_INTEGER NewTime,
KeLowerIrql(OldIrql2);
/* Check if we need to adjust interrupt time */
if (FixInterruptTime) KEBUGCHECK(0);
if (FixInterruptTime) ASSERT(FALSE);
/* Setup a temporary list of absolute timers */
InitializeListHead(&TempList);

View file

@ -73,7 +73,7 @@ NTAPI
KiRosGetMdFromArray(VOID)
{
/* Return the next MD from the list, but make sure we don't overflow */
if (BldrCurrentMd > 60) KEBUGCHECK(0);
if (BldrCurrentMd > 60) ASSERT(FALSE);
return &BldrMemoryDescriptors[BldrCurrentMd++];
}

View file

@ -294,7 +294,7 @@ KiInitMachineDependent(VOID)
if (KiMXCsrMask != MXCsrMask)
{
/* No, something is definitely wrong */
KEBUGCHECKEX(MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED,
KeBugCheckEx(MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED,
KF_FXSR,
KiMXCsrMask,
MXCsrMask,

View file

@ -116,7 +116,7 @@ KiInitializeUserApc(IN PKEXCEPTION_FRAME ExceptionFrame,
TrapFrame->EFlags = Ke386SanitizeFlags(Context.EFlags, UserMode);
/* Check if thread has IOPL and force it enabled if so */
if (KeGetCurrentThread()->Iopl) TrapFrame->EFlags |= 0x3000;
if (KeGetCurrentThread()->Iopl) TrapFrame->EFlags |= EFLAGS_IOPL;
/* Setup the stack */
*(PULONG_PTR)(Stack + 0 * sizeof(ULONG_PTR)) = (ULONG_PTR)NormalRoutine;

View file

@ -104,7 +104,7 @@ KiDispatchException(IN PEXCEPTION_RECORD ExceptionRecord,
DbgPrint("EXCEPTION! Record %08x Frame %08x\n",
ExceptionRecord, ExceptionFrame);
MmuDumpMap();
KEBUGCHECK(0);
KeBugCheck(0);
}
/*

View file

@ -458,7 +458,7 @@ KeAttachProcess(IN PKPROCESS Process)
(KeIsExecutingDpc()))
{
/* Invalid attempt */
KEBUGCHECKEX(INVALID_PROCESS_ATTACH_ATTEMPT,
KeBugCheckEx(INVALID_PROCESS_ATTACH_ATTEMPT,
(ULONG_PTR)Process,
(ULONG_PTR)Thread->ApcState.Process,
Thread->ApcStateIndex,
@ -580,7 +580,7 @@ KeStackAttachProcess(IN PKPROCESS Process,
if (KeIsExecutingDpc())
{
/* Executing a DPC, crash! */
KEBUGCHECKEX(INVALID_PROCESS_ATTACH_ATTEMPT,
KeBugCheckEx(INVALID_PROCESS_ATTACH_ATTEMPT,
(ULONG_PTR)Process,
(ULONG_PTR)Thread->ApcState.Process,
Thread->ApcStateIndex,
@ -662,7 +662,7 @@ KeUnstackDetachProcess(IN PRKAPC_STATE ApcState)
(!IsListEmpty(&Thread->ApcState.ApcListHead[UserMode])))
{
/* Bugcheck the system */
KEBUGCHECK(INVALID_PROCESS_DETACH_ATTEMPT);
KeBugCheck(INVALID_PROCESS_DETACH_ATTEMPT);
}
/* Get the process */

View file

@ -378,7 +378,7 @@ KiReadyThread(IN PKTHREAD Thread)
if (Process->State != ProcessInMemory)
{
/* We don't page out processes in ROS */
KEBUGCHECK(0);
ASSERT(FALSE);
}
else if (!Thread->KernelStackResident)
{
@ -391,7 +391,7 @@ KiReadyThread(IN PKTHREAD Thread)
Thread->State = Transition;
/* The stack is always resident in ROS */
KEBUGCHECK(0);
ASSERT(FALSE);
}
else
{
@ -610,7 +610,7 @@ KiSetPriorityThread(IN PKTHREAD Thread,
{
/* FIXME: TODO */
DPRINT1("Deferred state not yet supported\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
else
{

View file

@ -520,7 +520,7 @@ KeWaitForMultipleObjects(IN ULONG Count,
if (Count > THREAD_WAIT_OBJECTS)
{
/* Bugcheck */
KEBUGCHECK(MAXIMUM_WAIT_OBJECTS_EXCEEDED);
KeBugCheck(MAXIMUM_WAIT_OBJECTS_EXCEEDED);
}
/* Use the Thread's Wait Block */
@ -532,7 +532,7 @@ KeWaitForMultipleObjects(IN ULONG Count,
if (Count > MAXIMUM_WAIT_OBJECTS)
{
/* Bugcheck */
KEBUGCHECK(MAXIMUM_WAIT_OBJECTS_EXCEEDED);
KeBugCheck(MAXIMUM_WAIT_OBJECTS_EXCEEDED);
}
}

View file

@ -40,7 +40,7 @@ LpcExitThread(IN PETHREAD Thread)
if (Message)
{
/* FIXME: TODO */
KEBUGCHECK(0);
ASSERT(FALSE);
}
/* Release the lock */

View file

@ -163,7 +163,7 @@ MmPageOutVirtualMemory(PMM_AVL_TABLE AddressSpace,
if (Page == 0)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
@ -301,7 +301,7 @@ MmNotPresentFaultVirtualMemory(PMM_AVL_TABLE AddressSpace,
if (PageOp == NULL)
{
DPRINT1("MmGetPageOp failed");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
@ -322,12 +322,12 @@ MmNotPresentFaultVirtualMemory(PMM_AVL_TABLE AddressSpace,
if (Status != STATUS_SUCCESS)
{
DPRINT1("Failed to wait for page op\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (PageOp->Status == STATUS_PENDING)
{
DPRINT1("Woke for page op before completion\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
* If this wasn't a pagein then we need to restart the handling
@ -373,7 +373,7 @@ MmNotPresentFaultVirtualMemory(PMM_AVL_TABLE AddressSpace,
if (!NT_SUCCESS(Status))
{
DPRINT1("MmRequestPageMemoryConsumer failed, status = %x\n", Status);
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
@ -387,7 +387,7 @@ MmNotPresentFaultVirtualMemory(PMM_AVL_TABLE AddressSpace,
Status = MmReadFromSwapPage(SwapEntry, Page);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmSetSavedSwapEntryPage(Page, SwapEntry);
}
@ -414,7 +414,7 @@ MmNotPresentFaultVirtualMemory(PMM_AVL_TABLE AddressSpace,
if (!NT_SUCCESS(Status))
{
DPRINT1("MmCreateVirtualMapping failed, not out of memory\n");
KEBUGCHECK(0);
ASSERT(FALSE);
return(Status);
}
@ -870,7 +870,7 @@ MmFreeVirtualMemory(PEPROCESS Process,
if (Status != STATUS_SUCCESS)
{
DPRINT1("Failed to wait for page op\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmLockAddressSpace(&Process->VadRoot);
MmReleasePageOp(PageOp);

View file

@ -97,7 +97,7 @@ MmReleasePageMemoryConsumer(ULONG Consumer, PFN_TYPE Page)
if (Page == 0)
{
DPRINT1("Tried to release page zero.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
KeAcquireSpinLock(&AllocationListLock, &oldIrql);
@ -169,7 +169,7 @@ MmRebalanceMemoryConsumers(VOID)
Status = MiMemoryConsumers[i].Trim(Target, 0, &NrFreedPages);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Target = Target - NrFreedPages;
}
@ -215,7 +215,7 @@ MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait,
Page = MmAllocPage(Consumer, 0);
if (Page == 0)
{
KEBUGCHECK(NO_PAGES_AVAILABLE);
KeBugCheck(NO_PAGES_AVAILABLE);
}
*AllocatedPage = Page;
if (MmStats.NrFreePages <= MiMinimumAvailablePages &&
@ -263,7 +263,7 @@ MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait,
Page = Request.Page;
if (Page == 0)
{
KEBUGCHECK(NO_PAGES_AVAILABLE);
KeBugCheck(NO_PAGES_AVAILABLE);
}
/* Update the Consumer */
MiGetPfnEntry(Page)->Flags.Consumer = Consumer;
@ -279,7 +279,7 @@ MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait,
Page = MmAllocPage(Consumer, 0);
if (Page == 0)
{
KEBUGCHECK(NO_PAGES_AVAILABLE);
KeBugCheck(NO_PAGES_AVAILABLE);
}
if(Consumer == MC_USER) MmInsertLRULastUserPage(Page);
*AllocatedPage = Page;
@ -327,7 +327,7 @@ MiBalancerThread(PVOID Unused)
Status = MiMemoryConsumers[i].Trim(MiMinimumPagesPerRun, 0, &NrFreedPages);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
}
@ -359,7 +359,7 @@ MiBalancerThread(PVOID Unused)
Status = MiMemoryConsumers[i].Trim(Target, 0, &NrFreedPages);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
}
@ -368,7 +368,7 @@ MiBalancerThread(PVOID Unused)
else
{
DPRINT1("KeWaitForMultipleObjects failed, status = %x\n", Status);
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
}
@ -409,7 +409,7 @@ MiInitBalancerThread(VOID)
NULL);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Priority = LOW_REALTIME_PRIORITY + 1;

View file

@ -270,7 +270,7 @@ MmInitializePageList(VOID)
if (!NT_SUCCESS(Status))
{
DPRINT1("Unable to create virtual mapping\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
else
@ -416,7 +416,7 @@ MmMarkPageMapped(PFN_TYPE Pfn)
if (Page->Flags.Type == MM_PHYSICAL_PAGE_FREE)
{
DPRINT1("Mapping non-used page\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
Page->MapCount++;
Page->ReferenceCount++;
@ -438,12 +438,12 @@ MmMarkPageUnmapped(PFN_TYPE Pfn)
if (Page->Flags.Type == MM_PHYSICAL_PAGE_FREE)
{
DPRINT1("Unmapping non-used page\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Page->MapCount == 0)
{
DPRINT1("Unmapping not mapped page\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
Page->MapCount--;
Page->ReferenceCount--;
@ -511,7 +511,7 @@ MmReferencePageUnsafe(PFN_TYPE Pfn)
if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED)
{
DPRINT1("Referencing non-used page\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
Page->ReferenceCount++;
@ -542,7 +542,7 @@ MmGetReferenceCountPage(PFN_TYPE Pfn)
if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED)
{
DPRINT1("Getting reference count for free page\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
RCount = Page->ReferenceCount;
@ -577,12 +577,12 @@ MmDereferencePage(PFN_TYPE Pfn)
if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED)
{
DPRINT1("Dereferencing free page\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Page->ReferenceCount == 0)
{
DPRINT1("Derefrencing page with reference count 0\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
Page->ReferenceCount--;
@ -594,29 +594,29 @@ MmDereferencePage(PFN_TYPE Pfn)
if (Page->RmapListHead != NULL)
{
DPRINT1("Freeing page with rmap entries.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Page->MapCount != 0)
{
DPRINT1("Freeing mapped page (0x%x count %d)\n",
Pfn << PAGE_SHIFT, Page->MapCount);
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Page->LockCount > 0)
{
DPRINT1("Freeing locked page\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Page->SavedSwapEntry != 0)
{
DPRINT1("Freeing page with swap entry.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED)
{
DPRINT1("Freeing page with flags %x\n",
Page->Flags.Type);
KEBUGCHECK(0);
ASSERT(FALSE);
}
Page->Flags.Type = MM_PHYSICAL_PAGE_FREE;
Page->Flags.Consumer = MC_MAXIMUM;
@ -647,7 +647,7 @@ MmGetLockCountPage(PFN_TYPE Pfn)
if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED)
{
DPRINT1("Getting lock count for free page\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
LockCount = Page->LockCount;
@ -671,7 +671,7 @@ MmLockPageUnsafe(PFN_TYPE Pfn)
if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED)
{
DPRINT1("Locking free page\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
Page->LockCount++;
@ -702,7 +702,7 @@ MmUnlockPage(PFN_TYPE Pfn)
if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED)
{
DPRINT1("Unlocking free page\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
Page->LockCount--;
@ -757,17 +757,17 @@ MmAllocPage(ULONG Consumer, SWAPENTRY SavedSwapEntry)
if (PageDescriptor->Flags.Type != MM_PHYSICAL_PAGE_FREE)
{
DPRINT1("Got non-free page from freelist\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (PageDescriptor->MapCount != 0)
{
DPRINT1("Got mapped page from freelist\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (PageDescriptor->ReferenceCount != 0)
{
DPRINT1("%d\n", PageDescriptor->ReferenceCount);
KEBUGCHECK(0);
ASSERT(FALSE);
}
PageDescriptor->Flags.Type = MM_PHYSICAL_PAGE_USED;
PageDescriptor->Flags.Consumer = Consumer;
@ -789,7 +789,7 @@ MmAllocPage(ULONG Consumer, SWAPENTRY SavedSwapEntry)
if (PageDescriptor->MapCount != 0)
{
DPRINT1("Returning mapped page.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
return PfnOffset;
}
@ -970,7 +970,7 @@ MmZeroPageThreadMain(PVOID Ignored)
if (!NT_SUCCESS(Status))
{
DPRINT1("ZeroPageThread: Wait failed\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (ZeroPageThreadShouldTerminate)
@ -995,7 +995,7 @@ MmZeroPageThreadMain(PVOID Ignored)
if (PageDescriptor->MapCount != 0)
{
DPRINT1("Mapped page on freelist.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
PageDescriptor->Flags.Zero = 1;
PageDescriptor->Flags.Type = MM_PHYSICAL_PAGE_FREE;

View file

@ -97,7 +97,7 @@ ProtectToPTE(ULONG flProtect)
else
{
DPRINT1("Unknown main protection type.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (flProtect & PAGE_SYSTEM)
@ -241,7 +241,7 @@ MmDeletePageTable(PEPROCESS Process, PVOID Address)
if (Address >= MmSystemRangeStart)
{
KEBUGCHECK(0);
ASSERT(FALSE);
// MmGlobalKernelPageDirectory[ADDR_TO_PDE_OFFSET(Address)] = 0;
}
if (Process != NULL && Process != CurrentProcess)
@ -264,7 +264,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create)
PageDir = MmCreateHyperspaceMapping(PTE_TO_PFN(Process->Pcb.DirectoryTableBase[0]));
if (PageDir == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (0 == InterlockedCompareExchangePte(&PageDir[PdeOffset], 0, 0))
{
@ -276,7 +276,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create)
Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn);
if (!NT_SUCCESS(Status) || Pfn == 0)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Entry = InterlockedCompareExchangePte(&PageDir[PdeOffset], PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE | PA_USER, 0);
if (Entry != 0)
@ -293,7 +293,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create)
Pt = MmCreateHyperspaceMapping(Pfn);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
return Pt + ADDR_TO_PTE_OFFSET(Address);
}
@ -311,7 +311,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create)
Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn);
if (!NT_SUCCESS(Status) || Pfn == 0)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Entry = PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE;
if (Ke386GlobalPagesEnabled)
@ -334,7 +334,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create)
Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn);
if (!NT_SUCCESS(Status) || Pfn == 0)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Entry = InterlockedCompareExchangePte(PageDir, PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE | PA_USER, 0);
if (Entry != 0)
@ -403,7 +403,7 @@ MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPF
Pt = MmGetPageTableForProcess(Process, Address, FALSE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
* Atomically disable the present bit and get the old value.
@ -417,7 +417,7 @@ MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPF
WasValid = (PAGE_MASK(Pte) != 0);
if (!WasValid)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
@ -582,14 +582,14 @@ MmSetCleanPage(PEPROCESS Process, PVOID Address)
if (Address < MmSystemRangeStart && Process == NULL)
{
DPRINT1("MmSetCleanPage is called for user space without a process.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
Pt = MmGetPageTableForProcess(Process, Address, FALSE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
do
@ -617,13 +617,13 @@ MmSetDirtyPage(PEPROCESS Process, PVOID Address)
if (Address < MmSystemRangeStart && Process == NULL)
{
DPRINT1("MmSetDirtyPage is called for user space without a process.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
Pt = MmGetPageTableForProcess(Process, Address, FALSE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
do
@ -650,7 +650,7 @@ MmEnableVirtualMapping(PEPROCESS Process, PVOID Address)
Pt = MmGetPageTableForProcess(Process, Address, FALSE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
do
@ -704,7 +704,7 @@ MmCreateVirtualMappingForKernel(PVOID Address,
if (Address < MmSystemRangeStart)
{
DPRINT1("MmCreateVirtualMappingForKernel is called for user space\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
Attributes = ProtectToPTE(flProtect);
@ -724,7 +724,7 @@ MmCreateVirtualMappingForKernel(PVOID Address,
Pt = MmGetPageTableForProcess(NULL, Addr, TRUE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Pt--;
@ -735,7 +735,7 @@ MmCreateVirtualMappingForKernel(PVOID Address,
DPRINT1("Setting physical address but not allowing access at address "
"0x%.8X with attributes %x/%x.\n",
Addr, Attributes, flProtect);
KEBUGCHECK(0);
ASSERT(FALSE);
}
PdeOffset = ADDR_TO_PDE_OFFSET(Addr);
@ -744,7 +744,7 @@ MmCreateVirtualMappingForKernel(PVOID Address,
Pt = MmGetPageTableForProcess(NULL, Addr, TRUE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
else
@ -756,7 +756,7 @@ MmCreateVirtualMappingForKernel(PVOID Address,
Pte = *Pt;
if (Pte != 0)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
InterlockedExchangePte(Pt, PFN_TO_PTE(Pages[i]) | Attributes);
}
@ -776,22 +776,22 @@ MmCreatePageFileMapping(PEPROCESS Process,
if (Process == NULL && Address < MmSystemRangeStart)
{
DPRINT1("No process\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Process != NULL && Address >= MmSystemRangeStart)
{
DPRINT1("Setting kernel address with process context\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (SwapEntry & (1 << 31))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Pt = MmGetPageTableForProcess(Process, Address, TRUE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Pte = *Pt;
if (PAGE_MASK((Pte)) != 0)
@ -836,13 +836,13 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
if (Address < MmSystemRangeStart)
{
DPRINT1("No process\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (PageCount > 0x10000 ||
(ULONG_PTR) Address / PAGE_SIZE + PageCount > 0x100000)
{
DPRINT1("Page count to large\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
else
@ -850,14 +850,14 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
if (Address >= MmSystemRangeStart)
{
DPRINT1("Setting kernel address with process context\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (PageCount > (ULONG_PTR)MmSystemRangeStart / PAGE_SIZE ||
(ULONG_PTR) Address / PAGE_SIZE + PageCount >
(ULONG_PTR)MmSystemRangeStart / PAGE_SIZE)
{
DPRINT1("Page Count to large\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
@ -889,7 +889,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
DPRINT1("Setting physical address but not allowing access at address "
"0x%.8X with attributes %x/%x.\n",
Addr, Attributes, flProtect);
KEBUGCHECK(0);
ASSERT(FALSE);
}
PdeOffset = ADDR_TO_PDE_OFFSET(Addr);
if (oldPdeOffset != PdeOffset)
@ -898,7 +898,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
Pt = MmGetPageTableForProcess(Process, Addr, TRUE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
else
@ -911,7 +911,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
MmMarkPageMapped(Pages[i]);
if (PAGE_MASK((Pte)) != 0 && !((Pte) & PA_PRESENT))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (PAGE_MASK((Pte)) != 0)
{
@ -950,7 +950,7 @@ MmCreateVirtualMapping(PEPROCESS Process,
if (!MmIsPageInUse(Pages[i]))
{
DPRINT1("Page at address %x not in use\n", PFN_TO_PTE(Pages[i]));
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
@ -1035,7 +1035,7 @@ MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect)
Pt = MmGetPageTableForProcess(Process, Address, FALSE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
InterlockedExchangePte(Pt, PAGE_MASK(*Pt) | Attributes | (*Pt & (PA_ACCESSED|PA_DIRTY)));
MiFlushTlb(Pt, Address);
@ -1099,7 +1099,7 @@ MmCreateHyperspaceMapping(PFN_TYPE Page)
}
if (i >= Page % 1024)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
}
@ -1124,7 +1124,7 @@ MmCreateHyperspaceMapping(PFN_TYPE Page)
}
if (i <= Page % 1024)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
}
@ -1158,7 +1158,7 @@ MmUpdatePageDir(PEPROCESS Process, PVOID Address, ULONG Size)
if (Address < MmSystemRangeStart)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
StartOffset = ADDR_TO_PDE_OFFSET(Address);
@ -1237,7 +1237,7 @@ MiInitPageDirectoryMap(VOID)
BoundaryAddressMultiple);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
BaseAddress = (PVOID)HYPERSPACE;
Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
@ -1251,7 +1251,7 @@ MiInitPageDirectoryMap(VOID)
BoundaryAddressMultiple);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}

View file

@ -145,7 +145,7 @@ ProtectToPTE(ULONG flProtect)
else
{
DPRINT1("Unknown main protection type.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Ke386NoExecute &&
!(flProtect & PAGE_IS_EXECUTABLE))
@ -444,7 +444,7 @@ MmDeletePageTable(PEPROCESS Process, PVOID Address)
}
if (Address >= MmSystemRangeStart)
{
KEBUGCHECK(0);
ASSERT(FALSE);
// MmGlobalKernelPageDirectory[ADDR_TO_PDE_OFFSET(Address)] = 0;
}
if (Process != NULL && Process != CurrentProcess)
@ -477,7 +477,7 @@ MmFreePageTable(PEPROCESS Process, PVOID Address)
{
DbgPrint("Page table entry not clear at %x/%x (is %I64x)\n",
((ULONG)Address / (4*1024*1024)), i, PageTable[i]);
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
Pfn = PAE_PTE_TO_PFN(*(PAE_ADDR_TO_PDE(Address)));
@ -494,7 +494,7 @@ MmFreePageTable(PEPROCESS Process, PVOID Address)
{
DbgPrint("Page table entry not clear at %x/%x (is %x)\n",
((ULONG)Address / (4*1024*1024)), i, PageTable[i]);
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
Pfn = PTE_TO_PFN(*(ADDR_TO_PDE(Address)));
@ -505,7 +505,7 @@ MmFreePageTable(PEPROCESS Process, PVOID Address)
if (Address >= MmSystemRangeStart)
{
// MmGlobalKernelPageDirectory[ADDR_TO_PDE_OFFSET(Address)] = 0;
KEBUGCHECK(0);
ASSERT(FALSE);
}
else
{
@ -532,20 +532,20 @@ MmGetPageTableForProcessForPAE(PEPROCESS Process, PVOID Address, BOOLEAN Create)
Process, Address, Create);
if (Address >= (PVOID)PAGETABLE_MAP && Address < (PVOID)((ULONG_PTR)PAGETABLE_MAP + 0x800000))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Address < MmSystemRangeStart && Process && Process != PsGetCurrentProcess())
{
PageDirTable = MmCreateHyperspaceMapping(PAE_PTE_TO_PFN(Process->Pcb.DirectoryTableBase.QuadPart));
if (PageDirTable == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
PageDir = MmCreateHyperspaceMapping(PAE_PTE_TO_PFN(PageDirTable[PAE_ADDR_TO_PDTE_OFFSET(Address)]));
MmDeleteHyperspaceMapping(PageDirTable);
if (PageDir == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
PageDir += PAE_ADDR_TO_PDE_PAGE_OFFSET(Address);
Entry = ExfInterlockedCompareExchange64UL(PageDir, &ZeroEntry, &ZeroEntry);
@ -559,7 +559,7 @@ MmGetPageTableForProcessForPAE(PEPROCESS Process, PVOID Address, BOOLEAN Create)
Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Entry = PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE | PA_USER;
Entry = ExfInterlockedCompareExchange64UL(PageDir, &Entry, &ZeroEntry);
@ -577,7 +577,7 @@ MmGetPageTableForProcessForPAE(PEPROCESS Process, PVOID Address, BOOLEAN Create)
Pt = MmCreateHyperspaceMapping(Pfn);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
return Pt + PAE_ADDR_TO_PTE_OFFSET(Address);
}
@ -595,7 +595,7 @@ MmGetPageTableForProcessForPAE(PEPROCESS Process, PVOID Address, BOOLEAN Create)
Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Entry = PAE_PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE;
if (Ke386GlobalPagesEnabled)
@ -618,7 +618,7 @@ MmGetPageTableForProcessForPAE(PEPROCESS Process, PVOID Address, BOOLEAN Create)
Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Entry = PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE | PA_USER;
Entry = ExfInterlockedCompareExchange64UL(PageDir, &Entry, &ZeroEntry);
@ -645,7 +645,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create)
PageDir = MmCreateHyperspaceMapping(PTE_TO_PFN(Process->Pcb.DirectoryTableBase.LowPart));
if (PageDir == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (0 == InterlockedCompareExchangeUL(&PageDir[PdeOffset], 0, 0))
{
@ -657,7 +657,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create)
Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn);
if (!NT_SUCCESS(Status) || Pfn == 0)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Entry = InterlockedCompareExchangeUL(&PageDir[PdeOffset], PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE | PA_USER, 0);
if (Entry != 0)
@ -674,7 +674,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create)
Pt = MmCreateHyperspaceMapping(Pfn);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
return Pt + ADDR_TO_PTE_OFFSET(Address);
}
@ -692,7 +692,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create)
Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn);
if (!NT_SUCCESS(Status) || Pfn == 0)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Entry = PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE;
if (Ke386GlobalPagesEnabled)
@ -715,7 +715,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create)
Status = MmRequestPageMemoryConsumer(MC_NPPOOL, FALSE, &Pfn);
if (!NT_SUCCESS(Status) || Pfn == 0)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Entry = InterlockedCompareExchangeUL(PageDir, PFN_TO_PTE(Pfn) | PA_PRESENT | PA_READWRITE | PA_USER, 0);
if (Entry != 0)
@ -825,7 +825,7 @@ MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPF
Pt = MmGetPageTableForProcessForPAE(Process, Address, FALSE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
* Atomically disable the present bit and get the old value.
@ -840,7 +840,7 @@ MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPF
WasValid = PAE_PAGE_MASK(Pte) != 0LL ? TRUE : FALSE;
if (!WasValid)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
@ -863,7 +863,7 @@ MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPF
Pt = MmGetPageTableForProcess(Process, Address, FALSE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
* Atomically disable the present bit and get the old value.
@ -877,7 +877,7 @@ MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPF
WasValid = (PAGE_MASK(Pte) != 0);
if (!WasValid)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
@ -1232,7 +1232,7 @@ MmIsAccessedAndResetAccessPage(PEPROCESS Process, PVOID Address)
if (Address < MmSystemRangeStart && Process == NULL)
{
DPRINT1("MmIsAccessedAndResetAccessPage is called for user space without a process.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Ke386Pae)
{
@ -1243,7 +1243,7 @@ MmIsAccessedAndResetAccessPage(PEPROCESS Process, PVOID Address)
Pt = MmGetPageTableForProcessForPAE(Process, Address, FALSE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
do
@ -1271,7 +1271,7 @@ MmIsAccessedAndResetAccessPage(PEPROCESS Process, PVOID Address)
Pt = MmGetPageTableForProcess(Process, Address, FALSE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
do
@ -1299,7 +1299,7 @@ MmSetCleanPage(PEPROCESS Process, PVOID Address)
if (Address < MmSystemRangeStart && Process == NULL)
{
DPRINT1("MmSetCleanPage is called for user space without a process.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Ke386Pae)
{
@ -1311,7 +1311,7 @@ MmSetCleanPage(PEPROCESS Process, PVOID Address)
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
do
@ -1338,7 +1338,7 @@ MmSetCleanPage(PEPROCESS Process, PVOID Address)
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
do
@ -1364,7 +1364,7 @@ MmSetDirtyPage(PEPROCESS Process, PVOID Address)
if (Address < MmSystemRangeStart && Process == NULL)
{
DPRINT1("MmSetDirtyPage is called for user space without a process.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Ke386Pae)
{
@ -1375,7 +1375,7 @@ MmSetDirtyPage(PEPROCESS Process, PVOID Address)
Pt = MmGetPageTableForProcessForPAE(Process, Address, FALSE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
do
@ -1400,7 +1400,7 @@ MmSetDirtyPage(PEPROCESS Process, PVOID Address)
Pt = MmGetPageTableForProcess(Process, Address, FALSE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
do
@ -1431,7 +1431,7 @@ MmEnableVirtualMapping(PEPROCESS Process, PVOID Address)
Pt = MmGetPageTableForProcessForPAE(Process, Address, FALSE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
do
@ -1456,7 +1456,7 @@ MmEnableVirtualMapping(PEPROCESS Process, PVOID Address)
Pt = MmGetPageTableForProcess(Process, Address, FALSE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
do
@ -1525,7 +1525,7 @@ MmCreateVirtualMappingForKernel(PVOID Address,
if (Address < MmSystemRangeStart)
{
DPRINT1("MmCreateVirtualMappingForKernel is called for user space\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
Attributes = ProtectToPTE(flProtect);
@ -1554,7 +1554,7 @@ MmCreateVirtualMappingForKernel(PVOID Address,
DPRINT1("Setting physical address but not allowing access at address "
"0x%.8X with attributes %x/%x.\n",
Addr, Attributes, flProtect);
KEBUGCHECK(0);
ASSERT(FALSE);
}
PdeOffset = PAE_ADDR_TO_PDE_OFFSET(Addr);
@ -1563,7 +1563,7 @@ MmCreateVirtualMappingForKernel(PVOID Address,
Pt = MmGetPageTableForProcessForPAE(NULL, Addr, TRUE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
else
@ -1580,7 +1580,7 @@ MmCreateVirtualMappingForKernel(PVOID Address,
Pte = ExfpInterlockedExchange64UL(Pt, &Pte);
if (Pte != 0LL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
}
@ -1593,7 +1593,7 @@ MmCreateVirtualMappingForKernel(PVOID Address,
Pt = MmGetPageTableForProcess(NULL, Addr, TRUE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Pt--;
@ -1604,7 +1604,7 @@ MmCreateVirtualMappingForKernel(PVOID Address,
DPRINT1("Setting physical address but not allowing access at address "
"0x%.8X with attributes %x/%x.\n",
Addr, Attributes, flProtect);
KEBUGCHECK(0);
ASSERT(FALSE);
}
PdeOffset = ADDR_TO_PDE_OFFSET(Addr);
@ -1613,7 +1613,7 @@ MmCreateVirtualMappingForKernel(PVOID Address,
Pt = MmGetPageTableForProcess(NULL, Addr, TRUE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
else
@ -1625,7 +1625,7 @@ MmCreateVirtualMappingForKernel(PVOID Address,
Pte = *Pt;
if (Pte != 0)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
(void)InterlockedExchangeUL(Pt, PFN_TO_PTE(Pages[i]) | Attributes);
}
@ -1643,16 +1643,16 @@ MmCreatePageFileMapping(PEPROCESS Process,
if (Process == NULL && Address < MmSystemRangeStart)
{
DPRINT1("No process\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Process != NULL && Address >= MmSystemRangeStart)
{
DPRINT1("Setting kernel address with process context\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (SwapEntry & (1 << 31))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Ke386Pae)
@ -1664,7 +1664,7 @@ MmCreatePageFileMapping(PEPROCESS Process,
Pt = MmGetPageTableForProcessForPAE(Process, Address, TRUE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
tmpPte = SwapEntry << 1;
Pte = ExfpInterlockedExchange64UL(Pt, &tmpPte);
@ -1690,7 +1690,7 @@ MmCreatePageFileMapping(PEPROCESS Process,
Pt = MmGetPageTableForProcess(Process, Address, TRUE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Pte = *Pt;
if (PAGE_MASK((Pte)) != 0)
@ -1744,13 +1744,13 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
if (Address < MmSystemRangeStart)
{
DPRINT1("No process\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (PageCount > 0x10000 ||
(ULONG_PTR) Address / PAGE_SIZE + PageCount > 0x100000)
{
DPRINT1("Page count to large\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
else
@ -1758,14 +1758,14 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
if (Address >= MmSystemRangeStart)
{
DPRINT1("Setting kernel address with process context\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (PageCount > (ULONG_PTR)MmSystemRangeStart / PAGE_SIZE ||
(ULONG_PTR) Address / PAGE_SIZE + PageCount >
(ULONG_PTR)MmSystemRangeStart / PAGE_SIZE)
{
DPRINT1("Page Count to large\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
@ -1803,7 +1803,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
DPRINT1("Setting physical address but not allowing access at address "
"0x%.8X with attributes %x/%x.\n",
Addr, Attributes, flProtect);
KEBUGCHECK(0);
ASSERT(FALSE);
}
PdeOffset = PAE_ADDR_TO_PDE_OFFSET(Addr);
if (oldPdeOffset != PdeOffset)
@ -1812,7 +1812,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
Pt = MmGetPageTableForProcessForPAE(Process, Addr, TRUE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
else
@ -1830,7 +1830,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
Pte = ExfpInterlockedExchange64UL(Pt, &tmpPte);
if (PAE_PAGE_MASK((Pte)) != 0LL && !((Pte) & PA_PRESENT))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (PAE_PAGE_MASK((Pte)) != 0LL)
{
@ -1872,7 +1872,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
DPRINT1("Setting physical address but not allowing access at address "
"0x%.8X with attributes %x/%x.\n",
Addr, Attributes, flProtect);
KEBUGCHECK(0);
ASSERT(FALSE);
}
PdeOffset = ADDR_TO_PDE_OFFSET(Addr);
if (oldPdeOffset != PdeOffset)
@ -1881,7 +1881,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
Pt = MmGetPageTableForProcess(Process, Addr, TRUE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
else
@ -1894,7 +1894,7 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
MmMarkPageMapped(Pages[i]);
if (PAGE_MASK((Pte)) != 0 && !((Pte) & PA_PRESENT))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (PAGE_MASK((Pte)) != 0)
{
@ -1943,7 +1943,7 @@ MmCreateVirtualMapping(PEPROCESS Process,
if (!MmIsPageInUse(Pages[i]))
{
DPRINT1("Page at address %x not in use\n", PFN_TO_PTE(Pages[i]));
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
@ -2037,7 +2037,7 @@ MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect)
if (Pt == NULL)
{
DPRINT1("Address %x\n", Address);
KEBUGCHECK(0);
ASSERT(FALSE);
}
do
{
@ -2062,7 +2062,7 @@ MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect)
Pt = MmGetPageTableForProcess(Process, Address, FALSE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
InterlockedExchange((PLONG)Pt, PAGE_MASK(*Pt) | Attributes | (*Pt & (PA_ACCESSED|PA_DIRTY)));
MiFlushTlb(Pt, Address);
@ -2149,7 +2149,7 @@ MmCreateHyperspaceMapping(PFN_TYPE Page)
}
if (i >= Page % 1024)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
}
@ -2174,7 +2174,7 @@ MmCreateHyperspaceMapping(PFN_TYPE Page)
}
if (i <= Page % 1024)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
}
@ -2206,7 +2206,7 @@ MmCreateHyperspaceMapping(PFN_TYPE Page)
}
if (i >= Page % 1024)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
}
@ -2231,7 +2231,7 @@ MmCreateHyperspaceMapping(PFN_TYPE Page)
}
if (i <= Page % 1024)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
}
@ -2293,7 +2293,7 @@ MmUpdatePageDir(PEPROCESS Process, PVOID Address, ULONG Size)
if (Address < MmSystemRangeStart)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Ke386Pae)
{
@ -2450,7 +2450,7 @@ MiInitPageDirectoryMap(VOID)
BoundaryAddressMultiple);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
BaseAddress = (PVOID)HYPERSPACE;
Status = MmCreateMemoryArea(MmGetKernelAddressSpace(),
@ -2464,7 +2464,7 @@ MiInitPageDirectoryMap(VOID)
BoundaryAddressMultiple);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}

View file

@ -104,7 +104,7 @@ MmMapIoSpace (IN PHYSICAL_ADDRESS PhysicalAddress,
if (!NT_SUCCESS(Status))
{
DbgPrint("Unable to create virtual mapping\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
return (PVOID)((ULONG_PTR)Result + Offset);

View file

@ -899,7 +899,7 @@ MmFreeMemoryAreaByPtr(
BaseAddress);
if (MemoryArea == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
return(STATUS_UNSUCCESSFUL);
}
@ -1041,7 +1041,7 @@ MmMapMemoryArea(PVOID BaseAddress,
if (!NT_SUCCESS(Status))
{
DPRINT1("Unable to allocate page\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
Status = MmCreateVirtualMapping (NULL,
(PVOID)((ULONG_PTR)BaseAddress + (i * PAGE_SIZE)),
@ -1051,7 +1051,7 @@ MmMapMemoryArea(PVOID BaseAddress,
if (!NT_SUCCESS(Status))
{
DPRINT1("Unable to create virtual mapping\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
}

View file

@ -57,7 +57,7 @@ MmInitializeMdlImplementation(VOID)
if (!NT_SUCCESS(Status))
{
MmUnlockAddressSpace(MmGetKernelAddressSpace());
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmUnlockAddressSpace(MmGetKernelAddressSpace());
@ -692,7 +692,7 @@ MmMapLockedPagesSpecifyCache(IN PMDL Mdl,
{
return NULL;
}
KEBUGCHECK(0);
ASSERT(FALSE);
}
Base = (PVOID)((ULONG_PTR)MiMdlMappingRegionBase + StartingOffset * PAGE_SIZE);
if (MiMdlMappingRegionHint == StartingOffset) MiMdlMappingRegionHint += PageCount;

View file

@ -103,7 +103,7 @@ MmpAccessFault(KPROCESSOR_MODE Mode,
if (KeGetCurrentIrql() >= DISPATCH_LEVEL)
{
CPRINT("Page fault at high IRQL was %d\n", KeGetCurrentIrql());
DPRINT1("Page fault at high IRQL was %d\n", KeGetCurrentIrql());
return(STATUS_UNSUCCESSFUL);
}
if (PsGetCurrentProcess() == NULL)
@ -205,7 +205,7 @@ MmNotPresentFault(KPROCESSOR_MODE Mode,
if (KeGetCurrentIrql() >= DISPATCH_LEVEL)
{
CPRINT("Page fault at high IRQL was %d, address %x\n", KeGetCurrentIrql(), Address);
DPRINT1("Page fault at high IRQL was %d, address %x\n", KeGetCurrentIrql(), Address);
return(STATUS_UNSUCCESSFUL);
}
@ -219,7 +219,7 @@ MmNotPresentFault(KPROCESSOR_MODE Mode,
*/
if (Mode != KernelMode)
{
CPRINT("Address: %x\n", Address);
DPRINT1("Address: %x\n", Address);
return(STATUS_ACCESS_VIOLATION);
}
AddressSpace = MmGetKernelAddressSpace();

View file

@ -71,7 +71,7 @@ MmMpwThreadMain(PVOID Ignored)
if (!NT_SUCCESS(Status))
{
DbgPrint("MpwThread: Wait failed\n");
KEBUGCHECK(0);
ASSERT(FALSE);
return(STATUS_UNSUCCESSFUL);
}
if (MpwThreadShouldTerminate)

View file

@ -936,7 +936,7 @@ static void validate_free_list(void)
{
DbgPrint("Bad block magic (probable pool corruption) at %x\n",
current);
KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0);
ASSERT(FALSE);
}
if (base_addr < MiNonPagedPoolStart ||
@ -946,13 +946,13 @@ static void validate_free_list(void)
DbgPrint("Size %d\n",current->hdr.Size);
DbgPrint("Limits are %x %x\n",MiNonPagedPoolStart,
(ULONG_PTR)MiNonPagedPoolStart+MiNonPagedPoolLength);
KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0);
ASSERT(FALSE);
}
blocks_seen++;
if (blocks_seen > EiNrFreeBlocks)
{
DbgPrint("Too many blocks on free list\n");
KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0);
ASSERT(FALSE);
}
p = avl_get_next(FreeBlockListRoot, p);
}
@ -979,7 +979,7 @@ static void validate_used_list(void)
{
DbgPrint("Bad block magic (probable pool corruption) at %x\n",
current);
KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0);
ASSERT(FALSE);
}
if (base_addr < MiNonPagedPoolStart ||
((ULONG_PTR)base_addr+current->hdr.Size) >
@ -989,13 +989,13 @@ static void validate_used_list(void)
DbgPrint("Size %d\n",current->hdr.Size);
DbgPrint("Limits are %x %x\n",MiNonPagedPoolStart,
(ULONG_PTR)MiNonPagedPoolStart+MiNonPagedPoolLength);
KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0);
ASSERT(FALSE);
}
blocks_seen++;
if (blocks_seen > EiNrUsedBlocks)
{
DbgPrint("Too many blocks on used list\n");
KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0);
ASSERT(FALSE);
}
if (current->ListEntry.Flink != &UsedBlockListHead &&
current->ListEntry.Flink->Blink != &current->ListEntry)
@ -1004,7 +1004,7 @@ static void validate_used_list(void)
"current->next->previous %x)\n",
__FILE__,__LINE__,current, current->ListEntry.Flink,
current->ListEntry.Flink->Blink);
KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0);
ASSERT(FALSE);
}
current_entry = current_entry->Flink;
@ -1035,19 +1035,19 @@ static void check_duplicates(HDR* blk)
{
DbgPrint("Bad block magic (probable pool corruption) at %x\n",
free);
KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0);
ASSERT(FALSE);
}
if ( (ULONG_PTR)free > base && (ULONG_PTR)free < last )
{
DbgPrint("intersecting blocks on list\n");
KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0);
ASSERT(FALSE);
}
if ( (ULONG_PTR)free < base &&
((ULONG_PTR)free + free->hdr.Size) > base )
{
DbgPrint("intersecting blocks on list\n");
KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0);
ASSERT(FALSE);
}
p = avl_get_next(FreeBlockListRoot, p);
}
@ -1060,13 +1060,13 @@ static void check_duplicates(HDR* blk)
if ( (ULONG_PTR)used > base && (ULONG_PTR)used < last )
{
DbgPrint("intersecting blocks on list\n");
KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0);
ASSERT(FALSE);
}
if ( (ULONG_PTR)used < base &&
((ULONG_PTR)used + used->hdr.Size) > base )
{
DbgPrint("intersecting blocks on list\n");
KEBUGCHECK(/*KBUG_POOL_FREE_LIST_CORRUPT*/0);
ASSERT(FALSE);
}
current_entry = current_entry->Flink;
@ -1460,7 +1460,7 @@ ExRosQueryNonPagedPoolTag ( PVOID Addr )
{
HDR_USED* blk=(HDR_USED*)((ULONG_PTR)Addr - HDR_USED_SIZE);
if (blk->hdr.Magic != BLOCK_HDR_USED_MAGIC)
KEBUGCHECK(0);
ASSERT(FALSE);
return blk->Tag;
}
@ -1510,7 +1510,7 @@ void check_redzone_header(HDR_USED* hdr)
DbgPrint("NPPOL: High-side redzone overwritten, Block %x, Size %d, Tag %x(%s), Caller %x\n",
(ULONG_PTR)hdr + HDR_USED_SIZE, hdr->UserSize, hdr->Tag, c, hdr->Caller);
}
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
#endif
@ -1563,7 +1563,7 @@ VOID STDCALL ExFreeNonPagedPool (PVOID block)
DbgPrint("ExFreePool of non-allocated address %x (magic %x)\n",
block, blk->hdr.Magic);
}
KEBUGCHECK(0);
ASSERT(FALSE);
return;
}
@ -1724,7 +1724,7 @@ MiInitializeNonPagedPool(VOID)
if (!NT_SUCCESS(Status))
{
DbgPrint("Unable to allocate a page\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
Status = MmCreateVirtualMapping(NULL,
@ -1735,7 +1735,7 @@ MiInitializeNonPagedPool(VOID)
if (!NT_SUCCESS(Status))
{
DbgPrint("Unable to create virtual mapping\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
Address = (PVOID)((ULONG_PTR)Address + PAGE_SIZE);
}

View file

@ -205,7 +205,7 @@ MmGetOffsetPageFile(PRETRIEVAL_POINTERS_BUFFER RetrievalPointers, LARGE_INTEGER
first = mid + 1;
}
}
KEBUGCHECK(0);
ASSERT(FALSE);
#if defined(__GNUC__)
return (LARGE_INTEGER)0LL;
@ -237,7 +237,7 @@ MmWriteToSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page)
if (SwapEntry == 0)
{
KEBUGCHECK(0);
ASSERT(FALSE);
return(STATUS_UNSUCCESSFUL);
}
@ -247,13 +247,13 @@ MmWriteToSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page)
if (i >= MAX_PAGING_FILES)
{
DPRINT1("Bad swap entry 0x%.8X\n", SwapEntry);
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (PagingFileList[i]->FileObject == NULL ||
PagingFileList[i]->FileObject->DeviceObject == NULL)
{
DPRINT1("Bad paging file 0x%.8X\n", SwapEntry);
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmInitializeMdl(Mdl, NULL, PAGE_SIZE);
@ -298,7 +298,7 @@ MmReadFromSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page)
if (SwapEntry == 0)
{
KEBUGCHECK(0);
ASSERT(FALSE);
return(STATUS_UNSUCCESSFUL);
}
@ -308,13 +308,13 @@ MmReadFromSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page)
if (i >= MAX_PAGING_FILES)
{
DPRINT1("Bad swap entry 0x%.8X\n", SwapEntry);
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (PagingFileList[i]->FileObject == NULL ||
PagingFileList[i]->FileObject->DeviceObject == NULL)
{
DPRINT1("Bad paging file 0x%.8X\n", SwapEntry);
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmInitializeMdl(Mdl, NULL, PAGE_SIZE);
@ -450,13 +450,13 @@ MmFreeSwapPage(SWAPENTRY Entry)
if (i >= MAX_PAGING_FILES)
{
DPRINT1("Bad swap entry 0x%.8X\n", Entry);
KEBUGCHECK(0);
ASSERT(FALSE);
}
KeAcquireSpinLock(&PagingFileListLock, &oldIrql);
if (PagingFileList[i] == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
KeAcquireSpinLockAtDpcLevel(&PagingFileList[i]->AllocMapLock);
@ -504,7 +504,7 @@ MmAllocSwapPage(VOID)
off = MiAllocPageFromPagingFile(PagingFileList[i]);
if (off == 0xFFFFFFFF)
{
KEBUGCHECK(0);
ASSERT(FALSE);
KeReleaseSpinLock(&PagingFileListLock, oldIrql);
return(STATUS_UNSUCCESSFUL);
}
@ -518,7 +518,7 @@ MmAllocSwapPage(VOID)
}
KeReleaseSpinLock(&PagingFileListLock, oldIrql);
KEBUGCHECK(0);
ASSERT(FALSE);
return(0);
}

View file

@ -66,7 +66,7 @@ MmReleasePageOp(PMM_PAGEOP PageOp)
PrevPageOp = PrevPageOp->Next;
}
KeReleaseSpinLock(&MmPageOpHashTableLock, oldIrql);
KEBUGCHECK(0);
ASSERT(FALSE);
}
PMM_PAGEOP
@ -211,7 +211,7 @@ MmGetPageOp(PMEMORY_AREA MArea, HANDLE Pid, PVOID Address,
if (PageOp == NULL)
{
KeReleaseSpinLock(&MmPageOpHashTableLock, oldIrql);
KEBUGCHECK(0);
ASSERT(FALSE);
return(NULL);
}

View file

@ -41,7 +41,7 @@ EiAllocatePool(POOL_TYPE PoolType,
if ((PoolType & MUST_SUCCEED_POOL_MASK) && Block==NULL)
{
KEBUGCHECK(MUST_SUCCEED_POOL_EMPTY);
KeBugCheck(MUST_SUCCEED_POOL_EMPTY);
}
return(Block);
}

View file

@ -98,7 +98,7 @@ MmCopyMmInfo(PEPROCESS Src,
{
DPRINT("MmCopyMmInfo(Src %x, Dest %x)\n", Src, Dest);
KeBugCheck(0);
ASSERT(FALSE);
return(STATUS_SUCCESS);
}
@ -125,7 +125,7 @@ MmCreateProcessAddressSpace(IN ULONG MinWs,
IN PEPROCESS Process,
IN PLARGE_INTEGER DirectoryTableBase)
{
KeBugCheck(0);
ASSERT(FALSE);
return TRUE;
}
@ -302,7 +302,7 @@ MmIsAccessedAndResetAccessPage(PEPROCESS Process, PVOID Address)
if (Address < MmSystemRangeStart && Process == NULL)
{
DPRINT1("MmIsAccessedAndResetAccessPage is called for user space without a process.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
info.proc = Process ? (int)Process->UniqueProcessId : 0;
@ -370,7 +370,7 @@ MmCreateVirtualMappingForKernel(PVOID Address,
if (Address < MmSystemRangeStart)
{
DPRINT1("MmCreateVirtualMappingForKernel is called for user space\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
Addr = Address;
@ -383,7 +383,7 @@ MmCreateVirtualMappingForKernel(PVOID Address,
DPRINT1("Setting physical address but not allowing access at address "
"0x%.8X with attributes %x/%x.\n",
Addr, Attributes, flProtect);
KEBUGCHECK(0);
ASSERT(FALSE);
}
(void)InterlockedExchangeUL(Pt, PFN_TO_PTE(Pages[i]) | Attributes);
#endif
@ -401,16 +401,16 @@ MmCreatePageFileMapping(PEPROCESS Process,
if (Process == NULL && Address < MmSystemRangeStart)
{
DPRINT1("No process\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Process != NULL && Address >= MmSystemRangeStart)
{
DPRINT1("Setting kernel address with process context\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (SwapEntry & (1 << 31))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
// XXX arty
@ -440,13 +440,13 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
if (Address < MmSystemRangeStart)
{
DPRINT1("No process\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (PageCount > 0x10000 ||
(ULONG_PTR) Address / PAGE_SIZE + PageCount > 0x100000)
{
DPRINT1("Page count to large\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
else
@ -454,14 +454,14 @@ MmCreateVirtualMappingUnsafe(PEPROCESS Process,
if (Address >= MmSystemRangeStart)
{
DPRINT1("Setting kernel address with process context\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (PageCount > (ULONG_PTR)MmSystemRangeStart / PAGE_SIZE ||
(ULONG_PTR) Address / PAGE_SIZE + PageCount >
(ULONG_PTR)MmSystemRangeStart / PAGE_SIZE)
{
DPRINT1("Page Count to large\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
@ -508,7 +508,7 @@ MmCreateVirtualMapping(PEPROCESS Process,
if (!MmIsUsablePage(Pages[i]))
{
DPRINT1("Page at address %x not usable\n", PFN_TO_PTE(Pages[i]));
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
@ -564,7 +564,7 @@ MmSetPageProtect(PEPROCESS Process, PVOID Address, ULONG flProtect)
Pt = MmGetPageTableForProcess(Process, Address, FALSE);
if (Pt == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
InterlockedExchange((PLONG)Pt, PAGE_MASK(*Pt) | Attributes | (*Pt & (PA_ACCESSED|PA_DIRTY)));
MiFlushTlb(Pt, Address);

View file

@ -215,7 +215,7 @@ MmCreateKernelStack(BOOLEAN GuiStack,
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to create thread stack\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
@ -239,7 +239,7 @@ MmCreateKernelStack(BOOLEAN GuiStack,
if (!NT_SUCCESS(Status))
{
DPRINT1("Could not create Virtual Mapping for Kernel Stack\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/* Return the stack base */
@ -709,11 +709,11 @@ MmDeleteProcessAddressSpace(PEPROCESS Process)
break;
case MEMORY_AREA_MDL_MAPPING:
KEBUGCHECK(PROCESS_HAS_LOCKED_PAGES);
KeBugCheck(PROCESS_HAS_LOCKED_PAGES);
break;
default:
KEBUGCHECK(0);
ASSERT(FALSE);
}
}

View file

@ -81,7 +81,7 @@ MmWritePagePhysicalAddress(PFN_TYPE Page)
Address = entry->Address;
if ((((ULONG_PTR)Address) & 0xFFF) != 0)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Address < MmSystemRangeStart)
{
@ -177,7 +177,7 @@ MmWritePagePhysicalAddress(PFN_TYPE Page)
}
else
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Address < MmSystemRangeStart)
{
@ -211,7 +211,7 @@ MmPageOutPhysicalAddress(PFN_TYPE Page)
Address = entry->Address;
if ((((ULONG_PTR)Address) & 0xFFF) != 0)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Address < MmSystemRangeStart)
@ -301,7 +301,7 @@ MmPageOutPhysicalAddress(PFN_TYPE Page)
}
else
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Address < MmSystemRangeStart)
{
@ -321,7 +321,7 @@ MmSetCleanAllRmaps(PFN_TYPE Page)
if (current_entry == NULL)
{
DPRINT1("MmIsDirtyRmap: No rmaps.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
while (current_entry != NULL)
{
@ -342,7 +342,7 @@ MmSetDirtyAllRmaps(PFN_TYPE Page)
if (current_entry == NULL)
{
DPRINT1("MmIsDirtyRmap: No rmaps.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
while (current_entry != NULL)
{
@ -392,7 +392,7 @@ MmInsertRmap(PFN_TYPE Page, PEPROCESS Process,
new_entry = ExAllocateFromNPagedLookasideList(&RmapLookasideList);
if (new_entry == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
new_entry->Address = Address;
new_entry->Process = (PEPROCESS)Process;
@ -410,7 +410,7 @@ MmInsertRmap(PFN_TYPE Page, PEPROCESS Process,
"address 0x%.8X\n", Process->UniqueProcessId, Address,
MmGetPfnForProcess(Process, Address) << PAGE_SHIFT,
Page << PAGE_SHIFT);
KEBUGCHECK(0);
ASSERT(FALSE);
}
ExAcquireFastMutex(&RmapListLock);
@ -427,7 +427,7 @@ MmInsertRmap(PFN_TYPE Page, PEPROCESS Process,
DbgPrint("\n previous caller ");
DbgPrint("%p", current_entry->Caller);
DbgPrint("\n");
KeBugCheck(0);
ASSERT(FALSE);
}
current_entry = current_entry->Next;
}
@ -463,7 +463,7 @@ MmDeleteAllRmaps(PFN_TYPE Page, PVOID Context,
if (current_entry == NULL)
{
DPRINT1("MmDeleteAllRmaps: No rmaps.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmSetRmapListHeadPage(Page, NULL);
ExReleaseFastMutex(&RmapListLock);
@ -527,5 +527,5 @@ MmDeleteRmap(PFN_TYPE Page, PEPROCESS Process,
previous_entry = current_entry;
current_entry = current_entry->Next;
}
KEBUGCHECK(0);
ASSERT(FALSE);
}

View file

@ -250,7 +250,7 @@ MmFreeSectionSegments(PFILE_OBJECT FileObject)
{
DPRINT1("Image segment %d still referenced (was %d)\n", i,
SectionSegments[i].ReferenceCount);
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmFreePageTablesSectionSegment(&SectionSegments[i]);
}
@ -268,7 +268,7 @@ MmFreeSectionSegments(PFILE_OBJECT FileObject)
if (Segment->ReferenceCount != 0)
{
DPRINT1("Data segment still referenced\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmFreePageTablesSectionSegment(Segment);
ExFreePool(Segment);
@ -316,7 +316,7 @@ MmSetPageEntrySectionSegment(PMM_SECTION_SEGMENT Segment,
TAG_SECTION_PAGE_TABLE);
if (Table == NULL)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
memset(Table, 0, sizeof(SECTION_PAGE_TABLE));
DPRINT("Table %x\n", Table);
@ -369,16 +369,16 @@ MmSharePageEntrySectionSegment(PMM_SECTION_SEGMENT Segment,
if (Entry == 0)
{
DPRINT1("Entry == 0 for MmSharePageEntrySectionSegment\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (SHARE_COUNT_FROM_SSE(Entry) == MAX_SHARE_COUNT)
{
DPRINT1("Maximum share count reached\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (IS_SWAP_FROM_SSE(Entry))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Entry = MAKE_SSE(PAGE_FROM_SSE(Entry), SHARE_COUNT_FROM_SSE(Entry) + 1);
MmSetPageEntrySectionSegment(Segment, Offset, Entry);
@ -399,16 +399,16 @@ MmUnsharePageEntrySectionSegment(PROS_SECTION_OBJECT Section,
if (Entry == 0)
{
DPRINT1("Entry == 0 for MmUnsharePageEntrySectionSegment\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (SHARE_COUNT_FROM_SSE(Entry) == 0)
{
DPRINT1("Zero share count for unshare\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (IS_SWAP_FROM_SSE(Entry))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Entry = MAKE_SSE(PAGE_FROM_SSE(Entry), SHARE_COUNT_FROM_SSE(Entry) - 1);
/*
@ -444,7 +444,7 @@ MmUnsharePageEntrySectionSegment(PROS_SECTION_OBJECT Section,
if (!NT_SUCCESS(Status))
{
DPRINT1("CcRosUnmapCacheSegment failed, status = %x\n", Status);
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
}
@ -493,7 +493,7 @@ MmUnsharePageEntrySectionSegment(PROS_SECTION_OBJECT Section,
if (!NT_SUCCESS(Status))
{
DPRINT1("MM: Failed to write to swap page (Status was 0x%.8X)\n", Status);
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
MmSetPageEntrySectionSegment(Segment, Offset, MAKE_SWAP_SSE(SavedSwapEntry));
@ -504,7 +504,7 @@ MmUnsharePageEntrySectionSegment(PROS_SECTION_OBJECT Section,
else
{
DPRINT1("Found a swapentry for a non private page in an image or data file sgment\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
}
@ -775,7 +775,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace,
if (PageOp == NULL)
{
DPRINT1("MmGetPageOp failed\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
@ -793,12 +793,12 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace,
if (Status != STATUS_SUCCESS)
{
DPRINT1("Failed to wait for page op, status = %x\n", Status);
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (PageOp->Status == STATUS_PENDING)
{
DPRINT1("Woke for page op before completion\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmLockAddressSpace(AddressSpace);
/*
@ -856,7 +856,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace,
if (!NT_SUCCESS(Status))
{
DPRINT1("Unable to create virtual mapping\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmInsertRmap(Page, Process, (PVOID)PAddress);
}
@ -885,7 +885,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace,
if (Segment->Flags & MM_PAGEFILE_SEGMENT)
{
DPRINT1("Found a swaped out private page in a pagefile section.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmUnlockSectionSegment(Segment);
@ -895,14 +895,14 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace,
Status = MmRequestPageMemoryConsumer(MC_USER, TRUE, &Page);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Status = MmReadFromSwapPage(SwapEntry, Page);
if (!NT_SUCCESS(Status))
{
DPRINT1("MmReadFromSwapPage failed, status = %x\n", Status);
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmLockAddressSpace(AddressSpace);
Status = MmCreateVirtualMapping(Process,
@ -913,7 +913,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace,
if (!NT_SUCCESS(Status))
{
DPRINT("MmCreateVirtualMapping failed, not out of memory\n");
KEBUGCHECK(0);
ASSERT(FALSE);
return(Status);
}
@ -958,7 +958,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace,
if (!NT_SUCCESS(Status))
{
DPRINT("MmCreateVirtualMappingUnsafe failed, not out of memory\n");
KEBUGCHECK(0);
ASSERT(FALSE);
return(Status);
}
/*
@ -994,7 +994,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace,
}
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Status = MmCreateVirtualMapping(Process,
Address,
@ -1004,7 +1004,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace,
if (!NT_SUCCESS(Status))
{
DPRINT("MmCreateVirtualMapping failed, not out of memory\n");
KEBUGCHECK(0);
ASSERT(FALSE);
return(Status);
}
MmInsertRmap(Page, Process, (PVOID)PAddress);
@ -1085,7 +1085,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace,
if (Entry != Entry1)
{
DPRINT1("Someone changed ppte entry while we slept\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
@ -1104,7 +1104,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace,
if (!NT_SUCCESS(Status))
{
DPRINT1("Unable to create virtual mapping\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmInsertRmap(Page, Process, (PVOID)PAddress);
@ -1133,13 +1133,13 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace,
Status = MmRequestPageMemoryConsumer(MC_USER, TRUE, &Page);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
Status = MmReadFromSwapPage(SwapEntry, Page);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
@ -1156,7 +1156,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace,
if (Entry != Entry1)
{
DPRINT1("Someone changed ppte entry while we slept\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
@ -1179,7 +1179,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace,
if (!NT_SUCCESS(Status))
{
DPRINT1("Unable to create virtual mapping\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmInsertRmap(Page, Process, (PVOID)PAddress);
if (Locked)
@ -1211,7 +1211,7 @@ MmNotPresentFaultSectionView(PMM_AVL_TABLE AddressSpace,
if (!NT_SUCCESS(Status))
{
DPRINT1("Unable to create virtual mapping\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmInsertRmap(Page, Process, (PVOID)PAddress);
if (Locked)
@ -1305,7 +1305,7 @@ MmAccessFaultSectionView(PMM_AVL_TABLE AddressSpace,
if (PageOp == NULL)
{
DPRINT1("MmGetPageOp failed\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
@ -1321,12 +1321,12 @@ MmAccessFaultSectionView(PMM_AVL_TABLE AddressSpace,
if (Status == STATUS_TIMEOUT)
{
DPRINT1("Failed to wait for page op, status = %x\n", Status);
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (PageOp->Status == STATUS_PENDING)
{
DPRINT1("Woke for page op before completion\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
* Restart the operation
@ -1348,7 +1348,7 @@ MmAccessFaultSectionView(PMM_AVL_TABLE AddressSpace,
Status = MmRequestPageMemoryConsumer(MC_USER, TRUE, &NewPage);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
@ -1373,13 +1373,13 @@ MmAccessFaultSectionView(PMM_AVL_TABLE AddressSpace,
if (!NT_SUCCESS(Status))
{
DPRINT("MmCreateVirtualMapping failed, not out of memory\n");
KEBUGCHECK(0);
ASSERT(FALSE);
return(Status);
}
if (!NT_SUCCESS(Status))
{
DPRINT1("Unable to create virtual mapping\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (Locked)
{
@ -1509,7 +1509,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace,
DPRINT1("Trying to page out from physical memory section address 0x%X "
"process %d\n", Address,
Process ? Process->UniqueProcessId : 0);
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
@ -1520,7 +1520,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace,
{
DPRINT1("Trying to page out not-present page at (%d,0x%.8X).\n",
Process ? Process->UniqueProcessId : 0, Address);
KEBUGCHECK(0);
ASSERT(FALSE);
}
Page = MmGetPfnForProcess(Process, Address);
SwapEntry = MmGetSavedSwapEntryPage(Page);
@ -1548,7 +1548,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace,
if(!MiIsPageFromCache(MemoryArea, Context.Offset))
{
DPRINT1("Direct mapped non private page is not associated with the cache.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
else
@ -1567,7 +1567,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace,
if (!(Context.Segment->Flags & MM_PAGEFILE_SEGMENT) &&
!(Context.Segment->Characteristics & IMAGE_SCN_MEM_SHARED))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
@ -1585,7 +1585,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace,
{
DPRINT1("Found a %s private page (address %x) in a pagefile segment.\n",
Context.WasDirty ? "dirty" : "clean", Address);
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (!Context.WasDirty && SwapEntry != 0)
{
@ -1603,7 +1603,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace,
{
DPRINT1("Found a %s private page (address %x) in a shared section segment.\n",
Context.WasDirty ? "dirty" : "clean", Address);
KEBUGCHECK(0);
ASSERT(FALSE);
}
if (!Context.WasDirty || SwapEntry != 0)
{
@ -1624,13 +1624,13 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace,
{
DPRINT1("Found a swapentry for a non private and direct mapped page (address %x)\n",
Address);
KEBUGCHECK(0);
ASSERT(FALSE);
}
Status = CcRosUnmapCacheSegment(Bcb, FileOffset, FALSE);
if (!NT_SUCCESS(Status))
{
DPRINT1("CCRosUnmapCacheSegment failed, status = %x\n", Status);
KEBUGCHECK(0);
ASSERT(FALSE);
}
PageOp->Status = STATUS_SUCCESS;
MmspCompleteAndReleasePageOp(PageOp);
@ -1642,7 +1642,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace,
{
DPRINT1("Found a swap entry for a non dirty, non private and not direct mapped page (address %x)\n",
Address);
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmReleasePageMemoryConsumer(MC_USER, Page);
PageOp->Status = STATUS_SUCCESS;
@ -1659,7 +1659,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace,
MmUnlockAddressSpace(AddressSpace);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmReleasePageMemoryConsumer(MC_USER, Page);
PageOp->Status = STATUS_SUCCESS;
@ -1787,7 +1787,7 @@ MmPageOutSectionView(PMM_AVL_TABLE AddressSpace,
MmUnlockAddressSpace(AddressSpace);
if (!NT_SUCCESS(Status))
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
else
@ -1862,7 +1862,7 @@ MmWritePageSectionView(PMM_AVL_TABLE AddressSpace,
DPRINT1("Trying to write back page from physical memory mapped at %X "
"process %d\n", Address,
Process ? Process->UniqueProcessId : 0);
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
@ -1873,7 +1873,7 @@ MmWritePageSectionView(PMM_AVL_TABLE AddressSpace,
{
DPRINT1("Trying to page out not-present page at (%d,0x%.8X).\n",
Process ? Process->UniqueProcessId : 0, Address);
KEBUGCHECK(0);
ASSERT(FALSE);
}
Page = MmGetPfnForProcess(Process, Address);
SwapEntry = MmGetSavedSwapEntryPage(Page);
@ -2242,7 +2242,7 @@ MmCreatePhysicalMemorySection(VOID)
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to create PhysicalMemory section\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
Status = ObInsertObject(PhysSection,
NULL,
@ -2683,7 +2683,7 @@ ExeFmtpReadFile(IN PVOID File,
if(Length == 0)
{
KEBUGCHECK(STATUS_INVALID_PARAMETER_4);
ASSERT(FALSE);
}
FileOffset = *Offset;
@ -2691,7 +2691,7 @@ ExeFmtpReadFile(IN PVOID File,
/* Negative/special offset: it cannot be used in this context */
if(FileOffset.u.HighPart < 0)
{
KEBUGCHECK(STATUS_INVALID_PARAMETER_5);
ASSERT(FALSE);
}
AdjustOffset = PAGE_ROUND_DOWN(FileOffset.u.LowPart);
@ -3865,7 +3865,7 @@ MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address,
if (Status != STATUS_SUCCESS)
{
DPRINT1("Failed to wait for page op, status = %x\n", Status);
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmLockAddressSpace(AddressSpace);
@ -3899,7 +3899,7 @@ MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address,
if (Segment->Flags & MM_PAGEFILE_SEGMENT)
{
DPRINT1("Found a swap entry for a page in a pagefile section.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmFreeSwapPage(SwapEntry);
}
@ -3914,7 +3914,7 @@ MmFreeSectionPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address,
if (Segment->Flags & MM_PAGEFILE_SEGMENT)
{
DPRINT1("Found a private page in a pagefile section.\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*
* Just dereference private pages
@ -4040,7 +4040,7 @@ MmUnmapViewOfSection(PEPROCESS Process,
if (Status != STATUS_SUCCESS)
{
DPRINT1("Failed to wait for page op, status = %x\n", Status);
KEBUGCHECK(0);
ASSERT(FALSE);
}
MmLockAddressSpace(AddressSpace);
MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace,
@ -4086,7 +4086,7 @@ MmUnmapViewOfSection(PEPROCESS Process,
}
if (i >= NrSegments)
{
KEBUGCHECK(0);
ASSERT(FALSE);
}
for (i = 0; i < NrSegments; i++)
@ -4627,7 +4627,7 @@ MmMapViewOfSection(IN PVOID SectionObject,
{
/* Following this pointer would lead to us to the dark side */
/* What to do? Bugcheck? Return status? Do the mambo? */
KEBUGCHECK(MEMORY_MANAGEMENT);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (SectionOffset == NULL)

View file

@ -62,7 +62,7 @@ ObpInsertEntryDirectory(IN POBJECT_DIRECTORY Parent,
/* Invalid context */
DPRINT1("OB: ObpInsertEntryDirectory - invalid context %p %ld\n",
Context, Context->DirectoryLocked);
KEBUGCHECK(0);
ASSERT(FALSE);
return FALSE;
}
@ -252,7 +252,7 @@ ObpLookupEntryDirectory(IN POBJECT_DIRECTORY Directory,
if ((SearchShadow) && (Directory->DeviceMap))
{
/* FIXME: We don't support this yet */
KEBUGCHECK(0);
ASSERT(FALSE);
}
}

View file

@ -916,7 +916,7 @@ ObpIncrementHandleCount(IN PVOID Object,
{
/* FIXME: This should never happen for now */
DPRINT1("Unhandled case\n");
KEBUGCHECK(0);
ASSERT(FALSE);
goto Quickie;
}
}
@ -945,7 +945,7 @@ ObpIncrementHandleCount(IN PVOID Object,
{
/* FIXME: This should never happen for now */
DPRINT1("Unhandled case\n");
KEBUGCHECK(0);
ASSERT(FALSE);
return Status;
}
}
@ -1143,7 +1143,7 @@ ObpIncrementUnnamedHandleCount(IN PVOID Object,
{
/* FIXME: This should never happen for now */
DPRINT1("Unhandled case\n");
KEBUGCHECK(0);
ASSERT(FALSE);
goto Quickie;
}
}
@ -1169,7 +1169,7 @@ ObpIncrementUnnamedHandleCount(IN PVOID Object,
{
/* FIXME: This should never happen for now */
DPRINT1("Unhandled case\n");
KEBUGCHECK(0);
ASSERT(FALSE);
return Status;
}
}
@ -1753,7 +1753,7 @@ ObpCloseHandle(IN HANDLE Handle,
if (KdDebuggerEnabled)
{
/* Bugcheck */
KeBugCheckEx(0, (ULONG_PTR)Handle, 1, 0, 0);
KeBugCheckEx(INVALID_KERNEL_HANDLE, (ULONG_PTR)Handle, 1, 0, 0);
}
}
}
@ -3034,7 +3034,7 @@ ObInsertObject(IN PVOID Object,
{
/* Weird case where we need to do a manual delete */
DPRINT1("Unhandled path\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/* Cleanup the lookup */
@ -3052,7 +3052,7 @@ ObInsertObject(IN PVOID Object,
}
/* Return failure code */
KEBUGCHECK(0);
ASSERT(FALSE);
return Status;
}
}

View file

@ -49,7 +49,7 @@ ObpCreateSymbolicLinkName(IN POBJECT_SYMBOLIC_LINK SymbolicLink)
/* FIXME: We don't support device maps yet */
DPRINT1("Unhandled path!\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/*++

View file

@ -78,7 +78,7 @@ PopSetSystemPowerState(SYSTEM_POWER_STATE PowerState)
Status = IopGetSystemPowerDeviceObject(&DeviceObject);
if (!NT_SUCCESS(Status))
{
CPRINT("No system power driver available\n");
DPRINT1("No system power driver available\n");
return STATUS_UNSUCCESSFUL;
}

View file

@ -310,7 +310,7 @@ PspDeleteProcess(IN PVOID ObjectBody)
if (!(ExDestroyHandle(PspCidTable, Process->UniqueProcessId, NULL)))
{
/* Something wrong happened, bugcheck */
KEBUGCHECK(CID_HANDLE_DELETION);
KeBugCheck(CID_HANDLE_DELETION);
}
}
@ -360,7 +360,7 @@ PspDeleteThread(IN PVOID ObjectBody)
if (!(ExDestroyHandle(PspCidTable, Thread->Cid.UniqueThread, NULL)))
{
/* Something wrong happened, bugcheck */
KEBUGCHECK(CID_HANDLE_DELETION);
KeBugCheck(CID_HANDLE_DELETION);
}
}
@ -421,7 +421,7 @@ PspExitThread(IN NTSTATUS ExitStatus)
if (KeIsAttachedProcess())
{
/* Bugcheck */
KEBUGCHECKEX(INVALID_PROCESS_ATTACH_ATTEMPT,
KeBugCheckEx(INVALID_PROCESS_ATTACH_ATTEMPT,
(ULONG_PTR)CurrentProcess,
(ULONG_PTR)Thread->Tcb.ApcState.Process,
(ULONG_PTR)Thread->Tcb.ApcStateIndex,
@ -435,7 +435,7 @@ PspExitThread(IN NTSTATUS ExitStatus)
if (Thread->ActiveExWorker)
{
/* Bugcheck */
KEBUGCHECKEX(ACTIVE_EX_WORKER_THREAD_TERMINATION,
KeBugCheckEx(ACTIVE_EX_WORKER_THREAD_TERMINATION,
(ULONG_PTR)Thread,
0,
0,
@ -446,7 +446,7 @@ PspExitThread(IN NTSTATUS ExitStatus)
if (Thread->Tcb.CombinedApcDisable != 0)
{
/* Bugcheck */
KEBUGCHECKEX(KERNEL_APC_PENDING_DURING_EXIT,
KeBugCheckEx(KERNEL_APC_PENDING_DURING_EXIT,
0,
Thread->Tcb.CombinedApcDisable,
0,
@ -578,7 +578,7 @@ PspExitThread(IN NTSTATUS ExitStatus)
else
{
/* Bugcheck, we can't allow this */
KEBUGCHECKEX(CRITICAL_PROCESS_DIED,
KeBugCheckEx(CRITICAL_PROCESS_DIED,
(ULONG_PTR)CurrentProcess,
0,
0,
@ -701,7 +701,7 @@ PspExitThread(IN NTSTATUS ExitStatus)
if (!Thread->Tcb.EnableStackSwap)
{
/* Stack swap really shouldn't be disabled during exit! */
KEBUGCHECKEX(KERNEL_STACK_LOCKED_AT_EXIT, 0, 0, 0, 0);
KeBugCheckEx(KERNEL_STACK_LOCKED_AT_EXIT, 0, 0, 0, 0);
}
/* Cancel I/O for the thread. */
@ -849,7 +849,7 @@ PspExitThread(IN NTSTATUS ExitStatus)
if ((FirstEntry) || (Thread->Tcb.CombinedApcDisable != 0))
{
/* Bugcheck time */
KEBUGCHECKEX(KERNEL_APC_PENDING_DURING_EXIT,
KeBugCheckEx(KERNEL_APC_PENDING_DURING_EXIT,
(ULONG_PTR)FirstEntry,
Thread->Tcb.CombinedApcDisable,
KeGetCurrentIrql(),

View file

@ -698,7 +698,7 @@ PspCreateProcess(OUT PHANDLE ProcessHandle,
{
/* FIXME: We need to insert this process */
DPRINT1("Jobs not yet supported\n");
KEBUGCHECK(0);
ASSERT(FALSE);
}
/* Create PEB only for User-Mode Processes */

View file

@ -647,7 +647,7 @@ PsImpersonateClient(IN PETHREAD Thread,
}
/* Check if this is a job, which we don't support yet */
if (Thread->ThreadsProcess->Job) KEBUGCHECK(0);
if (Thread->ThreadsProcess->Job) ASSERT(FALSE);
/* Lock thread security */
PspLockThreadSecurityExclusive(Thread);

View file

@ -121,7 +121,7 @@ STDCALL
RtlDeleteHeapLock(
PRTL_CRITICAL_SECTION CriticalSection)
{
KEBUGCHECK(0);
ASSERT(FALSE);
return STATUS_SUCCESS;
}
@ -130,7 +130,7 @@ STDCALL
RtlEnterHeapLock(
PRTL_CRITICAL_SECTION CriticalSection)
{
KEBUGCHECK(0);
ASSERT(FALSE);
return STATUS_SUCCESS;
}
@ -139,7 +139,7 @@ STDCALL
RtlInitializeHeapLock(
PRTL_CRITICAL_SECTION CriticalSection)
{
KEBUGCHECK(0);
ASSERT(FALSE);
return STATUS_SUCCESS;
}
@ -148,7 +148,7 @@ STDCALL
RtlLeaveHeapLock(
PRTL_CRITICAL_SECTION CriticalSection)
{
KEBUGCHECK(0);
ASSERT(FALSE);
return STATUS_SUCCESS;
}
@ -159,7 +159,7 @@ CHECK_PAGED_CODE_RTL(char *file, int line)
if(KeGetCurrentIrql() > APC_LEVEL)
{
DbgPrint("%s:%i: Pagable code called at IRQL > APC_LEVEL (%d)\n", file, line, KeGetCurrentIrql());
KEBUGCHECK(0);
ASSERT(FALSE);
}
}
#endif

View file

@ -84,7 +84,7 @@ SeInitializeProcessAuditName(IN PFILE_OBJECT FileObject,
(!(NT_SUCCESS(Status)) || (ReturnLength == sizeof(LocalNameInfo))))
{
/* First, free any buffer we might've allocated */
KEBUGCHECK(0);
ASSERT(FALSE);
if (ObjectNameInfo) ExFreePool(ObjectNameInfo);
/* Now allocate a temporary one */

View file

@ -2277,7 +2277,7 @@ NtOpenThreadTokenEx(IN HANDLE ThreadHandle,
PrimaryToken = PsReferencePrimaryToken(Thread->ThreadsProcess);
Status = SepCreateImpersonationTokenDacl(Token, PrimaryToken, &Dacl);
KEBUGCHECK(0);
ASSERT(FALSE);
ObfDereferenceObject(PrimaryToken);
ObfDereferenceObject(Thread);
if (!NT_SUCCESS(Status))