From: Bart Van Assche Date: Mon, 24 Mar 2008 19:31:33 +0000 (+0000) Subject: Modified error message that is printed when a mutex operation is attempted on an... X-Git-Tag: svn/VALGRIND_3_4_0~803 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ed3fefb42efe104598032f09fbb8e86c46b1b0ae;p=thirdparty%2Fvalgrind.git Modified error message that is printed when a mutex operation is attempted on an object that is not a mutex. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7783 --- diff --git a/exp-drd/drd_error.c b/exp-drd/drd_error.c index 86c40a2dcd..8851f612ae 100644 --- a/exp-drd/drd_error.c +++ b/exp-drd/drd_error.c @@ -145,8 +145,7 @@ static void drd_tool_error_pp(Error* const e) else { VG_(message)(Vg_UserMsg, - "%s: mutex 0x%lx.", - VG_(get_error_string)(e), + "The object at address 0x%lx is not a mutex.", p->mutex); } VG_(pp_ExeContext)(VG_(get_error_where)(e)); diff --git a/exp-drd/tests/tc09_bad_unlock.stderr.exp b/exp-drd/tests/tc09_bad_unlock.stderr.exp index a7e55444aa..31aaabc295 100644 --- a/exp-drd/tests/tc09_bad_unlock.stderr.exp +++ b/exp-drd/tests/tc09_bad_unlock.stderr.exp @@ -13,7 +13,7 @@ Mutex not locked by calling thread: mutex 0x........, recursion count 1, owner 1 by 0x........: clone (in /...libc...) Thread 1: -Not a mutex: mutex 0x......... +The object at address 0x........ is not a mutex. at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?) by 0x........: nearly_main (tc09_bad_unlock.c:41) by 0x........: main (tc09_bad_unlock.c:49) @@ -36,7 +36,7 @@ Mutex not locked by calling thread: mutex 0x........, recursion count 1, owner 1 by 0x........: clone (in /...libc...) Thread 1: -Not a mutex: mutex 0x......... +The object at address 0x........ is not a mutex. at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?) by 0x........: nearly_main (tc09_bad_unlock.c:41) by 0x........: main (tc09_bad_unlock.c:50) diff --git a/exp-drd/tests/tc20_verifywrap.stderr.exp-glibc2.3 b/exp-drd/tests/tc20_verifywrap.stderr.exp-glibc2.3 index 694c1d5607..1385cd1ea4 100644 --- a/exp-drd/tests/tc20_verifywrap.stderr.exp-glibc2.3 +++ b/exp-drd/tests/tc20_verifywrap.stderr.exp-glibc2.3 @@ -17,7 +17,7 @@ Other segment end (thread 0/2) ---------------- pthread_mutex_lock et al ---------------- -Not a mutex +The object at address 0x........ is not a mutex. at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:92) @@ -28,15 +28,15 @@ Destroying locked mutex: mutex 0x........, recursion count 1, owner 1. make pthread_mutex_lock fail: skipped on glibc < 2.4 -Not a mutex +The object at address 0x........ is not a mutex. at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:116) -Not a mutex +The object at address 0x........ is not a mutex. at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:121) -Not a mutex +The object at address 0x........ is not a mutex. at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:125) diff --git a/exp-drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b b/exp-drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b index 961f39add0..32b6735a68 100644 --- a/exp-drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b +++ b/exp-drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b @@ -18,7 +18,7 @@ Other segment end (thread 0/2) [1/1] mutex_init invalid mutex 0x........ -Not a mutex +The object at address 0x........ is not a mutex. at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:92) [1/1] mutex_init mutex 0x........ @@ -34,19 +34,19 @@ make pthread_mutex_lock fail: skipped on glibc < 2.4 [1/1] pre_mutex_lock invalid mutex 0x........ rc 0 owner 0 -Not a mutex +The object at address 0x........ is not a mutex. at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:116) [1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 [1/1] pre_mutex_lock invalid mutex 0x........ rc 0 owner 0 -Not a mutex +The object at address 0x........ is not a mutex. at 0x........: pthread_mutex_timedlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:121) [1/1] post_mutex_lock invalid mutex 0x........ rc 0 owner 0 [1/1] mutex_unlock invalid mutex 0x........ rc 0 -Not a mutex +The object at address 0x........ is not a mutex. at 0x........: pthread_mutex_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:125) diff --git a/exp-drd/tests/tc23_bogus_condwait.stderr.exp b/exp-drd/tests/tc23_bogus_condwait.stderr.exp index afbf17b7ba..ca0ec2ba30 100644 --- a/exp-drd/tests/tc23_bogus_condwait.stderr.exp +++ b/exp-drd/tests/tc23_bogus_condwait.stderr.exp @@ -1,5 +1,5 @@ -Not a mutex: mutex 0x......... +The object at address 0x........ is not a mutex. at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?) by 0x........: main (tc23_bogus_condwait.c:69) @@ -7,7 +7,7 @@ Mutex not locked: mutex 0x........, recursion count 0, owner 0. at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?) by 0x........: main (tc23_bogus_condwait.c:72) -Not a mutex: mutex 0x......... +The object at address 0x........ is not a mutex. at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?) by 0x........: main (tc23_bogus_condwait.c:75)