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.
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.
This should be fixed with the 3.8.1 upgrade in f18/rawhide. Could you check your testcase against that?
(In reply to comment #2) > Could you check your testcase against that? Tested and it works
(In reply to comment #3) > (In reply to comment #2) > > Could you check your testcase against that? > > Tested and it works Thanks for testing. I'll keep this bug open for a little while. If there are more bugs against the valgrind version in f17 that are resolved by the new package in f18 maybe we can push an update to f17 too.
valgrind-3.8.1-3.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/valgrind-3.8.1-3.fc17
Package valgrind-3.8.1-4.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing valgrind-3.8.1-4.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-16272/valgrind-3.8.1-4.fc17 then log in and leave karma (feedback).
valgrind-3.8.1-4.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.