]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fixed order of semaphore call stack and semaphore first observed call stack printing.
authorBart Van Assche <bvanassche@acm.org>
Thu, 3 Jul 2008 12:29:16 +0000 (12:29 +0000)
committerBart Van Assche <bvanassche@acm.org>
Thu, 3 Jul 2008 12:29:16 +0000 (12:29 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8343

exp-drd/drd_error.c
exp-drd/tests/tc18_semabuse.stderr.exp
exp-drd/tests/tc20_verifywrap.stderr.exp
exp-drd/tests/tc20_verifywrap.stderr.exp-glibc2.3
exp-drd/tests/tc20_verifywrap2.stderr.exp
exp-drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3
exp-drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b
exp-drd/tests/tc20_verifywrap2.stderr.exp-glibc2.8

index 72e781793b4adbe001b2a3a5fb13f5dc0b25c283..4c60c069f0f08723fc0bf91010e1ed456361f029 100644 (file)
@@ -235,8 +235,8 @@ static void drd_tool_error_pp(Error* const e)
                  "%s: semaphore 0x%lx",
                  VG_(get_error_string)(e),
                  sei->semaphore);
-    first_observed(sei->semaphore);
     VG_(pp_ExeContext)(VG_(get_error_where)(e));
+    first_observed(sei->semaphore);
     break;
   }
   case BarrierErr: {
index bfd3ab889cb8f93335df8a9801f917ec072dfa55..82f3fddf0bf75ee1a9276848667bab85af8fbffb 100644 (file)
@@ -1,16 +1,16 @@
 
 Semaphore reinitialization: semaphore 0x........
+   at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc18_semabuse.c:26)
 semaphore 0x........ was first observed at:
    at 0x........: sem_init* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc18_semabuse.c:23)
-   at 0x........: sem_init* (drd_pthread_intercepts.c:?)
-   by 0x........: main (tc18_semabuse.c:26)
 
 Invalid semaphore: semaphore 0x........
+   at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc18_semabuse.c:34)
 semaphore 0x........ was first observed at:
    at 0x........: sem_init* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc18_semabuse.c:23)
-   at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
-   by 0x........: main (tc18_semabuse.c:34)
 
 ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
index ce3fe3d957d8a0e58717bac0e9f2280c22ebd81a..1e531a84c859a8820be522d11bf9e4034cdd4203 100644 (file)
@@ -112,21 +112,21 @@ rwlock 0x........ was first observed at:
 
 
 Semaphore reinitialization: semaphore 0x........
+   at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc20_verifywrap.c:231)
 semaphore 0x........ was first observed at:
    at 0x........: sem_init* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc20_verifywrap.c:228)
-   at 0x........: sem_init* (drd_pthread_intercepts.c:?)
-   by 0x........: main (tc20_verifywrap.c:231)
 
 FIXME: can't figure out how to verify wrap of sem_destroy
 
 
 Invalid semaphore: semaphore 0x........
+   at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc20_verifywrap.c:242)
 semaphore 0x........ was first observed at:
    at 0x........: sem_init* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc20_verifywrap.c:228)
-   at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
-   by 0x........: main (tc20_verifywrap.c:242)
 
 FIXME: can't figure out how to verify wrap of sem_post
 
index d4d197661f82c1ae7d853ba280a36a6413c24270..a715c838a17acfcdbff0eedc6b0fd0ae7c43c911 100644 (file)
@@ -108,21 +108,21 @@ rwlock 0x........ was first observed at:
 
 
 Semaphore reinitialization: semaphore 0x........
+   at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc20_verifywrap.c:231)
 semaphore 0x........ was first observed at:
    at 0x........: sem_init* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc20_verifywrap.c:228)
-   at 0x........: sem_init* (drd_pthread_intercepts.c:?)
-   by 0x........: main (tc20_verifywrap.c:231)
 
 FIXME: can't figure out how to verify wrap of sem_destroy
 
 
 Invalid semaphore: semaphore 0x........
+   at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc20_verifywrap.c:242)
 semaphore 0x........ was first observed at:
    at 0x........: sem_init* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc20_verifywrap.c:228)
-   at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
-   by 0x........: main (tc20_verifywrap.c:242)
 
 FIXME: can't figure out how to verify wrap of sem_post
 
index c207a43c80fb45d4d46a310be6705a91ca336a1e..4feb3de1fa91bd99de15f5de84c8e636d7662024 100644 (file)
@@ -138,11 +138,11 @@ rwlock 0x........ was first observed at:
 [1/1] semaphore_init      0x........
 
 Semaphore reinitialization: semaphore 0x........
+   at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc20_verifywrap.c:231)
 semaphore 0x........ was first observed at:
    at 0x........: sem_init* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc20_verifywrap.c:228)
-   at 0x........: sem_init* (drd_pthread_intercepts.c:?)
-   by 0x........: main (tc20_verifywrap.c:231)
 
 FIXME: can't figure out how to verify wrap of sem_destroy
 
@@ -150,11 +150,11 @@ FIXME: can't figure out how to verify wrap of sem_destroy
 [1/1] semaphore_post_wait 0x........
 
 Invalid semaphore: semaphore 0x........
+   at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc20_verifywrap.c:242)
 semaphore 0x........ was first observed at:
    at 0x........: sem_init* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc20_verifywrap.c:228)
-   at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
-   by 0x........: main (tc20_verifywrap.c:242)
 [1/1] semaphore_post      0x........
 
 FIXME: can't figure out how to verify wrap of sem_post
