The thread ID passed to DRD_(drd_thread_atfork_child)() is a Valgrind
thread ID instead of a DRD thread ID. This patch fixes bug 401578.
401277 More bugs in z13 support
401112 LLVM 5.0 generates comparison against partially initialized data
385411 s390x: z13 vector floating-point instructions not implemented
+401578 drd: crashes sometimes on fork()
Release 3.14.0 (9 October 2018)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
/** Called just after fork() in the child process. */
-void DRD_(drd_thread_atfork_child)(const DrdThreadId tid)
+void DRD_(drd_thread_atfork_child)(const ThreadId tid)
{
unsigned i;
for (i = 1; i < DRD_N_THREADS; i++)
{
- if (i == tid)
+ if (DRD_(g_threadinfo)[i].vg_threadid == tid)
continue;
if (DRD_(IsValidDrdThreadId(i)))
DRD_(thread_delete)(i, True);