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 suppression 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 the suppression.
In test helgrind/tests/tc22_exit_w_lock, pthread_create is called twice,
and second call reports error, which causes failing of the test.
This patch adds suppression for glibc 2.23 and greater.
Patch by Tamara Vlahovic.
Related issue #375806.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16219
375514 valgrind_get_tls_addr() does not work in case of static TLS
375772 +1 error in get_elf_symbol_info() when computing value of 'hi' address
for ML_(find_rx_mapping)()
+375806 Test helgrind/tests/tc22_exit_w_lock fails with glibc 2.24
Release 3.12.0 (20 October 2016)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fun:pthread_create@*
}
+{
+ helgrind---_dl_allocate_tls2
+ Helgrind:Race
+ fun:memcpy
+ fun:__mempcpy_inline
+ fun:_dl_allocate_tls_init
+ ...
+ fun:pthread_create@@GLIBC_2.2*
+ fun:pthread_create_WRK
+ fun:pthread_create@*
+}
+
####################################################
# To do with GNU libgomp
#