Bug 1011713

Summary: valgrind finds errors in strchr/index
Product: [Fedora] Fedora Reporter: Jerry James <loganjerry>
Component: valgrindAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dodji, jakub, mjw, mjw
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: valgrind-3.8.1-30.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-26 21:23:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jerry James 2013-09-24 22:44:56 UTC
Description of problem:
I maintain the stp package.  It is currently failing to build in Rawhide on x86_64 because its self-tests use valgrind to check for memory leaks, and it is getting this:

==22918== Memcheck, a memory error detector
==22918== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==22918== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==22918== Command: ./a3.out
==22918== 
==22918== Use of uninitialised value of size 8
==22918==    at 0x401953D: index (in /usr/lib64/ld-2.18.90.so)
==22918==    by 0x4007DAD: expand_dynamic_string_token (in /usr/lib64/ld-2.18.90.so)
==22918==    by 0x400886F: _dl_map_object (in /usr/lib64/ld-2.18.90.so)
==22918==    by 0x400142D: map_doit (in /usr/lib64/ld-2.18.90.so)
==22918==    by 0x400FA93: _dl_catch_error (in /usr/lib64/ld-2.18.90.so)
==22918==    by 0x4001009: do_preload (in /usr/lib64/ld-2.18.90.so)
==22918==    by 0x4004440: dl_main (in /usr/lib64/ld-2.18.90.so)
==22918==    by 0x4016F34: _dl_sysdep_start (in /usr/lib64/ld-2.18.90.so)
==22918==    by 0x4004CF7: _dl_start (in /usr/lib64/ld-2.18.90.so)
==22918==    by 0x4001247: ??? (in /usr/lib64/ld-2.18.90.so)
==22918== 
testing getBVUnsignedLongLong function: f0000000effff000 
testing getBVUnsignedLongLong function: f0000000effff000 
testing getBVUnsignedLongLong function: f0000000effff000 
==22918== 
==22918== HEAP SUMMARY:
==22918==     in use at exit: 0 bytes in 0 blocks
==22918==   total heap usage: 365 allocs, 365 frees, 137,323 bytes allocated
==22918== 
==22918== All heap blocks were freed -- no leaks are possible
==22918== 
==22918== For counts of detected and suppressed errors, rerun with: -v
==22918== Use --track-origins=yes to see where uninitialised values come from
==22918== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 1 from 1)
make[1]: *** [3] Error 10
make[1]: Leaving directory `/builddir/build/BUILD/stp-0.1/tests/c-api-tests'
make: *** [baseTest] Error 1

Version-Release number of selected component (if applicable):
valgrind-3.8.1-28.fc21.x86_64

How reproducible:
Always

Steps to Reproduce:
1. fedpkg clone stp
2. cd stp
3. fedpkg srpm
4. mock -r fedora-rawhide-x86_64 --rebuild stp-0.1-16.20130223svn.fc21.src.rpm

Actual results:
The build fails with a valgrind error.

Expected results:
Successful build.

Additional info:

Comment 1 Mark Wielaard 2013-09-26 20:13:53 UTC
This is fixed upstream, and it only happens with the glibc in rawhide, f20 is fine. My current guess is that it is this: https://bugs.kde.org/show_bug.cgi?id=308627 but it is difficult to backport that and the followup patches to our valgrind-3.8.1 variant in fedora.

So lets add a suppression for now as workaround that can be removed when 3.9.0 is released and imported.

Please test valgrind-3.8.1-30.fc21.

Comment 2 Jerry James 2013-09-26 21:15:13 UTC
I just did a mock build with valgrind-3.8.1-30.fc21, and that resulted in a successful build of stp.  Thank you once again for a quick resolution to the problem, Mark.

Comment 3 Mark Wielaard 2013-09-26 21:23:45 UTC
Thanks for reporting and testing.