Re: List of optimizations enabled by -O1 seems incorrect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ian Lance Taylor wrote:

> Andrew's point was not that the program was non-conforming.  His point
> was that a conforming program could not detect this optimization.  And,
> indeed, it couldn't.  The issue was reported by valgrind, not by the
> program itself.

OK, I get it now. This is the same sort of thing we see when strlen()
reads past the end of the string, but doesn't actually use the extra
bytes it read as part of its operation... valgrind complains, but the
program works as expected.

However, in this case, valgrind didn't say it was a read of an
uninitialized variable, it said the conditional jump depended on the
value of an uninitialized variable; either that's a valgrind bug, or the
jump may take different paths based on that content, or I'm not really
awake enough this morning yet :-)

-- 
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kpfleming@xxxxxxxxxx
Check us out at www.digium.com & www.asterisk.org

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux