[Bug 234347] New: rpmbuild meets valgrind
https://bugzilla.novell.com/show_bug.cgi?id=234347 Summary: rpmbuild meets valgrind Product: openSUSE 10.3 Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Installation AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dcb314@hotmail.com QAContact: jsrain@novell.com I just tried to test out rpmbuild with valgrind. I used the following command line valgrind --trace-children=yes -q rpmbuild -bc 3ddiag.spec I don't think it matters which spec file I select. Here is the output I got ==9344== Conditional jump or move depends on uninitialised value(s) ==9344== at 0x6816C9D: __stpcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x560E63F: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x4E3E3CB: parseSpec (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x402E52: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== ==9344== Invalid read of size 8 ==9344== at 0x6816C90: __stpcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x560E63F: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x560E7CF: rpmGenPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x4E3B249: (within /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x4E3B84D: parsePreamble (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x4E3E7DA: parseSpec (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x402E52: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== Address 0x6AA5B28 is 0 bytes inside a block of size 2 alloc'd ==9344== at 0x4C22889: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so) ==9344== by 0x4E3E4DE: parseSpec (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x402E52: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== ==9344== Invalid read of size 8 ==9344== at 0x6816D03: __stpcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x560E63F: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x560E7E2: rpmGenPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x4E3AA5A: (within /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x4E3B84D: parsePreamble (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x4E3E7DA: parseSpec (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x402E52: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== Address 0x6AB6000 is 24 bytes inside a block of size 28 alloc'd ==9344== at 0x4C22889: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so) ==9344== by 0x560E71E: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x560E8EA: rpmGenPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x4E3B249: (within /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x4E3B84D: parsePreamble (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x4E3E7DA: parseSpec (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x402E52: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== ==9344== Conditional jump or move depends on uninitialised value(s) ==9344== at 0x6816E5D: __strcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x4E3B3BD: parsePreamble (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x4E3E7DA: parseSpec (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x402E52: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== ==9344== Invalid read of size 8 ==9344== at 0x6816C90: __stpcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x560E63F: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x560E7CF: rpmGenPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x4E3C8D7: parsePrep (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x4E3E829: parseSpec (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x402E52: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== Address 0x6AA5B28 is 0 bytes inside a block of size 2 alloc'd ==9344== at 0x4C22889: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so) ==9344== by 0x4E3E4DE: parseSpec (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x402E52: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== ==9344== Invalid read of size 8 ==9344== at 0x6816CE2: __stpcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x4E3BEF9: (within /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x4E3CD3F: parsePrep (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x4E3E829: parseSpec (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x402E52: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== Address 0x6ABE700 is 16 bytes inside a block of size 18 alloc'd ==9344== at 0x4C22889: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so) ==9344== by 0x560E71E: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x4E3BEDB: (within /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x4E3CD3F: parsePrep (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x4E3E829: parseSpec (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x402E52: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== ==9344== Invalid read of size 8 ==9344== at 0x6816C90: __stpcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x560E63F: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x531AD7B: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531B0BA: rpmdbOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x509F6D8: rpmtsOpenDB (in /usr/lib64/librpm-4.4.so) ==9344== by 0x5072CF9: rpmtsCheck (in /usr/lib64/librpm-4.4.so) ==9344== by 0x402EDC: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== Address 0x6A8E520 is 0 bytes inside a block of size 2 alloc'd ==9344== at 0x4C22889: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so) ==9344== by 0x509F523: rpmtsSetRootDir (in /usr/lib64/librpm-4.4.so) ==9344== by 0x4039CC: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== ==9344== Invalid read of size 8 ==9344== at 0x6816CB9: __stpcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x560E63F: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x560E7E2: rpmGenPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x532192B: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x5319840: dbiOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531ACCD: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531B0BA: rpmdbOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x509F6D8: rpmtsOpenDB (in /usr/lib64/librpm-4.4.so) ==9344== by 0x5072CF9: rpmtsCheck (in /usr/lib64/librpm-4.4.so) ==9344== by 0x402EDC: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== Address 0x6B91FB0 is 8 bytes inside a block of size 13 alloc'd ==9344== at 0x4C22889: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so) ==9344== by 0x560E71E: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x531AAD7: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531B0BA: rpmdbOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x509F6D8: rpmtsOpenDB (in /usr/lib64/librpm-4.4.so) ==9344== by 0x5072CF9: rpmtsCheck (in /usr/lib64/librpm-4.4.so) ==9344== by 0x402EDC: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== ==9344== Invalid read of size 8 ==9344== at 0x6816CB9: __stpcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x560E63F: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x5321B92: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x5319840: dbiOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531ACCD: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531B0BA: rpmdbOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x509F6D8: rpmtsOpenDB (in /usr/lib64/librpm-4.4.so) ==9344== by 0x5072CF9: rpmtsCheck (in /usr/lib64/librpm-4.4.so) ==9344== by 0x402EDC: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== Address 0x6B92458 is 8 bytes inside a block of size 13 alloc'd ==9344== at 0x4C22889: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so) ==9344== by 0x560E71E: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x560E8EA: rpmGenPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x532192B: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x5319840: dbiOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531ACCD: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531B0BA: rpmdbOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x509F6D8: rpmtsOpenDB (in /usr/lib64/librpm-4.4.so) ==9344== by 0x5072CF9: rpmtsCheck (in /usr/lib64/librpm-4.4.so) ==9344== by 0x402EDC: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== ==9344== Invalid read of size 8 ==9344== at 0x6816CB9: __stpcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x560E63F: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x5321D38: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x5319840: dbiOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531ACCD: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531B0BA: rpmdbOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x509F6D8: rpmtsOpenDB (in /usr/lib64/librpm-4.4.so) ==9344== by 0x5072CF9: rpmtsCheck (in /usr/lib64/librpm-4.4.so) ==9344== by 0x402EDC: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== Address 0x6B92458 is 8 bytes inside a block of size 13 alloc'd ==9344== at 0x4C22889: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so) ==9344== by 0x560E71E: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x560E8EA: rpmGenPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x532192B: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x5319840: dbiOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531ACCD: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531B0BA: rpmdbOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x509F6D8: rpmtsOpenDB (in /usr/lib64/librpm-4.4.so) ==9344== by 0x5072CF9: rpmtsCheck (in /usr/lib64/librpm-4.4.so) ==9344== by 0x402EDC: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== ==9344== Invalid read of size 8 ==9344== at 0x6816CB9: __stpcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x560E63F: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x560E7E2: rpmGenPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x53223DD: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x5319840: dbiOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531ACCD: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531B0BA: rpmdbOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x509F6D8: rpmtsOpenDB (in /usr/lib64/librpm-4.4.so) ==9344== by 0x5072CF9: rpmtsCheck (in /usr/lib64/librpm-4.4.so) ==9344== by 0x402EDC: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== Address 0x6B92368 is 8 bytes inside a block of size 9 alloc'd ==9344== at 0x4C22889: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so) ==9344== by 0x53109F4: db3New (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x53218D1: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x5319840: dbiOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531ACCD: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531B0BA: rpmdbOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x509F6D8: rpmtsOpenDB (in /usr/lib64/librpm-4.4.so) ==9344== by 0x5072CF9: rpmtsCheck (in /usr/lib64/librpm-4.4.so) ==9344== by 0x402EDC: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== ==9344== Conditional jump or move depends on uninitialised value(s) ==9344== at 0x6816CEF: __stpcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x560E9FF: rpmExpand (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x531057C: db3New (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x53218D1: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x5319840: dbiOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x5071B05: (within /usr/lib64/librpm-4.4.so) ==9344== by 0x5071EB3: (within /usr/lib64/librpm-4.4.so) ==9344== by 0x5072BDB: rpmtsCheck (in /usr/lib64/librpm-4.4.so) ==9344== by 0x402EDC: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== ==9344== Conditional jump or move depends on uninitialised value(s) ==9344== at 0x6816D10: __stpcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x560E9FF: rpmExpand (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x531057C: db3New (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x53218D1: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x5319840: dbiOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531DE23: rpmdbInitIterator (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x509F793: rpmtsInitIterator (in /usr/lib64/librpm-4.4.so) ==9344== by 0x50718E1: (within /usr/lib64/librpm-4.4.so) ==9344== by 0x5071EB3: (within /usr/lib64/librpm-4.4.so) ==9344== by 0x5072BDB: rpmtsCheck (in /usr/lib64/librpm-4.4.so) ==9344== by 0x402EDC: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== ==9344== Invalid read of size 8 ==9344== at 0x6816CB9: __stpcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x560E63F: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x560E7E2: rpmGenPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x53212F0: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531A420: rpmdbClose (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x509EB5B: rpmtsCloseDB (in /usr/lib64/librpm-4.4.so) ==9344== by 0x5072D49: rpmtsCheck (in /usr/lib64/librpm-4.4.so) ==9344== by 0x402EDC: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== Address 0x6B91FB0 is 8 bytes inside a block of size 13 alloc'd ==9344== at 0x4C22889: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so) ==9344== by 0x560E71E: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x531AAD7: (within /usr/lib64/librpmdb-4.4.so) ==9344== by 0x531B0BA: rpmdbOpen (in /usr/lib64/librpmdb-4.4.so) ==9344== by 0x509F6D8: rpmtsOpenDB (in /usr/lib64/librpm-4.4.so) ==9344== by 0x5072CF9: rpmtsCheck (in /usr/lib64/librpm-4.4.so) ==9344== by 0x402EDC: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== ==9344== Invalid read of size 8 ==9344== at 0x6816C90: __stpcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x560E63F: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x560E7CF: rpmGenPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x4E2FA07: doScript (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x4E30407: buildSpec (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x403181: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== Address 0x6AA5B28 is 0 bytes inside a block of size 2 alloc'd ==9344== at 0x4C22889: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so) ==9344== by 0x4E3E4DE: parseSpec (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x402E52: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== ==9344== Invalid read of size 8 ==9344== at 0x6816C90: __stpcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x560E63F: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x560E7CF: rpmGenPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x507F606: makeTempFile (in /usr/lib64/librpm-4.4.so) ==9344== by 0x4E2FAEE: doScript (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x4E30407: buildSpec (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x403181: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== Address 0x6AA5B28 is 0 bytes inside a block of size 2 alloc'd ==9344== at 0x4C22889: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so) ==9344== by 0x4E3E4DE: parseSpec (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x402E52: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== ==9344== Invalid read of size 8 ==9344== at 0x6816C90: __stpcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x560E63F: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x560E7CF: rpmGenPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x507F6AE: makeTempFile (in /usr/lib64/librpm-4.4.so) ==9344== by 0x4E2FAEE: doScript (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x4E30407: buildSpec (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x403181: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== Address 0x6AA5B28 is 0 bytes inside a block of size 2 alloc'd ==9344== at 0x4C22889: malloc (in /usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so) ==9344== by 0x4E3E4DE: parseSpec (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x402E52: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) ==9344== ==9344== Conditional jump or move depends on uninitialised value(s) ==9344== at 0x6816CC6: __stpcpy_chk (in /lib64/libc-2.5.so) ==9344== by 0x560E63F: rpmGetPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x560E7F5: rpmGenPath (in /usr/lib64/librpmio-4.4.so) ==9344== by 0x507F6AE: makeTempFile (in /usr/lib64/librpm-4.4.so) ==9344== by 0x4E2FAEE: doScript (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x4E30407: buildSpec (in /usr/lib64/librpmbuild-4.4.so) ==9344== by 0x403181: (within /usr/lib/rpm/rpmb) ==9344== by 0x403443: (within /usr/lib/rpm/rpmb) ==9344== by 0x403FEF: (within /usr/lib/rpm/rpmb) ==9344== by 0x6762AE3: (below main) (in /lib64/libc-2.5.so) Suggest fix these errors that valgrind is reporting. Also, here is the version of rpmbuild linux:/usr/src/packages/SPECS # rpmbuild --version 2>&1 | more RPM version 4.4.2 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 stbinner@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team- |mls@novell.com |screening@forge.provo.novell| |.com | Component|Installation |Basesystem ------- Comment #1 from stbinner@novell.com 2007-01-13 12:53 MST ------- You don't start to run all distro applications through valgrind now and reporting that, or!? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 ------- Comment #2 from dcb314@hotmail.com 2007-01-13 14:35 MST ------- (In reply to comment #1)
You don't start to run all distro applications through valgrind now and reporting that, or!?
Yes. Testing at compile time is nearly finished. 93% of all packages have been tested with the Intel compiler and various versions of the GNU compiler, resulting in about 1,300 bug reports. I think I'll run all the test suites of all the packages under valgrind and see what I find. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 mls@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ------- Comment #3 from mls@novell.com 2007-01-15 05:01 MST ------- Cool! Thanks for spending so much time on improving the packages. I'll see what I can do about rpmbuild. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 meissner@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |meissner@novell.com ------- Comment #4 from meissner@novell.com 2007-01-24 07:03 MST ------- there is a general problem with the *_chk functions that they are optimized and do long word reads ... reading over the end of strings. Since they are aligned before these reads can never cross a page boundary, so this strcpy/stpcpy implementation should be safe as-is. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 ------- Comment #5 from dcb314@hotmail.com 2007-01-24 07:36 MST ------- (In reply to comment #4)
there is a general problem with the *_chk functions that they are optimized and do long word reads ... reading over the end of strings.
This is an unexpected answer. valgrind doesn't report merely reading uninitialised memory, only using that memory in conditions.
Since they are aligned before these reads can never cross a page boundary, so this strcpy/stpcpy implementation should be safe as-is.
Most surprising. So can I confirm that you are sure that the strings are sufficiently short that they never cross a page boundary, independent of their location in memory ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 meissner@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenther@novell.com, matz@novell.com ------- Comment #6 from meissner@novell.com 2007-01-24 07:48 MST ------- it using this trick: movq $0xfefefefefefefeff,%r8 movq (%rsi), %rax /* Read double word (8 bytes). */ addq $8, %rsi /* Adjust pointer for next word. */ movq %rax, %r9 /* Save a copy for NUL finding. */ addq %r8, %r9 /* add the magic value to the word. We get carry bits reported for each byte which is *not* 0 */ jnc 3f /* highest byte is NUL => return pointer */ xorq %rax, %r9 /* (word+magic)^word */ orq %r8, %r9 /* set all non-carry bits */ incq %r9 /* add 1: if one carry bit was *not* set the addition will not result in 0. */ jnz 3f /* found NUL => return pointer */ (label 3f is the place it goes when the 8 byte word contains a \0) This trick involves manipulating all 8 bytes in this 64bit word and only afterwards going over those again to find the \0. so it touches undefined memory for the condition, but this should be harmless here. as for the other... those 8 bytes reads are done on 8byte aligned memory, so they can never cross a page boundary. (thx Micha for enlightening me here.) The code is in glibc/sysdeps/x86_64/strcpy_chk.S. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 ------- Comment #7 from matz@novell.com 2007-01-24 07:59 MST ------- Yes the problem is, that valgrind can't easily detect that the jump itself does _not_ depend on uninitialized memory, if the string is properly zero terminated. I.e. although the bytes after the finishing zero are uninitialized they don't affect the jump. But the creative math to quickly detect a null byte hides that fact from valgrind :-/ So in this case it's a false positive. This argumentation breaks down if there are uninitialized bytes _before_ the terminating null. Then valgrind would be right. I suggest we add a suppression for these functions to valgrind. It isn't really worth it. The str* functions itself are correct. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 ------- Comment #8 from rguenther@novell.com 2007-01-24 08:09 MST ------- There is the case of _not_ properly zero terminated strings, so maybe valgrind can be enhanced to follow dataflow more thoroughly here... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 ------- Comment #9 from dcb314@hotmail.com 2007-01-24 10:02 MST ------- (In reply to comment #7)
Yes the problem is, that valgrind can't easily detect that the jump itself does _not_ depend on uninitialized memory, if the string is properly zero terminated. I.e. although the bytes after the finishing zero are uninitialized they don't affect the jump. But the creative math to quickly detect a null byte hides that fact from valgrind :-/ So in this case it's a false positive.
So could it be that valgrind could be enhanced to detect this case ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 matz@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dmueller@novell.com ------- Comment #10 from matz@novell.com 2007-01-24 10:15 MST ------- It surely could be extended, but I think it's relatively involved. The easiest would probably be to detect the addition of 0xfefefeff (or the 64bit variant of it), and from there start with special casing. A general solution is probably not easy, because valgrind tracks definedness on a bit basis, but here we have the problem that some _values_ (as combination of bits) are defined (not defined really, but rather don't_care), so there is interdependency of bits. I haven't thought long about this, so perhaps there's a simple trick. Let's add Dirk, sometimes he likes to think about valgrind problems :-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 dmueller@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aj@novell.com ------- Comment #11 from dmueller@novell.com 2007-01-24 10:44 MST ------- the *_chk bug is already fixed since some time, it is actually the reason I want to update valgrind to a fixed version on 10.2, because it is horribly worse (aka makes valgrind useless) on ppc. In any case this should be fixed on 10.3 already, I'll do a testrun once I find a x86_64 machine that can build packages (there surely must be one around somewhere..) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 ------- Comment #12 from dcb314@hotmail.com 2007-01-24 10:59 MST ------- (In reply to comment #11)
the *_chk bug is already fixed since some time, it is actually the reason I want to update valgrind to a fixed version on 10.2, because it is horribly worse (aka makes valgrind useless) on ppc.
I'm not sure which version of valgrind you are referring to. I just tried the version of valgrind released today [ 3.3.2] and it seems to me it the same problems on x86_64 that previous versions have. I have no idea what happens on ppc. Have suse got a locally modified version of valgrind with the fix in ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 ------- Comment #13 from aj@novell.com 2007-01-25 01:01 MST ------- valgrind update approved: MaintenanceTracker-8101 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 ------- Comment #14 from dmueller@novell.com 2007-01-25 07:11 MST ------- David: yes, I have patches for valgrind. currently trying to push them upstream. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 ------- Comment #15 from dmueller@novell.com 2007-01-25 10:16 MST ------- for clarity: 3.2.2 only intercepts strcpy_chk, not stpcpy_chk as it is used here. I've checked the other glibc provided assembler variants and also memrchr is affected, for which I also added a fix. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 dmueller@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|mls@novell.com |dmueller@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 ------- Comment #16 from jseward@acm.org 2007-01-25 13:54 MST ------- Am looking at Dirk's patch now. Seems like the right solution. Will merge upstream after testing. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 ------- Comment #17 from jseward@acm.org 2007-01-27 00:19 MST ------- I should point out, even with Dirk's fix in place, on ppc32 Valgrind reports errors that it doesn't on x86/amd64. This is because, on ppc32, gcc-4.1 generates code which occasionally accesses below the stack pointer (r1), which I believe is in violation of the ELF 32-bit ppc ABI spec. Having looked at a couple of these, it looks like a bug in gcc's code generation for procedure epilogues - callee save registers are restored from the stack after r1 has been moved back up. Note this is a ppc32 specific problem. Should I file a bug report? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 ------- Comment #18 from matz@novell.com 2007-01-29 06:12 MST ------- SVR4 on ppc32 indeed doesn't define a redzone. SVR4 on ppc64 does define it (stack floor is at 288 bytes below stack pointer). PowerOpen (ppc32 on AIX) does also define a red zone (220 bytes). The linux kernel seems to support such red zone also on ppc32 (i.e. makes e.g. signals not use the artificial red zone), but it shouldn't be used anyway. So, if you see such code for linux ppc32, then yes, I think it's a gcc bug. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 ------- Comment #19 from dmueller@novell.com 2007-01-29 07:00 MST ------- so far I haven't seen this. There were two cases afaik in glibc assembler. I don't know if anyone managed to get the fix for that upstream though. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 jseward@acm.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jseward@acm.org ------- Comment #20 from jseward@acm.org 2007-01-29 22:47 MST ------- My understanding of ppc stack redzones exactly matches Michael's (comment #18). Good. I filed details of the gcc bug at https://bugzilla.novell.com/show_bug.cgi?id=240116 Re the original bug (false valgrind reports on rpmbuild) I believe the just-release valgrind-3.2.3 should fix this (thanks Dirk). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 rguenther@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- BugsThisDependsOn| |240116 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 ------- Comment #21 from dcb314@hotmail.com 2007-01-30 04:21 MST ------- (In reply to comment #20)
Re the original bug (false valgrind reports on rpmbuild) I believe the just-release valgrind-3.2.3 should fix this (thanks Dirk).
I just tried out valgrind 3.2.3 and can report that the false valgrind reports seem to be fixed. There are some other issues with broken file descriptors, but I think that can be another bug report. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 dmueller@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- BugsThisDependsOn|240116 | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 dmueller@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED ------- Comment #22 from dmueller@novell.com 2007-01-30 08:52 MST ------- submitted 3.2.3 update to 10.3 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 ast@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | ------- Comment #23 from ast@novell.com 2007-05-04 06:36 MST ------- Dirk, will you also submit for 10.2? See comment #13 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 dmueller@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED ------- Comment #24 from dmueller@novell.com 2007-05-07 15:40 MST ------- Anja: thanks. not sure why the 10.2 submission was lost. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=234347 ------- Comment #25 from ast@novell.com 2007-05-22 08:05 MST ------- released -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com