Bug 322258

Summary: No thread notification is printed if new thread reused tid of old thread that triggered last error
Product: [Developer tools] valgrind Reporter: Matthias Schwarzott <zzam>
Component: generalAssignee: Julian Seward <jseward>
Status: REPORTED ---    
Severity: normal CC: cpigat242
Priority: NOR    
Version: 3.9.0.SVN   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Testcase that shows current behaviour of not printing thread tid

Description Matthias Schwarzott 2013-07-11 20:13:17 UTC
When an error is printed, valgrind remembers the tid of the thread.
Only when the tid is different it prints a message about the current thread.
But new threads reuse free tids immediately (like file descriptors).

It would be better to either change the allocation order of tids, or to remember a generation number and compare that also.

In combination with threadnames introduced by bug #322254, that gives a better output.


Reproducible: Always
Comment 1 Matthias Schwarzott 2013-07-11 20:15:18 UTC
Created attachment 81066 [details]
Testcase that shows current behaviour of not printing thread tid

This testcase shows that the in the second thread reusing tid=2 no new "Thread 2:" line is printed.