|
From: Julian S. <js...@ac...> - 2003-02-25 23:26:47
|
[Dirk .. (1) thanks for fixing 'make install'. However ...
(2) pls read at least the last para
.. more fallout from recent changes?]
Mystery solved ... possibly a side effect of fixing 'make install'.
> As per subject... the bug has been introduced within the last few days, I
> think, because I didn't have it in my workspace copy until I updated and
> rebuilt just then.
>
> To see, run one of:
>
> $PREFIX/bin/vg_regtest --all
> $PREFIX/bin/vg_regtest memcheck
> $PREFIX/bin/vg_regtest memcheck/tests/new_override
>
> within the top level valgrind/ directory.
>
> I don't see how any of my recent commits could have caused this, so I'm
> brazenly assuming it's not my fault until proven otherwise... :)
Sigh. Curiously, it also fails on SuSE 8.1. The .stderr.exp says there
should be an uninit-var error at line 25. The .stderr.out mentions
no such.
Reading the assembly for main, with and without -O is revealing.
for (i = 0; i < 2; i++) {
if (toto[i].a) {
j++;
}
// main returns now
With -O and above, gcc sees that j is dead after the loop, and converts
it to
movl $0, %eax
.L15:
incl %eax
cmpl $1, %eax
jle .L15
ie
for (i = 0; i < 2; i++) {
}
[Why it doesn't then unroll the loop and change this to "i = 2",
I don't know. But anyway ...]
So it's no wonder no error is reported for me.
Rerunning the test without -O does indeed get an error reported.
And indeed I see that the test is built with -O2 -g.
Have a look at rev 1.6 of valgrind/memcheck/tests/Makefile.am.
It changes the flag handling for the tests (I guess) and I bet
that causes -O2 to be passed to the test compilations. Which
I guess it shouldn't be. Didn't we have a no-optimisation policy
for regressions, to try and ensure gcc didn't optimise stuff away?
Ha .. more clarity. In memcheck/tests, it is only "mismatches" and
"new_override" which are compiled with -g -O2. And these are
exactly the C++ ones.
So I wonder if, in valgrind/memcheck/tests/Makefile.am,
the renaming of CXXFLAGS to AM_CXXFLAGS didn't have the desired
effect?
J
|