Add valgrind-3.12.0-helgrind-dl_allocate_tls-supp.patch

This commit is contained in:
Mark Wielaard 2017-02-18 17:03:59 +01:00
parent 14f4a15e5a
commit 3d78a78425
2 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,47 @@
commit 4b00bfdd73a2cd56a4d9e8de0b249eed2a1b982f
Author: petarj <petarj@a5019735-40e9-0310-863c-91ae7b9d1cf9>
Date: Fri Feb 3 00:34:52 2017 +0000
add suppression for helgrind/tests/tc22_exit_w_lock
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 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/glibc-2.34567-NPTL-helgrind.supp b/glibc-2.34567-NPTL-helgrind.supp
index ed105b8..7ebd2c4 100644
--- a/glibc-2.34567-NPTL-helgrind.supp
+++ b/glibc-2.34567-NPTL-helgrind.supp
@@ -267,6 +267,18 @@
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
#

View File

@ -113,6 +113,9 @@ Patch14: valgrind-3.12.0-cd-dvd-ioctl.patch
# KDE#373069 force old implementation of std::string for leak_cpp_interior test
Patch15: valgrind-3.12.0-tests-cxx11_abi_0.patch
# KDE#375806 add suppression for helgrind/tests/tc22_exit_w_lock
Patch16: valgrind-3.12.0-helgrind-dl_allocate_tls-supp.patch
%if %{build_multilib}
# Ensure glibc{,-devel} is installed for both multilib arches
BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
@ -237,6 +240,7 @@ Valgrind User Manual for details.
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%build
# We need to use the software collection compiler and binutils if available.
@ -440,6 +444,7 @@ echo ===============END TESTING===============
- Add valgrind-3.12.0-x86-gdt-and-ss.patch
- Add valgrind-3.12.0-cd-dvd-ioctl.patch
- Add valgrind-3.12.0-tests-cxx11_abi_0.patch
- Add valgrind-3.12.0-helgrind-dl_allocate_tls-supp.patch
* Fri Feb 17 2017 Mark Wielaard <mjw@redhat.com> - 3.12.0-5
- Add valgrind-3.12.0-ppc64-r2.patch (#1424367)