[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 06/10] xeniface: log error when StoreFreeWatch WatchRemove fails in retail


  • To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
  • From: david ambu <david.preetham@xxxxxxxxxx>
  • Date: Thu, 8 Oct 2026 13:01:58 +0100
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=google header.d=citrix.com header.i="@citrix.com" header.h="Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From"
  • Cc: david ambu <david.preetham@xxxxxxxxxx>
  • Delivery-date: Thu, 08 Oct 2026 12:05:22 +0000
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

ASSERT is stripped in retail. Add an Error() so teardown failures
are visible in traces without changing behavior.

Signed-off-by: david ambu <david.preetham@xxxxxxxxxx>
Assisted by Claude Sonnet 4.6
---
 src/xeniface/ioctl_store.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/xeniface/ioctl_store.c b/src/xeniface/ioctl_store.c
index 5e422b5..e0072f0 100644
--- a/src/xeniface/ioctl_store.c
+++ b/src/xeniface/ioctl_store.c
@@ -654,6 +654,9 @@ StoreFreeWatch(
                           Context->Watch);
 
     ASSERT(NT_SUCCESS(status)); // this is fatal since we'd leave an active 
watch without cleaning it up
+    if (!NT_SUCCESS(status))
+        Error("WatchRemove failed 0x%x: watch %p may fire on freed context 
%p\n",
+              status, Context->Watch, Context);
 
     ThreadAlert(Context->Thread);
     ThreadJoin(Context->Thread);
-- 
2.51.0.windows.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.