From: Julian Seward Date: Thu, 29 Nov 2007 12:53:25 +0000 (+0000) Subject: Don't assert when destroying a locked rwlock. X-Git-Tag: svn/VALGRIND_3_3_0~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dff66750ab00f713f9b1f25d09fc7631c90e583f;p=thirdparty%2Fvalgrind.git Don't assert when destroying a locked rwlock. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7250 --- diff --git a/helgrind/hg_main.c b/helgrind/hg_main.c index 2dd8fcbf21..d9deacdd3f 100644 --- a/helgrind/hg_main.c +++ b/helgrind/hg_main.c @@ -312,8 +312,9 @@ typedef /* 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 @@ void evh__HG_PTHREAD_RWLOCK_DESTROY_PRE( ThreadId tid, void* rwl ) HG_(deleteBag)( lk->heldBy ); lk->heldBy = NULL; lk->heldW = False; + lk->acquired_at = False; } tl_assert( !lk->heldBy ); tl_assert( is_sane_LockN(lk) );