index d732694563e887cdde6b9ca9faabc65e24b7287c..63c2d2a2a662bade3af0d0fcc35e85d3845c293f 100644 (file)
@@ -132,11 +132,11 @@ rwlock 0x........ was first observed at:
 [1/1] semaphore_init      0x........
 
 Semaphore reinitialization: semaphore 0x........
+   at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc20_verifywrap.c:231)
 semaphore 0x........ was first observed at:
    at 0x........: sem_init* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc20_verifywrap.c:228)
-   at 0x........: sem_init* (drd_pthread_intercepts.c:?)
-   by 0x........: main (tc20_verifywrap.c:231)
 
 FIXME: can't figure out how to verify wrap of sem_destroy
 
@@ -144,11 +144,11 @@ FIXME: can't figure out how to verify wrap of sem_destroy
 [1/1] semaphore_post_wait 0x........
 
 Invalid semaphore: semaphore 0x........
+   at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc20_verifywrap.c:242)
 semaphore 0x........ was first observed at:
    at 0x........: sem_init* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc20_verifywrap.c:228)
-   at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
-   by 0x........: main (tc20_verifywrap.c:242)
 [1/1] semaphore_post      0x........
 
 FIXME: can't figure out how to verify wrap of sem_post
index 48fee91feace7c1a140a0fd5be2b9eefe2fbd941..9ed459c301689c0e8f3fce2a8049b99adf54568a 100644 (file)
@@ -37,18 +37,27 @@ make pthread_mutex_lock fail: skipped on glibc < 2.4
 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)
+mutex 0x........ was first observed at:
+   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 (locking failed)
 [1/1] pre_mutex_lock  invalid mutex 0x........ rc 0 owner 0
 
 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)
+mutex 0x........ was first observed at:
+   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 (locking failed)
 [1/1] mutex_unlock    invalid mutex 0x........ rc 0
 
 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)
+mutex 0x........ was first observed at:
+   at 0x........: pthread_mutex_trylock (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc20_verifywrap.c:116)
 
 ---------------- pthread_cond_wait et al ----------------
 
@@ -59,6 +68,9 @@ The object at address 0x........ is not a mutex.
 Mutex not locked: mutex 0x........, recursion count 0, owner 0.
    at 0x........: pthread_cond_wait* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc20_verifywrap.c:147)
+mutex 0x........ was first observed at:
+   at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc20_verifywrap.c:145)
 [1/1] cond_pre_wait   cond 0x........
 [1/1] cond_post_wait  cond 0x........
 [1/1] cond_post_wait  error checking mutex 0x........ rc 0 owner 0
@@ -81,6 +93,9 @@ FIXME: can't figure out how to verify wrap of pthread_broadcast_signal
 Reader-writer lock not locked by calling thread: rwlock 0x.........
    at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc20_verifywrap.c:179)
+rwlock 0x........ was first observed at:
+   at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc20_verifywrap.c:178)
 (1) no error on next line
 (2) no error on next line
 (3)    ERROR on next line
@@ -88,10 +103,16 @@ Reader-writer lock not locked by calling thread: rwlock 0x.........
 Reader-writer lock not locked by calling thread: rwlock 0x.........
    at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc20_verifywrap.c:196)
+rwlock 0x........ was first observed at:
+   at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc20_verifywrap.c:186)
 
 Reader-writer lock reinitialization: rwlock 0x.........
    at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc20_verifywrap.c:199)
+rwlock 0x........ was first observed at:
+   at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc20_verifywrap.c:186)
 (4) no error on next line
 (5) no error on next line
 (6) no error on next line
@@ -101,6 +122,9 @@ Reader-writer lock reinitialization: rwlock 0x.........
 Reader-writer lock not locked by calling thread: rwlock 0x.........
    at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc20_verifywrap.c:212)
+rwlock 0x........ was first observed at:
+   at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc20_verifywrap.c:186)
 
 ---------------- sem_* ----------------
 
@@ -110,6 +134,9 @@ Reader-writer lock not locked by calling thread: rwlock 0x.........
 Semaphore reinitialization: semaphore 0x........
    at 0x........: sem_init* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc20_verifywrap.c:231)
+semaphore 0x........ was first observed at:
+   at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc20_verifywrap.c:228)
 
 FIXME: can't figure out how to verify wrap of sem_destroy
 
@@ -119,6 +146,9 @@ FIXME: can't figure out how to verify wrap of sem_destroy
 Invalid semaphore: semaphore 0x........
    at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc20_verifywrap.c:242)
+semaphore 0x........ was first observed at:
+   at 0x........: sem_init* (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc20_verifywrap.c:228)
 [1/1] semaphore_post      0x........
 
 FIXME: can't figure out how to verify wrap of sem_post
index 772e1bc57d9eb19f1c353a6bc79e140db53a3e90..7dcfa91188a38307f0a9733e1214710dd9942c20 100644 (file)
@@ -143,11 +143,11 @@ FIXME: can't figure out how to verify wrap of sem_destroy
 [1/1] semaphore_post_wait 0x........
 
 Invalid semaphore: semaphore 0x........
+   at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
+   by 0x........: main (tc20_verifywrap.c:242)
 semaphore 0x........ was first observed at:
    at 0x........: sem_init* (drd_pthread_intercepts.c:?)
    by 0x........: main (tc20_verifywrap.c:228)
-   at 0x........: sem_wait* (drd_pthread_intercepts.c:?)
-   by 0x........: main (tc20_verifywrap.c:242)
 [1/1] semaphore_post      0x........
 
 FIXME: can't figure out how to verify wrap of sem_post