Hopefully Alex won't see this commit :P
-----Message d'origine-----
De : Ros-dev [mailto:ros-dev-bounces@reactos.org] De la part de Thomas Faber
Envoyé : mardi 1 septembre 2015 07:43
À : ros-dev(a)reactos.org
Objet : Re: [ros-dev] [ros-diffs] [sginsberg] 68888: - Remove all NT_ASSERT
from the kernel and replace with good old ASSERT, for ease of debugging,
especially for tests run on the build servers. There is no need to use
NT_ASSERT i...
I would understand a commit that does the exact opposite; I don't understand
this one. How exactly is ASSERT easier to debug?
NT_ASSERT on GCC should essentially be the same as ASSERT On MSVC/Windbg you
get lots of advantages:
- you can ignore specific asserts
- you can set different event filters for asserts vs other
breakpoints in the debugger
- the assert becomes a single instruction instead of a function call,
which means you can easily overwrite it with something else, or do a
"Set Instruction Pointer" without doing two "Step Out"s first
- You could change what KiRaiseAssertionHandler does to change
behavior, or probably even catch STATUS_ASSERTION_FAILURE exceptions
in code. This could e.g. allow assertions not to cause bugchecks if
you didn't select Debug mode in freeldr
On 2015-09-01 03:45, sginsberg(a)svn.reactos.org wrote:
Author: sginsberg
Date: Tue Sep 1 01:45:59 2015
New Revision: 68888
URL:
http://svn.reactos.org/svn/reactos?rev=68888&view=rev
Log:
- Remove all NT_ASSERT from the kernel and replace with good old ASSERT,
for ease
of debugging, especially for tests run on the build servers. There
is no need to use NT_ASSERT in the kernel.
- The fish is long gone.
Modified:
trunk/reactos/ntoskrnl/cc/copy.c
trunk/reactos/ntoskrnl/config/cmapi.c
trunk/reactos/ntoskrnl/config/cmparse.c
trunk/reactos/ntoskrnl/ex/handle.c
trunk/reactos/ntoskrnl/ex/win32k.c
trunk/reactos/ntoskrnl/io/iomgr/deviface.c
trunk/reactos/ntoskrnl/io/iomgr/driver.c
trunk/reactos/ntoskrnl/ke/arm/usercall.c
trunk/reactos/ntoskrnl/ke/i386/traphdlr.c
trunk/reactos/ntoskrnl/lpc/send.c
trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c
trunk/reactos/ntoskrnl/mm/ARM3/section.c
trunk/reactos/ntoskrnl/mm/ARM3/session.c
trunk/reactos/ntoskrnl/mm/ARM3/virtual.c
trunk/reactos/ntoskrnl/mm/arm/page.c
trunk/reactos/ntoskrnl/ob/oblife.c
trunk/reactos/ntoskrnl/se/accesschk.c
trunk/reactos/ntoskrnl/se/acl.c
trunk/reactos/ntoskrnl/se/audit.c
trunk/reactos/ntoskrnl/se/priv.c
trunk/reactos/ntoskrnl/se/sd.c
trunk/reactos/ntoskrnl/se/sid.c
trunk/reactos/ntoskrnl/wmi/wmidrv.c
Modified: trunk/reactos/ntoskrnl/cc/copy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/copy.c?re
v=68888&r1=68887&r2=68888&view=diff
============================================================================
==
--- trunk/reactos/ntoskrnl/cc/copy.c [iso-8859-1]
(original)
+++ trunk/reactos/ntoskrnl/cc/copy.c [iso-8859-1] Tue Sep 1 01:45:59
2015
@@ -453,7 +453,7 @@
TRUE,
Buffer,
IoStatus);
- NT_ASSERT(Success == TRUE);
+ ASSERT(Success == TRUE);
}
/*
@@ -479,7 +479,7 @@
Length,
TRUE,
Buffer);
- NT_ASSERT(Success == TRUE);
+ ASSERT(Success == TRUE);
}
/*
Modified: trunk/reactos/ntoskrnl/config/cmapi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmapi
.c?rev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
--- trunk/reactos/ntoskrnl/config/cmapi.c [iso-8859-1]
(original)
+++ trunk/reactos/ntoskrnl/config/cmapi.c [iso-8859-1] Tue Sep 1
01:45:59 2015
@@ -606,7 +606,7 @@
}
/* Copy the class data */
- NT_ASSERT(Length >= Offset);
+ ASSERT(Length >= Offset);
RtlCopyMemory(Info->KeyFullInformation.Class,
ClassData,
min(Node->ClassLength, Length -
Offset));
Modified: trunk/reactos/ntoskrnl/config/cmparse.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmpar
se.c?rev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
---
trunk/reactos/ntoskrnl/config/cmparse.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmparse.c [iso-8859-1] Tue Sep 1
01:45:59 2015
@@ -24,7 +24,7 @@
{
BOOLEAN NameValid = TRUE;
- NT_ASSERT(RemainingName->Length % sizeof(WCHAR) == 0);
+ ASSERT(RemainingName->Length % sizeof(WCHAR) == 0);
/* Check if there's nothing left in the name */
if (!(RemainingName->Buffer) ||
Modified: trunk/reactos/ntoskrnl/ex/handle.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/handle.c?
rev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
--- trunk/reactos/ntoskrnl/ex/handle.c [iso-8859-1]
(original)
+++ trunk/reactos/ntoskrnl/ex/handle.c [iso-8859-1] Tue Sep 1
01:45:59 2015
@@ -85,7 +85,7 @@
default:
- NT_ASSERT(FALSE);
+ ASSERT(FALSE);
Entry = NULL;
}
Modified: trunk/reactos/ntoskrnl/ex/win32k.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/win32k.c?
rev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
--- trunk/reactos/ntoskrnl/ex/win32k.c [iso-8859-1]
(original)
+++ trunk/reactos/ntoskrnl/ex/win32k.c [iso-8859-1] Tue Sep 1
01:45:59 2015
@@ -77,7 +77,7 @@
if (SessionEntry == NULL)
{
/* The requested session does not even exist! */
- NT_ASSERT(FALSE);
+ ASSERT(FALSE);
return STATUS_NOT_FOUND;
}
@@ -92,7 +92,7 @@
/* Cleanup and return */
MmQuitNextSession(SessionEntry);
- NT_ASSERT(FALSE);
+ ASSERT(FALSE);
return Status;
}
}
Modified: trunk/reactos/ntoskrnl/io/iomgr/deviface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/dev
iface.c?rev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
---
trunk/reactos/ntoskrnl/io/iomgr/deviface.c [iso-8859-1]
(original)
+++
trunk/reactos/ntoskrnl/io/iomgr/deviface.c [iso-8859-1] Tue Sep
1 01:45:59 2015
@@ -876,7 +876,7 @@
}
/* Add final NULL to ReturnBuffer */
- NT_ASSERT(ReturnBuffer.Length <= ReturnBuffer.MaximumLength);
+ ASSERT(ReturnBuffer.Length <= ReturnBuffer.MaximumLength);
if (ReturnBuffer.Length >= ReturnBuffer.MaximumLength)
{
PWSTR NewBuffer;
Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/dri
ver.c?rev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
---
trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/driver.c [iso-8859-1] Tue Sep 1
01:45:59 2015
@@ -934,7 +934,7 @@
NextEntry = NextEntry->Flink;
}
- NT_ASSERT(NextEntry != &PsLoadedModuleList);
+ ASSERT(NextEntry != &PsLoadedModuleList);
/*
* Initialize the driver
@@ -1374,7 +1374,7 @@
/* Set the unload invoked flag and call the unload routine */
DriverObject->Flags |= DRVO_UNLOAD_INVOKED;
Status = IopLoadUnloadDriver(NULL, &DriverObject);
- NT_ASSERT(Status == STATUS_SUCCESS);
+ ASSERT(Status == STATUS_SUCCESS);
/* Mark the driver object temporary, so it could be deleted later
*/
ObMakeTemporaryObject(DriverObject);
@@ -1874,7 +1874,7 @@
{
PLOAD_UNLOAD_PARAMS LoadParams = Parameter;
- NT_ASSERT(PsGetCurrentProcess() == PsInitialSystemProcess);
+ ASSERT(PsGetCurrentProcess() == PsInitialSystemProcess);
LoadParams->Status = IopLoadUnloadDriver(LoadParams->RegistryPath,
&LoadParams->DriverObject);
KeSetEvent(&LoadParams->Event, 0, FALSE);
Modified: trunk/reactos/ntoskrnl/ke/arm/usercall.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/arm/userc
all.c?rev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
---
trunk/reactos/ntoskrnl/ke/arm/usercall.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/arm/usercall.c [iso-8859-1] Tue Sep 1
01:45:59 2015
@@ -312,7 +312,7 @@
OUT PVOID *Result,
OUT PULONG ResultLength) {
- NT_ASSERT(FALSE);
+ ASSERT(FALSE);
return STATUS_NOT_IMPLEMENTED;
}
@@ -322,7 +322,7 @@
IN PVOID *OutputBuffer,
IN PULONG OutputLength)
{
- NT_ASSERT(FALSE);
+ ASSERT(FALSE);
return STATUS_NOT_IMPLEMENTED;
}
@@ -333,7 +333,7 @@
_In_ ULONG ResultLength,
_In_ NTSTATUS CallbackStatus)
{
- NT_ASSERT(FALSE);
+ ASSERT(FALSE);
return STATUS_NOT_IMPLEMENTED;
}
Modified: trunk/reactos/ntoskrnl/ke/i386/traphdlr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/trap
hdlr.c?rev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
---
trunk/reactos/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] Tue Sep 1
01:45:59
2015
@@ -1537,7 +1537,7 @@
Thread = KeGetCurrentThread();
Thread->TrapFrame = TrapFrame;
Thread->PreviousMode = KiUserTrap(TrapFrame);
- NT_ASSERT(Thread->PreviousMode != KernelMode);
+ ASSERT(Thread->PreviousMode != KernelMode);
/* Pass the register parameters to NtCallbackReturn.
Result pointer is in ecx, result length in edx, status in eax
*/
Modified: trunk/reactos/ntoskrnl/lpc/send.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/send.c?r
ev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
--- trunk/reactos/ntoskrnl/lpc/send.c [iso-8859-1]
(original)
+++ trunk/reactos/ntoskrnl/lpc/send.c [iso-8859-1] Tue Sep 1 01:45:59
2015
@@ -793,7 +793,7 @@
MessageType = LocalLpcRequest.u2.s2.Type;
/* Due to the above probe, we know that TotalLength is positive */
- NT_ASSERT(LocalLpcRequest.u1.s1.TotalLength >= 0);
+ ASSERT(LocalLpcRequest.u1.s1.TotalLength >= 0);
/* Validate the length */
if ((((ULONG)(USHORT)LocalLpcRequest.u1.s1.DataLength +
sizeof(PORT_MESSAGE)) >
Modified: trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pagf
ault.c?rev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
---
trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] Tue Sep 1
01:45:59
2015
@@ -189,7 +189,7 @@
/* Check if this is a guard page */
if ((ProtectionMask & MM_PROTECT_SPECIAL) == MM_GUARDPAGE)
{
- NT_ASSERT(ProtectionMask != MM_DECOMMIT);
+ ASSERT(ProtectionMask != MM_DECOMMIT);
/* Attached processes can't expand their stack */
if (KeIsAttachedProcess()) return STATUS_ACCESS_VIOLATION; @@
-200,7 +200,7 @@
/* Remove the guard page bit, and return a guard page violation
*/
TempPte.u.Soft.Protection = ProtectionMask
& ~MM_GUARDPAGE;
- NT_ASSERT(TempPte.u.Long != 0);
+ ASSERT(TempPte.u.Long != 0);
MI_WRITE_INVALID_PTE(PointerPte, TempPte);
return STATUS_GUARD_PAGE_VIOLATION;
}
@@ -1080,7 +1080,7 @@
}
/* There is no such thing as a decommitted prototype PTE */
- NT_ASSERT(TempPte.u.Long != MmDecommittedPte.u.Long);
+ ASSERT(TempPte.u.Long != MmDecommittedPte.u.Long);
/* Check for access rights on the PTE proper */
PteContents = *PointerPte;
@@ -1420,7 +1420,7 @@
/* Resolve */
Status = MiResolveTransitionFault(Address, PointerPte,
Process, LockIrql, &InPageBlock);
- NT_ASSERT(NT_SUCCESS(Status));
+ ASSERT(NT_SUCCESS(Status));
/* And now release the lock and leave*/
KeReleaseQueuedSpinLock(LockQueuePfnLock, LockIrql); @@
-2069,7 +2069,7 @@
if ((ProtectionCode & MM_PROTECT_SPECIAL) == MM_GUARDPAGE)
{
/* The VAD protection cannot be MM_DECOMMIT! */
- NT_ASSERT(ProtectionCode != MM_DECOMMIT);
+ ASSERT(ProtectionCode != MM_DECOMMIT);
/* Remove the bit */
TempPte.u.Soft.Protection = ProtectionCode &
~MM_GUARDPAGE; @@ -2185,7 +2185,7 @@
/* Write the prototype PTE */
TempPte = PrototypePte;
TempPte.u.Soft.Protection = ProtectionCode;
- NT_ASSERT(TempPte.u.Long != 0);
+ ASSERT(TempPte.u.Long != 0);
MI_WRITE_INVALID_PTE(PointerPte, TempPte);
}
else
Modified: trunk/reactos/ntoskrnl/mm/ARM3/section.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/sect
ion.c?rev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
---
trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] Tue Sep 1
01:45:59 2015
@@ -1121,7 +1121,7 @@
Status = MiSessionCommitPageTables(Base,
(PVOID)((ULONG_PTR)Base +
Buckets *
MI_SYSTEM_VIEW_BUCKET_SIZE));
- NT_ASSERT(NT_SUCCESS(Status));
+ ASSERT(NT_SUCCESS(Status));
}
/* Create the actual prototype PTEs for this mapping */
Modified: trunk/reactos/ntoskrnl/mm/ARM3/session.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/sess
ion.c?rev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
---
trunk/reactos/ntoskrnl/mm/ARM3/session.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/session.c [iso-8859-1] Tue Sep 1
01:45:59 2015
@@ -930,7 +930,7 @@
/* The parameter is the actual process! */
EntryProcess = SessionEntry;
- NT_ASSERT(EntryProcess != NULL);
+ ASSERT(EntryProcess != NULL);
/* Sanity checks */
ASSERT(KeGetCurrentIrql() <= APC_LEVEL); @@ -998,7 +998,7 @@
/* The parameter is the actual process! */
EntryProcess = SessionEntry;
- NT_ASSERT(EntryProcess != NULL);
+ ASSERT(EntryProcess != NULL);
/* Sanity checks */
ASSERT(KeGetCurrentIrql() <= APC_LEVEL); @@ -1039,7 +1039,7 @@
/* The parameter is the actual process! */
EntryProcess = SessionEntry;
- NT_ASSERT(EntryProcess != NULL);
+ ASSERT(EntryProcess != NULL);
/* Sanity checks */
ASSERT(KeGetCurrentIrql () <= APC_LEVEL);
Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/virt
ual.c?rev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
---
trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] Tue Sep 1
01:45:59 2015
@@ -7,7 +7,6 @@
*/
/* INCLUDES
*******************************************************************/
-/* So long, and Thanks for All the Fish */
#include <ntoskrnl.h>
#define NDEBUG
@@ -431,7 +430,7 @@
/* Make the page free. For prototypes, it will be made free
when
deleting the section object */
if (Pfn1->u2.ShareCount == 0)
{
- NT_ASSERT(Pfn1->u3.e2.ReferenceCount == 0);
+ ASSERT(Pfn1->u3.e2.ReferenceCount == 0);
/* And it should be in standby or modified list */
ASSERT((Pfn1->u3.e1.PageLocation == ModifiedPageList)
|| (Pfn1->u3.e1.PageLocation == StandbyPageList)); @@ -1887,7 +1886,7 @@
{
DPRINT1("MmQuerySectionView failed. MemoryArea=%p (%p-%p),
BaseAddress=%p\n",
MemoryArea,
MA_GetStartingAddress(MemoryArea),
MA_GetEndingAddress(MemoryArea), BaseAddress);
- NT_ASSERT(NT_SUCCESS(Status));
+ ASSERT(NT_SUCCESS(Status));
}
}
else
@@ -4856,7 +4855,7 @@
//
TempPte.u.Long = 0;
TempPte.u.Soft.Protection = ProtectionMask;
- NT_ASSERT(TempPte.u.Long != 0);
+ ASSERT(TempPte.u.Long != 0);
//
// Get the PTE, PDE and the last PTE for this address range
Modified: trunk/reactos/ntoskrnl/mm/arm/page.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/arm/page.
c?rev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
--- trunk/reactos/ntoskrnl/mm/arm/page.c [iso-8859-1]
(original)
+++ trunk/reactos/ntoskrnl/mm/arm/page.c [iso-8859-1] Tue Sep 1
01:45:59 2015
@@ -301,14 +301,14 @@
PVOID Address,
SWAPENTRY* SwapEntry)
{
- NT_ASSERT(FALSE);
+ ASSERT(FALSE);
}
BOOLEAN
NTAPI
MmIsDisabledPage(PEPROCESS Process, PVOID Address) {
- NT_ASSERT(FALSE);
+ ASSERT(FALSE);
return FALSE;
}
@@ -317,6 +317,6 @@
INIT_FUNCTION
MiInitializeSessionSpaceLayout(VOID)
{
- NT_ASSERT(FALSE);
-}
-
+ ASSERT(FALSE);
+}
+
Modified: trunk/reactos/ntoskrnl/ob/oblife.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/oblife.c?
rev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
--- trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1]
(original)
+++ trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1] Tue Sep 1
01:45:59 2015
@@ -1245,7 +1245,7 @@
/* Set the index and the entry into the object type array */
LocalObjectType->Index = ObpTypeObjectType->TotalNumberOfObjects;
- NT_ASSERT(LocalObjectType->Index != 0);
+ ASSERT(LocalObjectType->Index != 0);
if (LocalObjectType->Index < 32)
{
Modified: trunk/reactos/ntoskrnl/se/accesschk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/accesschk
.c?rev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
--- trunk/reactos/ntoskrnl/se/accesschk.c [iso-8859-1]
(original)
+++ trunk/reactos/ntoskrnl/se/accesschk.c [iso-8859-1] Tue Sep 1
01:45:59 2015
@@ -465,7 +465,7 @@
PAGED_CODE();
- NT_ASSERT(AccessMode != KernelMode);
+ ASSERT(AccessMode != KernelMode);
if (SecurityDescriptor == NULL)
return FALSE;
Modified: trunk/reactos/ntoskrnl/se/acl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/acl.c?rev
=68888&r1=68887&r2=68888&view=diff
============================================================================
==
--- trunk/reactos/ntoskrnl/se/acl.c [iso-8859-1]
(original)
+++ trunk/reactos/ntoskrnl/se/acl.c [iso-8859-1] Tue Sep 1 01:45:59
2015
@@ -439,10 +439,10 @@
PSID Sid;
BOOLEAN WriteTwoAces;
- NT_ASSERT(RtlValidAcl(AclSource));
- NT_ASSERT(AclSource->AclSize % sizeof(ULONG) == 0);
- NT_ASSERT(AclSource->Sbz1 == 0);
- NT_ASSERT(AclSource->Sbz2 == 0);
+ ASSERT(RtlValidAcl(AclSource));
+ ASSERT(AclSource->AclSize % sizeof(ULONG) == 0);
+ ASSERT(AclSource->Sbz1 == 0);
+ ASSERT(AclSource->Sbz2 == 0);
Written = 0;
if (*AclLength >= Written + sizeof(ACL)) @@ -457,18 +457,18 @@
CurrentSource = (PUCHAR)(AclSource + 1);
for (i = 0; i < AclSource->AceCount; i++)
{
- NT_ASSERT((ULONG_PTR)CurrentDest % sizeof(ULONG) == 0);
- NT_ASSERT((ULONG_PTR)CurrentSource % sizeof(ULONG) == 0);
+ ASSERT((ULONG_PTR)CurrentDest % sizeof(ULONG) == 0);
+ ASSERT((ULONG_PTR)CurrentSource % sizeof(ULONG) == 0);
AceDest = (PACCESS_ALLOWED_ACE)CurrentDest;
AceSource = (PACCESS_ALLOWED_ACE)CurrentSource;
/* These all have the same structure */
- NT_ASSERT(AceSource->Header.AceType == ACCESS_ALLOWED_ACE_TYPE ||
+ ASSERT(AceSource->Header.AceType == ACCESS_ALLOWED_ACE_TYPE
+ ||
AceSource->Header.AceType == ACCESS_DENIED_ACE_TYPE ||
AceSource->Header.AceType ==
SYSTEM_AUDIT_ACE_TYPE);
- NT_ASSERT(AceSource->Header.AceSize % sizeof(ULONG) == 0);
- NT_ASSERT(AceSource->Header.AceSize >= sizeof(*AceSource));
+ ASSERT(AceSource->Header.AceSize % sizeof(ULONG) == 0);
+ ASSERT(AceSource->Header.AceSize >= sizeof(*AceSource));
if (!SepShouldPropagateAce(AceSource->Header.AceFlags,
&AceFlags,
IsInherited, @@ -482,7 +482,7 @@
AceSize = AceSource->Header.AceSize;
Mask = AceSource->Mask;
Sid = (PSID)&AceSource->SidStart;
- NT_ASSERT(AceSize >= FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart) +
RtlLengthSid(Sid));
+ ASSERT(AceSize >=
FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart)
+ + RtlLengthSid(Sid));
WriteTwoAces = FALSE;
/* Map effective ACE to specific rights */ @@ -598,7 +598,7
@@
*IsInherited,
IsDirectoryObject,
GenericMapping);
- NT_ASSERT(Status == STATUS_BUFFER_TOO_SMALL);
+ ASSERT(Status == STATUS_BUFFER_TOO_SMALL);
/* Use the parent ACL only if it's not empty */
if (*AclLength != sizeof(ACL)) @@ -633,7 +633,7 @@
*IsInherited,
IsDirectoryObject,
GenericMapping);
- NT_ASSERT(Status == STATUS_BUFFER_TOO_SMALL);
+ ASSERT(Status == STATUS_BUFFER_TOO_SMALL);
}
return Acl;
}
Modified: trunk/reactos/ntoskrnl/se/audit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/audit.c?r
ev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
--- trunk/reactos/ntoskrnl/se/audit.c [iso-8859-1]
(original)
+++ trunk/reactos/ntoskrnl/se/audit.c [iso-8859-1] Tue Sep 1 01:45:59
2015
@@ -644,7 +644,7 @@
_SEH2_TRY
{
/* Loop all result entries (only 1 when no list was requested) */
- NT_ASSERT(UseResultList || (ResultListLength == 1));
+ ASSERT(UseResultList || (ResultListLength == 1));
for (i = 0; i < ResultListLength; i++)
{
AccessStatusList[i] = SafeAccessStatusList[i];
Modified: trunk/reactos/ntoskrnl/se/priv.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/priv.c?re
v=68888&r1=68887&r2=68888&view=diff
============================================================================
==
--- trunk/reactos/ntoskrnl/se/priv.c [iso-8859-1]
(original)
+++ trunk/reactos/ntoskrnl/se/priv.c [iso-8859-1] Tue Sep 1 01:45:59
2015
@@ -129,7 +129,7 @@
SepReleaseTokenLock(Token);
/* When we reached this point, we did not find all privileges */
- NT_ASSERT(Required > 0);
+ ASSERT(Required > 0);
return FALSE;
}
Modified: trunk/reactos/ntoskrnl/se/sd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/sd.c?rev=
68888&r1=68887&r2=68888&view=diff
============================================================================
==
--- trunk/reactos/ntoskrnl/se/sd.c [iso-8859-1]
(original)
+++ trunk/reactos/ntoskrnl/se/sd.c [iso-8859-1] Tue Sep 1 01:45:59
2015
@@ -864,7 +864,7 @@
Control |= (ObjectSd->Control & SE_OWNER_DEFAULTED);
}
OwnerLength = Owner ? RtlLengthSid(Owner) : 0;
- NT_ASSERT(OwnerLength % sizeof(ULONG) == 0);
+ ASSERT(OwnerLength % sizeof(ULONG) == 0);
/* Get group and group size */
if (SecurityInformation & GROUP_SECURITY_INFORMATION) @@ -878,7
+878,7 @@
Control |= (ObjectSd->Control & SE_GROUP_DEFAULTED);
}
GroupLength = Group ? RtlLengthSid(Group) : 0;
- NT_ASSERT(GroupLength % sizeof(ULONG) == 0);
+ ASSERT(GroupLength % sizeof(ULONG) == 0);
/* Get DACL and DACL size */
if (SecurityInformation & DACL_SECURITY_INFORMATION) @@ -1211,7
+1211,7 @@
}
}
OwnerLength = RtlLengthSid(Owner);
- NT_ASSERT(OwnerLength % sizeof(ULONG) == 0);
+ ASSERT(OwnerLength % sizeof(ULONG) == 0);
/* Inherit the Group SID */
if (ExplicitDescriptor != NULL)
@@ -1248,7 +1248,7 @@
return STATUS_INVALID_PRIMARY_GROUP;
}
GroupLength = RtlLengthSid(Group);
- NT_ASSERT(GroupLength % sizeof(ULONG) == 0);
+ ASSERT(GroupLength % sizeof(ULONG) == 0);
/* Inherit the DACL */
DaclLength = 0;
@@ -1283,7 +1283,7 @@
GenericMapping);
if (DaclPresent)
Control |= SE_DACL_PRESENT;
- NT_ASSERT(DaclLength % sizeof(ULONG) == 0);
+ ASSERT(DaclLength % sizeof(ULONG) == 0);
/* Inherit the SACL */
SaclLength = 0;
@@ -1318,7 +1318,7 @@
GenericMapping);
if (SaclPresent)
Control |= SE_SACL_PRESENT;
- NT_ASSERT(SaclLength % sizeof(ULONG) == 0);
+ ASSERT(SaclLength % sizeof(ULONG) == 0);
/* Allocate and initialize the new security descriptor */
Length = sizeof(SECURITY_DESCRIPTOR_RELATIVE) + @@ -1356,7
+1356,7 @@
SaclIsInherited,
IsDirectoryObject,
GenericMapping);
- NT_ASSERT(Status == STATUS_SUCCESS);
+ ASSERT(Status == STATUS_SUCCESS);
Descriptor->Sacl = Current;
Current += SaclLength;
}
@@ -1371,7 +1371,7 @@
DaclIsInherited,
IsDirectoryObject,
GenericMapping);
- NT_ASSERT(Status == STATUS_SUCCESS);
+ ASSERT(Status == STATUS_SUCCESS);
Descriptor->Dacl = Current;
Current += DaclLength;
}
Modified: trunk/reactos/ntoskrnl/se/sid.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/sid.c?rev
=68888&r1=68887&r2=68888&view=diff
============================================================================
==
--- trunk/reactos/ntoskrnl/se/sid.c [iso-8859-1]
(original)
+++ trunk/reactos/ntoskrnl/se/sid.c [iso-8859-1] Tue Sep 1 01:45:59
2015
@@ -499,8 +499,8 @@
RtlCopyMemory(CurrentDest,
SrcSidAndAttributes[i].Sid, SidLength);
/* Sanity checks */
- NT_ASSERT(RtlLengthSid(SidAndAttributes[i].Sid) ==
SidLength);
-
NT_ASSERT(RtlValidSid(SidAndAttributes[i].Sid));
+ ASSERT(RtlLengthSid(SidAndAttributes[i].Sid) ==
SidLength);
+
ASSERT(RtlValidSid(SidAndAttributes[i].Sid));
/* Update the current destination address */
CurrentDest += ALIGN_UP_BY(SidLength, sizeof(ULONG));
Modified: trunk/reactos/ntoskrnl/wmi/wmidrv.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/wmi/wmidrv.c
?rev=68888&r1=68887&r2=68888&view=diff
============================================================================
==
--- trunk/reactos/ntoskrnl/wmi/wmidrv.c [iso-8859-1]
(original)
+++ trunk/reactos/ntoskrnl/wmi/wmidrv.c [iso-8859-1] Tue Sep 1
01:45:59 2015
@@ -125,7 +125,7 @@
_Out_ PWSTR ObjectNameBuffer,
_In_ KPROCESSOR_MODE AccessMode)
{
- NT_ASSERT(AccessMode != KernelMode);
+ ASSERT(AccessMode != KernelMode);
_SEH2_TRY
{
_______________________________________________
Ros-dev mailing list
Ros-dev(a)reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev