Bug 322258 - No thread notification is printed if new thread reused tid of old thread that triggered last error
Summary: No thread notification is printed if new thread reused tid of old thread that...
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.9.0.SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-11 20:13 UTC by Matthias Schwarzott
Modified: 2016-04-09 12:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Testcase that shows current behaviour of not printing thread tid (3.93 KB, patch)
2013-07-11 20:15 UTC, Matthias Schwarzott
Details

Note You need to log in before you can comment on or make changes to this bug.
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.