Author: sewardj
Date: 2007-11-29 12:53:25 +0000 (Thu, 29 Nov 2007)
New Revision: 7250

Log:
Don't assert when destroying a locked rwlock.

Modified:
   trunk/helgrind/hg_main.c


Modified: trunk/helgrind/hg_main.c
===================================================================
--- trunk/helgrind/hg_main.c    2007-11-29 03:08:32 UTC (rev 7249)
+++ trunk/helgrind/hg_main.c    2007-11-29 12:53:25 UTC (rev 7250)
@@ -312,8 +312,9 @@
       /* EXPOSITION */
       /* Place where lock first came to the attention of Helgrind. */
       ExeContext*   appeared_at;
-      /* Place where the lock most recently made an unlocked->locked
-         transition. */
+      /* If the lock is held, place where the lock most recently made
+         an unlocked->locked transition.  Must be sync'd with .heldBy:
+         either both NULL or both non-NULL. */
       ExeContext*   acquired_at;
       /* USEFUL-STATIC */
       Addr          guestaddr; /* Guest address of lock */
@@ -6240,6 +6241,7 @@
          HG_(deleteBag)( lk->heldBy );
          lk->heldBy = NULL;
          lk->heldW = False;
+         lk->acquired_at = False;
       }
       tl_assert( !lk->heldBy );
       tl_assert( is_sane_LockN(lk) );


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Valgrind-developers mailing list
Valgrind-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to