Bug 324227 - memcheck false positive leak when a thread calls exit+block only reachable via other thread live register
Summary: memcheck false positive leak when a thread calls exit+block only reachable vi...
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: memcheck (show other bugs)
Version: 3.9.0.SVN
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-29 15:59 UTC by Philippe Waroquiers
Modified: 2013-10-21 19:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
uses VgSrc_ExitProcess (that was not used anymore) for marking live threads for sys_exit_group (9.17 KB, text/plain)
2013-08-29 16:00 UTC, Philippe Waroquiers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Waroquiers 2013-08-29 15:59:14 UTC
Valgrind implements exit (i.e. the syscall sys_exit_group) by terminating all threads.
This means registers in the threads that are not calling exit are not considered by the
leak search, which can lead to false positive leak.

See discussion in http://sourceforge.net/mailarchive/message.php?msg_id=31265957

Attached patch solves the problem by changing the way sys_exit_group is implemented,
ensuring the other live threads are marked specially for the leak search to still consider
the registers of the non_exiting threads. Note that the stack of these threads were already
considered by the leak search.
Comment 1 Philippe Waroquiers 2013-08-29 16:00:33 UTC
Created attachment 82011 [details]
uses VgSrc_ExitProcess (that was not used anymore) for marking live threads for sys_exit_group
Comment 2 Philippe Waroquiers 2013-10-21 19:57:41 UTC
Fixed in revision 13670