Blame SOURCES/valgrind-3.12.0-helgrind-dl_allocate_tls-supp.patch

1f061d
commit 4b00bfdd73a2cd56a4d9e8de0b249eed2a1b982f
1f061d
Author: petarj <petarj@a5019735-40e9-0310-863c-91ae7b9d1cf9>
1f061d
Date:   Fri Feb 3 00:34:52 2017 +0000
1f061d
1f061d
    add suppression for helgrind/tests/tc22_exit_w_lock
1f061d
    
1f061d
    Function pthread_create indirectly calls function memcpy. Helgrind
1f061d
    considers that memcpy is not thread safe function. For error reported
1f061d
    from pthread_create there is the suppression helgrind---_dl_allocate_tls
1f061d
    in the file glibc-2.34567-NPTL-helgrind.supp.
1f061d
    Since glibc version 2.23, memcpy is implemented by __mempcpy_inline.
1f061d
    This causes that call to memcpy from pthread_create is no longer
1f061d
    recognized by the suppression.
1f061d
    In test helgrind/tests/tc22_exit_w_lock, pthread_create is called twice,
1f061d
    and second call reports error, which causes failing of the test.
1f061d
    This patch adds suppression for glibc 2.23 and greater.
1f061d
    
1f061d
    Patch by Tamara Vlahovic.
1f061d
    
1f061d
    Related issue #375806.
1f061d
    
1f061d
    
1f061d
    git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16219 a5019735-40e9-0310-863c-91ae7b9d1cf9
1f061d
1f061d
diff --git a/glibc-2.34567-NPTL-helgrind.supp b/glibc-2.34567-NPTL-helgrind.supp
1f061d
index ed105b8..7ebd2c4 100644
1f061d
--- a/glibc-2.34567-NPTL-helgrind.supp
1f061d
+++ b/glibc-2.34567-NPTL-helgrind.supp
1f061d
@@ -267,6 +267,18 @@
1f061d
    fun:pthread_create@*
1f061d
 }
1f061d
 
1f061d
+{
1f061d
+   helgrind---_dl_allocate_tls2
1f061d
+   Helgrind:Race
1f061d
+   fun:memcpy
1f061d
+   fun:__mempcpy_inline
1f061d
+   fun:_dl_allocate_tls_init
1f061d
+   ...
1f061d
+   fun:pthread_create@@GLIBC_2.2*
1f061d
+   fun:pthread_create_WRK
1f061d
+   fun:pthread_create@*
1f061d
+}
1f061d
+
1f061d
 ####################################################
1f061d
 # To do with GNU libgomp
1f061d
 #