describe_malloced_addr(dri->addr, dri->size, &ai);
}
VG_(message)(Vg_UserMsg,
- "Conflicting %s by thread %d at 0x%08lx size %ld",
+ "Conflicting %s by thread %d/%d at 0x%08lx size %ld",
dri->access_type == eStore ? "store" : "load",
DrdThreadIdToVgThreadId(dri->tid),
- /*dri->tid,*/
+ dri->tid,
dri->addr,
dri->size);
VG_(pp_ExeContext)(VG_(get_error_where)(err));
case CondDestrErr: {
CondDestrErrInfo* cdi = (CondDestrErrInfo*)(VG_(get_error_extra)(e));
VG_(message)(Vg_UserMsg,
- "%s: cond 0x%lx, mutex 0x%lx locked by thread %d",
- cdi->cond, cdi->mutex, cdi->tid);
+ "%s: cond 0x%lx, mutex 0x%lx locked by thread %d/%d",
+ cdi->cond, cdi->mutex,
+ DrdThreadIdToVgThreadId(cdi->tid), cdi->tid);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
break;
}
{
char msg[256];
VG_(snprintf)(msg, sizeof(msg),
- "New segment for thread %d with vc ",
- creator);
+ "New segment for thread %d/%d with vc ",
+ DrdThreadIdToVgThreadId(creator), creator);
vc_snprint(msg + VG_(strlen)(msg), sizeof(msg) - VG_(strlen)(msg),
&sg->vc);
VG_(message)(Vg_UserMsg, "%s", msg);
/* ignored. */
void thread_set_stack_startup(const DrdThreadId tid, const Addr stack_startup)
{
-#if 0
- VG_(message)(Vg_DebugMsg, "thread_set_stack_startup: thread %d (%d)"
- " stack 0x%x .. 0x%lx (size %d)",
- s_threadinfo[tid].vg_threadid, tid,
- stack_startup,
- s_threadinfo[tid].stack_max,
- s_threadinfo[tid].stack_max - stack_startup);
-#endif
tl_assert(0 <= tid && tid < DRD_N_THREADS && tid != DRD_INVALID_THREADID);
tl_assert(s_threadinfo[tid].stack_min <= stack_startup);
tl_assert(stack_startup <= s_threadinfo[tid].stack_max);
&& s_drd_running_tid != DRD_INVALID_THREADID)
{
VG_(message)(Vg_DebugMsg,
- "Context switch from thread %d to thread %d",
- s_drd_running_tid, drd_tid);
+ "Context switch from thread %d/%d to thread %d/%d",
+ s_vg_running_tid, s_drd_running_tid,
+ DrdThreadIdToVgThreadId(drd_tid), drd_tid);
}
s_vg_running_tid = vg_tid;
s_drd_running_tid = drd_tid;
{
const ThreadId vg_tid = DrdThreadIdToVgThreadId(tid);
- VG_(message)(Vg_UserMsg, "%s (thread %d)", msg, /*vg_tid,*/ tid);
+ VG_(message)(Vg_UserMsg, "%s (thread %d/%d)", msg, vg_tid, tid);
if (vg_tid != VG_INVALID_THREADID)
{
char msg[256];
VG_(snprintf)(msg, sizeof(msg),
- "computing danger set for thread %d with vc ",
- tid);
+ "computing danger set for thread %d/%d with vc ",
+ DrdThreadIdToVgThreadId(tid), tid);
vc_snprint(msg + VG_(strlen)(msg),
sizeof(msg) - VG_(strlen)(msg),
&s_threadinfo[tid].last->vc);
-Conflicting load by thread 1 at 0x........ size 8
+Conflicting load by thread 1/1 at 0x........ size 8
at 0x........: main (fp_race.c:?)
Location 0x........ is 0 bytes inside local var "s_d3"
declared at fp_race.c:47, in frame #? of thread 1
-Other segment start (thread 2)
+Other segment start (thread 0/2)
(thread finished, call stack no longer available)
-Other segment end (thread 2)
+Other segment end (thread 0/2)
(thread finished, call stack no longer available)
-Conflicting store by thread 1 at 0x........ size 8
+Conflicting store by thread 1/1 at 0x........ size 8
at 0x........: main (fp_race.c:?)
Location 0x........ is 0 bytes inside local var "s_d3"
declared at fp_race.c:47, in frame #? of thread 1
-Other segment start (thread 2)
+Other segment start (thread 0/2)
(thread finished, call stack no longer available)
-Other segment end (thread 2)
+Other segment end (thread 0/2)
(thread finished, call stack no longer available)
ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
Thread 3:
-Conflicting store by thread 3 at 0x........ size 4
+Conflicting store by thread 3/3 at 0x........ size 4
at 0x........: t2 (hg03_inherit.c:28)
by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
Location 0x........ is 0 bytes inside shared[1],
declared at hg03_inherit.c:11, in frame #? of thread 3
-Other segment start (thread 1)
+Other segment start (thread 1/1)
at 0x........: pthread_join (drd_pthread_intercepts.c:?)
by 0x........: main (hg03_inherit.c:49)
-Other segment end (thread 1)
+Other segment end (thread 1/1)
at 0x........: (within libpthread-?.?.so)
by 0x........: pthread_join (drd_pthread_intercepts.c:?)
by 0x........: main (hg03_inherit.c:63)
-Conflicting store by thread 3 at 0x........ size 4
+Conflicting store by thread 3/3 at 0x........ size 4
at 0x........: t2 (hg03_inherit.c:29)
by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
Location 0x........ is 0 bytes inside shared[1],
declared at hg03_inherit.c:11, in frame #? of thread 3
-Other segment start (thread 1)
+Other segment start (thread 1/1)
at 0x........: pthread_join (drd_pthread_intercepts.c:?)
by 0x........: main (hg03_inherit.c:49)
-Other segment end (thread 1)
+Other segment end (thread 1/1)
at 0x........: (within libpthread-?.?.so)
by 0x........: pthread_join (drd_pthread_intercepts.c:?)
by 0x........: main (hg03_inherit.c:63)
Thread 2:
-Conflicting load by thread 2 at 0x........ size 4
+Conflicting load by thread 2/3 at 0x........ size 4
at 0x........: th (hg04_race.c:10)
by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
Location 0x........ is 0 bytes inside local var "shared"
declared at hg04_race.c:6, in frame #? of thread 2
-Other segment start (thread 2)
+Other segment start (thread 0/2)
(thread finished, call stack no longer available)
-Other segment end (thread 2)
+Other segment end (thread 0/2)
(thread finished, call stack no longer available)
-Conflicting store by thread 2 at 0x........ size 4
+Conflicting store by thread 2/3 at 0x........ size 4
at 0x........: th (hg04_race.c:10)
by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
Location 0x........ is 0 bytes inside local var "shared"
declared at hg04_race.c:6, in frame #? of thread 2
-Other segment start (thread 2)
+Other segment start (thread 0/2)
(thread finished, call stack no longer available)
-Other segment end (thread 2)
+Other segment end (thread 0/2)
(thread finished, call stack no longer available)
ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
Thread 2:
-Conflicting load by thread 2 at 0x........ size 4
+Conflicting load by thread 2/3 at 0x........ size 4
at 0x........: th (hg05_race2.c:17)
by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
Location 0x........ is 0 bytes inside foo.poot[5].plop[11],
declared at hg05_race2.c:24, in frame #? of thread 1
-Other segment start (thread 2)
+Other segment start (thread 0/2)
(thread finished, call stack no longer available)
-Other segment end (thread 2)
+Other segment end (thread 0/2)
(thread finished, call stack no longer available)
-Conflicting store by thread 2 at 0x........ size 4
+Conflicting store by thread 2/3 at 0x........ size 4
at 0x........: th (hg05_race2.c:17)
by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
Location 0x........ is 0 bytes inside foo.poot[5].plop[11],
declared at hg05_race2.c:24, in frame #? of thread 1
-Other segment start (thread 2)
+Other segment start (thread 0/2)
(thread finished, call stack no longer available)
-Other segment end (thread 2)
+Other segment end (thread 0/2)
(thread finished, call stack no longer available)
ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
Thread 2:
-Conflicting load by thread 2 at 0x........ size 4
+Conflicting load by thread 2/3 at 0x........ size 4
at 0x........: thread (rwlock_race.c:?)
by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
Location 0x........ is 0 bytes inside local var "s_racy"
declared at rwlock_race.c:17, in frame #? of thread 2
-Other segment start (thread 2)
+Other segment start (thread 0/2)
(thread finished, call stack no longer available)
-Other segment end (thread 2)
+Other segment end (thread 0/2)
(thread finished, call stack no longer available)
-Conflicting store by thread 2 at 0x........ size 4
+Conflicting store by thread 2/3 at 0x........ size 4
at 0x........: thread (rwlock_race.c:?)
by 0x........: vg_thread_wrapper (drd_pthread_intercepts.c:?)
by 0x........: (within libpthread-?.?.so)
by 0x........: clone (in /...libc...)
Location 0x........ is 0 bytes inside local var "s_racy"
declared at rwlock_race.c:17, in frame #? of thread 2
-Other segment start (thread 2)
+Other segment start (thread 0/2)
(thread finished, call stack no longer available)
-Other segment end (thread 2)
+Other segment end (thread 0/2)
(thread finished, call stack no longer available)
Result: 2
-Conflicting load by thread 1 at 0x........ size 8
+Conflicting load by thread 1/1 at 0x........ size 8
at 0x........: main (sem_as_mutex.c:?)
Location 0x........ is 0 bytes inside local var "s_d3"
declared at sem_as_mutex.c:48, in frame #? of thread 1
-Other segment start (thread 2)
+Other segment start (thread 0/2)
(thread finished, call stack no longer available)
-Other segment end (thread 2)
+Other segment end (thread 0/2)
(thread finished, call stack no longer available)
-Conflicting store by thread 1 at 0x........ size 8
+Conflicting store by thread 1/1 at 0x........ size 8
at 0x........: main (sem_as_mutex.c:?)
Location 0x........ is 0 bytes inside local var "s_d3"
declared at sem_as_mutex.c:48, in frame #? of thread 1
-Other segment start (thread 2)
+Other segment start (thread 0/2)
(thread finished, call stack no longer available)
-Other segment end (thread 2)
+Other segment end (thread 0/2)
(thread finished, call stack no longer available)
ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
-Conflicting load by thread 1 at 0x........ size 4
+Conflicting load by thread 1/1 at 0x........ size 4
at 0x........: main (tc01_simple_race.c:28)
Location 0x........ is 0 bytes inside global var "x"
declared at tc01_simple_race.c:9
-Other segment start (thread 2)
+Other segment start (thread 0/2)
(thread finished, call stack no longer available)
-Other segment end (thread 2)
+Other segment end (thread 0/2)
(thread finished, call stack no longer available)
-Conflicting store by thread 1 at 0x........ size 4
+Conflicting store by thread 1/1 at 0x........ size 4
at 0x........: main (tc01_simple_race.c:28)
Location 0x........ is 0 bytes inside global var "x"
declared at tc01_simple_race.c:9
-Other segment start (thread 2)
+Other segment start (thread 0/2)
(thread finished, call stack no longer available)
-Other segment end (thread 2)
+Other segment end (thread 0/2)
(thread finished, call stack no longer available)
ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
-Conflicting load by thread 1 at 0x........ size 1
+Conflicting load by thread 1/1 at 0x........ size 1
at 0x........: main (tc16_byterace.c:34)
Location 0x........ is 0 bytes inside bytes[4],
a global variable declared at tc16_byterace.c:7
-Other segment start (thread 2)
+Other segment start (thread 0/2)
(thread finished, call stack no longer available)
-Other segment end (thread 2)
+Other segment end (thread 0/2)
(thread finished, call stack no longer available)
-Conflicting store by thread 1 at 0x........ size 1
+Conflicting store by thread 1/1 at 0x........ size 1
at 0x........: main (tc16_byterace.c:34)
Location 0x........ is 0 bytes inside bytes[4],
a global variable declared at tc16_byterace.c:7
-Other segment start (thread 2)
+Other segment start (thread 0/2)
(thread finished, call stack no longer available)
-Other segment end (thread 2)
+Other segment end (thread 0/2)
(thread finished, call stack no longer available)
ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
---------------- pthread_create/join ----------------
-Conflicting store by thread 1 at 0x........ size 2
+Conflicting store by thread 1/1 at 0x........ size 2
at 0x........: main (tc20_verifywrap.c:78)
Location 0x........ is 0 bytes inside global var "unprotected"
declared at tc20_verifywrap.c:27
-Other segment start (thread 2)
+Other segment start (thread 0/2)
(thread finished, call stack no longer available)
-Other segment end (thread 2)
+Other segment end (thread 0/2)
(thread finished, call stack no longer available)
---------------- pthread_mutex_lock et al ----------------
---------------- pthread_create/join ----------------
-Conflicting store by thread 1 at 0x........ size 2
+Conflicting store by thread 1/1 at 0x........ size 2
at 0x........: main (tc20_verifywrap.c:78)
Location 0x........ is 0 bytes inside global var "unprotected"
declared at tc20_verifywrap.c:27
-Other segment start (thread 2)
+Other segment start (thread 0/2)
(thread finished, call stack no longer available)
-Other segment end (thread 2)
+Other segment end (thread 0/2)
(thread finished, call stack no longer available)
---------------- pthread_mutex_lock et al ----------------