From 59730dc09c878f5a1fd03ee5890a3c000251cb34 Mon Sep 17 00:00:00 2001 From: Rafal Harabien Date: Thu, 6 Oct 2011 19:53:51 +0000 Subject: [PATCH] [NTOSKRNL] - Set special value in Next ptr when Ex(f)InterlockedPopEntryList is called on checked build. Fixes all ntos:ExSingleList kmtests. svn path=/trunk/; revision=54027 --- reactos/ntoskrnl/ex/interlocked.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/reactos/ntoskrnl/ex/interlocked.c b/reactos/ntoskrnl/ex/interlocked.c index 9d0179c7d0d..c29e4ead6a6 100644 --- a/reactos/ntoskrnl/ex/interlocked.c +++ b/reactos/ntoskrnl/ex/interlocked.c @@ -210,6 +210,10 @@ ExInterlockedPopEntryList( /* Pop the first entry from the list */ ListEntry = PopEntryList(ListHead); +#if DBG + if (ListEntry) + ListEntry->Next = (PSINGLE_LIST_ENTRY)0xBADDD0FF; +#endif /* Release the spinlock and restore interrupts */ _ExiReleaseSpinLockAndRestoreInterupts(Lock, Enable); @@ -412,6 +416,10 @@ ExfInterlockedPopEntryList( /* Pop the first entry from the list */ ListEntry = PopEntryList(ListHead); +#if DBG + if (ListEntry) + ListEntry->Next = (PSINGLE_LIST_ENTRY)0xBADDD0FF; +#endif /* Release the spinlock and restore interrupts */ _ExiReleaseSpinLockAndRestoreInterupts(Lock, Enable);