[LLVMdev] LTO "bug" and Clang warnings
renato.golin at linaro.org
Tue Jan 8 10:29:01 PST 2013
On 8 January 2013 16:53, David Blaikie <dblaikie at gmail.com> wrote:
> I'm not sure what you mean by "fix user's stupidity" here - could you
Buffer overrun on foo and relying on it for bar.
It might not even be an error to access foo even though foo only has 20
elements (via pointer indirection rules), but it's user error to do so, and
if the standard allows that (I'm yet to find the paragraph), then the
compiler has no right to "fix" it. If it's undefined, than LTO is
completely right and nothing should be done.
The "stupidity" part is to rely on undefined behaviour. Mind you, the
stupidity in this case was mine. I removed functions from Livermore that I
though were harmless, and added a few arrays to be initialized by others
and haven't checked that the ranges were dynamic.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev