Bug 375806

Summary: Test helgrind/tests/tc22_exit_w_lock fails with glibc 2.24
Product: [Developer tools] valgrind Reporter: Tamara Vlahovic <tamara.vlahovic>
Component: helgrindAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: normal CC: ivosh, mips32r2
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: New suppresion

Description Tamara Vlahovic 2017-01-31 16:30:08 UTC
Created attachment 103737 [details]
New suppresion

Function pthread_create indirectly calls function memcpy. Helgrind considers that memcpy is not thread safe function. For error reported from pthread_create there is the suppresion  helgrind---_dl_allocate_tls in the file glibc-2.34567-NPTL-helgrind.supp.
Since glibc version 2.23 memcpy is implemented by __mempcpy_inline. This causes that call to memcpy from pthread_create is no longer recognized by suppression.
In test helgrind/tests/tc22_exit_w_lock, pthread_create is called twice, and second call reports error, which causes failing of test.
Attached patch adds suppression for glibc 2.23 and grater.
Comment 1 Petar Jovanovic 2017-02-01 19:12:23 UTC
(In reply to Tamara Vlahovic from comment #0)
> Created attachment 103737 [details]
> New suppresion
> 
> Function pthread_create indirectly calls function memcpy. Helgrind considers
> that memcpy is not thread safe function. For error reported from
> pthread_create there is the suppresion  helgrind---_dl_allocate_tls in the
> file glibc-2.34567-NPTL-helgrind.supp.
> Since glibc version 2.23 memcpy is implemented by __mempcpy_inline. This
> causes that call to memcpy from pthread_create is no longer recognized by
> suppression.
> In test helgrind/tests/tc22_exit_w_lock, pthread_create is called twice, and
> second call reports error, which causes failing of test.
> Attached patch adds suppression for glibc 2.23 and grater.

This makes sense to me. Anybody else has a comment?
Comment 2 Petar Jovanovic 2017-02-03 01:06:32 UTC
Patch committed as r16219. Thank you.
Comment 3 Petar Jovanovic 2017-03-14 18:45:00 UTC
This issue should be closed now.