|
From: Дмитрий Д. <di...@gm...> - 2013-03-13 10:18:55
|
Hi!
Last years testsuite is in nice shape :)
But there are some fails.
One common fail is memcheck/origin5-bz2 at x86_64 with 'new' gcc (>=4.5)
Reduced diff:
- Uninitialised value was created by a client request
+ Uninitialised value was created by a heap allocation
My question is: What is the correct way to fix diff fail? [assume that
gcc-4.5+ compiles origin5-bz2 correctly]
1) change optimization level from -O to -O0
2) add once more origin5-bz2.stderr.exp
case 1) solve diff between 'client request' and 'heap allocation' but
add 4 new err.msgs and hence require add/change expected stderr.out
too
case 2) add one more file
It's interesting that gcc-4.7/PPC64 and gcc-4.6/s390x PASS.
Thanks,
Dmitry
=================================================
./valgrind-new/memcheck/tests/origin5-bz2.stderr.diff-glibc25-amd64
=================================================
--- origin5-bz2.stderr.exp-glibc25-amd64 2013-03-11 21:42:54.480969900 -0500
+++ origin5-bz2.stderr.out 2013-03-11 21:48:27.989810912 -0500
@@ -120,6 +120,12 @@
Conditional jump or move depends on uninitialised value(s)
at 0x........: main (origin5-bz2.c:6512)
- Uninitialised value was created by a client request
- at 0x........: main (origin5-bz2.c:6479)
+ Uninitialised value was created by a heap allocation
+ at 0x........: malloc (vg_replace_malloc.c:...)
+ by 0x........: g_serviceFn (origin5-bz2.c:6429)
+ by 0x........: default_bzalloc (origin5-bz2.c:4470)
+ by 0x........: BZ2_decompress (origin5-bz2.c:1578)
+ by 0x........: BZ2_bzDecompress (origin5-bz2.c:5192)
+ by 0x........: BZ2_bzBuffToBuffDecompress (origin5-bz2.c:5678)
+ by 0x........: main (origin5-bz2.c:6498)
FAIL x86_64
gcc-4.5.1 http://article.gmane.org/gmane.comp.debugging.valgrind.devel/22421
gcc-4.6.3 http://article.gmane.org/gmane.comp.debugging.valgrind.devel/22419
gcc-4.6.3 http://article.gmane.org/gmane.comp.debugging.valgrind.devel/22418
gcc-4.7.2 http://article.gmane.org/gmane.comp.debugging.valgrind.devel/22416
gcc-4.7.2 http://article.gmane.org/gmane.comp.debugging.valgrind.devel/22415
gcc-4.7.2 http://article.gmane.org/gmane.comp.debugging.valgrind.devel/22413
gcc-4.8.0 http://article.gmane.org/gmane.comp.debugging.valgrind.devel/22412
PASS PPC64
gcc-4.7.2 http://article.gmane.org/gmane.comp.debugging.valgrind.devel/22420
PASS S390x
gcc-4.6.1 http://article.gmane.org/gmane.comp.debugging.valgrind.devel/22414
|
|
From: Philippe W. <phi...@sk...> - 2013-03-13 22:30:18
|
On Wed, 2013-03-13 at 14:18 +0400, Дмитрий Дьяченко wrote: > he correct way to fix diff fail? [assume that > gcc-4.5+ compiles origin5-bz2 correctly] > 1) change optimization level from -O to -O0 > 2) add once more origin5-bz2.stderr.exp > > case 1) solve diff between 'client request' and 'heap allocation' but > add 4 new err.msgs and hence require add/change expected stderr.out > too > > case 2) add one more file > > It's interesting that gcc-4.7/PPC64 and gcc-4.6/s390x PASS. Does switching to -O0 reduce the nr of stderr different files ? Switching to -O0 will slow down this test, but by how much ? (I believe this test is not used anymore for performance testing, so not that relevant anymore). However, maybe -O1 reduces the nr of different stderr files, without slowing down too much ? (test takes longer when not giving an argument to origin5-bz2) Philippe |
|
From: Дмитрий Д. <di...@gm...> - 2013-03-14 11:10:02
|
2013/3/14 Philippe Waroquiers <phi...@sk...>: > On Wed, 2013-03-13 at 14:18 +0400, Дмитрий Дьяченко wrote: >> he correct way to fix diff fail? [assume that >> gcc-4.5+ compiles origin5-bz2 correctly] >> 1) change optimization level from -O to -O0 >> 2) add once more origin5-bz2.stderr.exp >> >> case 1) solve diff between 'client request' and 'heap allocation' but >> add 4 new err.msgs and hence require add/change expected stderr.out >> too >> >> case 2) add one more file >> >> It's interesting that gcc-4.7/PPC64 and gcc-4.6/s390x PASS. > > Does switching to -O0 reduce the nr of stderr different files ? memcheck/test/origin5-bz2.stderr.exp-glibc25-amd64 contains 13 messages. Only 1 message differ : 'heap allocation' instead of 'client request'. If i use '-O0' instead of '-O' for origin5-bz2 then origin5-bz2.stderr.out contains 17 messages : 13 are identical to expected output + 4 new 'Use of uninitialised value of size 8' Or You ask about switching all tests from '-O' to '-O0' ? > Switching to -O0 will slow down this test, but by how much ? > (I believe this test is not used anymore for performance testing, > so not that relevant anymore). time valgrind -q --track-origins=yes ./origin5-bz2 gcc -O0 real 0m35.990s user 0m35.350s sys 0m0.123s gcc -O real 0m18.995s user 0m18.595s sys 0m0.119s Fedora 18/x86_64, Core i5/2.8GHz [with fixed CPU freq.] > > However, maybe -O1 reduces the nr of different stderr files, > without slowing down too much ? No. stderr.out is the same for all optimization levels: -O/-O1/-O2/-O3/-Os Strictly speaking with O2/O3/Os there are some diffs in the form: - by 0x........: handle_compress (origin5-bz2.c:4750) + by 0x........: handle_compress.isra.<small_integer> (origin5-bz2.c:4750) and - at 0x........: main (origin5-bz2.c:6479) + at 0x........: main (origin5-bz2.c:6481) > > (test takes longer when not giving an argument to origin5-bz2) around 10x for me > > Philippe > > Dmitry |
|
From: Philippe W. <phi...@sk...> - 2013-03-14 20:54:09
|
On Thu, 2013-03-14 at 15:09 +0400, Дмитрий Дьяченко wrote: > 2013/3/14 Philippe Waroquiers <phi...@sk...>: > > On Wed, 2013-03-13 at 14:18 +0400, Дмитрий Дьяченко wrote: > >> he correct way to fix diff fail? [assume that > >> gcc-4.5+ compiles origin5-bz2 correctly] > >> 1) change optimization level from -O to -O0 > >> 2) add once more origin5-bz2.stderr.exp > >> > >> case 1) solve diff between 'client request' and 'heap allocation' but > >> add 4 new err.msgs and hence require add/change expected stderr.out > >> too > >> > >> case 2) add one more file > >> > >> It's interesting that gcc-4.7/PPC64 and gcc-4.6/s390x PASS. > > > > Does switching to -O0 reduce the nr of stderr different files ? > > memcheck/test/origin5-bz2.stderr.exp-glibc25-amd64 contains 13 messages. > Only 1 message differ : 'heap allocation' instead of 'client request'. > > If i use '-O0' instead of '-O' for origin5-bz2 > then origin5-bz2.stderr.out contains 17 messages : > 13 are identical to expected output + 4 new 'Use of uninitialised > value of size 8' > > Or You ask about switching all tests from '-O' to '-O0' ? No, just see if switching this particular test to -O0 will decrease the nr of different .exp files needed. That might be an incentive, as this test is then simpler to maintain. This implies to test with -O0 that on all supported platforms. Note that it seems we currently have a bunch of different .exp files for this test, but whose content is the same. Philippe |
|
From: Дмитрий Д. <di...@gm...> - 2013-03-17 12:27:17
|
https://bugs.kde.org/show_bug.cgi?id=316903 Sorry, only platform where i can test patch is Fedora 18 / x86_64. test FAIL with current trunk and PASS with proposed patch Thanks, Dmitry 2013/3/15 Philippe Waroquiers <phi...@sk...>: > On Thu, 2013-03-14 at 15:09 +0400, Дмитрий Дьяченко wrote: >> 2013/3/14 Philippe Waroquiers <phi...@sk...>: >> > On Wed, 2013-03-13 at 14:18 +0400, Дмитрий Дьяченко wrote: >> >> he correct way to fix diff fail? [assume that >> >> gcc-4.5+ compiles origin5-bz2 correctly] >> >> 1) change optimization level from -O to -O0 >> >> 2) add once more origin5-bz2.stderr.exp >> >> >> >> case 1) solve diff between 'client request' and 'heap allocation' but >> >> add 4 new err.msgs and hence require add/change expected stderr.out >> >> too >> >> >> >> case 2) add one more file >> >> >> >> It's interesting that gcc-4.7/PPC64 and gcc-4.6/s390x PASS. >> > >> > Does switching to -O0 reduce the nr of stderr different files ? >> >> memcheck/test/origin5-bz2.stderr.exp-glibc25-amd64 contains 13 messages. >> Only 1 message differ : 'heap allocation' instead of 'client request'. >> >> If i use '-O0' instead of '-O' for origin5-bz2 >> then origin5-bz2.stderr.out contains 17 messages : >> 13 are identical to expected output + 4 new 'Use of uninitialised >> value of size 8' >> >> Or You ask about switching all tests from '-O' to '-O0' ? > No, just see if switching this particular test to -O0 will > decrease the nr of different .exp files needed. > That might be an incentive, as this test is then simpler to maintain. > This implies to test with -O0 that on all supported platforms. > Note that it seems we currently have a bunch of different .exp > files for this test, but whose content is the same. > > Philippe > > |