Bug 801841

Summary: Conditional jump or move depends on uninitialised value
Product: Red Hat Enterprise Linux 7 Reporter: Miroslav Franc <mfranc>
Component: valgrindAssignee: Jakub Jelinek <jakub>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: bblaskov, caolanm, dodji, jakub, mhlavink, mjw, mnewsome, ohudlick, ppisar
Target Milestone: rc   
Target Release: 7.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 798968 Environment:
Last Closed: 2012-10-05 14:00:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 798968    
Bug Blocks:    

Description Miroslav Franc 2012-03-09 15:53:49 UTC
Causing some bogus failures in our tests. They expect valgrind not to report errors on trivial programs.

+++ This bug was initially created as a clone of Bug #798968 +++

Description of problem:
When checking program with valgrind, it reports following error:

==24209== Memcheck, a memory error detector
==24209== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==24209== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==24209== Command: ./test-lib
==24209== 
==24209== Conditional jump or move depends on uninitialised value(s)
==24209==    at 0x3325C17D36: index (strchr.S:56)
==24209==    by 0x3325C079D7: expand_dynamic_string_token (dl-load.c:430)
==24209==    by 0x3325C0826C: _dl_map_object (dl-load.c:2288)
==24209==    by 0x3325C0171D: map_doit (rtld.c:631)
==24209==    by 0x3325C0EC85: _dl_catch_error (dl-error.c:178)
==24209==    by 0x3325C00EE3: do_preload (rtld.c:820)
==24209==    by 0x3325C040BC: dl_main (rtld.c:1714)
==24209==    by 0x3325C1516A: _dl_sysdep_start (dl-sysdep.c:244)
==24209==    by 0x3325C04EE1: _dl_start (rtld.c:336)
==24209==    by 0x3325C01537: ??? (in /usr/lib64/ld-2.15.so)
==24209==  Uninitialised value was created by a stack allocation
==24209==    at 0x3325C0403D: dl_main (rtld.c:1704)
==24209== 
==24209== Conditional jump or move depends on uninitialised value(s)
==24209==    at 0x3325C17D3B: index (strchr.S:59)
==24209==    by 0x3325C079D7: expand_dynamic_string_token (dl-load.c:430)
==24209==    by 0x3325C0826C: _dl_map_object (dl-load.c:2288)
==24209==    by 0x3325C0171D: map_doit (rtld.c:631)
==24209==    by 0x3325C0EC85: _dl_catch_error (dl-error.c:178)
==24209==    by 0x3325C00EE3: do_preload (rtld.c:820)
==24209==    by 0x3325C040BC: dl_main (rtld.c:1714)
==24209==    by 0x3325C1516A: _dl_sysdep_start (dl-sysdep.c:244)
==24209==    by 0x3325C04EE1: _dl_start (rtld.c:336)
==24209==    by 0x3325C01537: ??? (in /usr/lib64/ld-2.15.so)
==24209==  Uninitialised value was created by a stack allocation
==24209==    at 0x3325C0403D: dl_main (rtld.c:1704)
==24209== 


Version-Release number of selected component (if applicable):
glibc-2.15-23.fc17.x86_64

steps to reproduce:
echo 'int main(int argc, char *argv[]) { return 0; }' >reproducer.c
gcc reproducer.c -o reproducer
valgrind ./reproducer

Additional info:
In fedora 16, valgrind is silent.

--- Additional comment from law on 2012-03-01 19:47:41 CET ---

This is a known limitation of valgrind.  It can report false positives, particularly for optimized vector implementation of string and memory functions such as strchr, memcpy, etc.

These are typically addressed via valgrind suppressions which apparently need updating.

Comment 1 Miroslav Franc 2012-03-09 15:57:07 UTC
version: valgrind-3.6.1-6.el7

Comment 3 Petr Pisar 2012-04-23 10:40:18 UTC
*** Bug 815280 has been marked as a duplicate of this bug. ***

Comment 4 Caolan McNamara 2012-04-23 10:53:06 UTC
*** Bug 813780 has been marked as a duplicate of this bug. ***

Comment 5 Mark Wielaard 2012-10-05 14:00:43 UTC
Duplicate of 800431, newer valgrind already solves this.

*** This bug has been marked as a duplicate of bug 800431 ***