[vta, trunk] don't leak uninitialized stack state into output

Alexandre Oliva aoliva@redhat.com
Sun Mar 1 06:17:00 GMT 2009


When building certain initializers, the Fortran front-end allocates a
buffer on the stack, sets up some elements of it from the source of the
initialization, and then proceeds to use the entire buffer to initialize
a larger destination.  The result is that the uninitialized portion of
the buffer leaks into the program output.

I figured zero-initializing the entire buffer would often be pointless,
so I decided to initialize only the portion that wasn't covered by the
source.

I'm pretty sure this was caught in a testsuite run with -fcompare-debug,
but I don't recall the exact testcase :-(

I'm installing this in the branch.  Ok for trunk?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-fortran-undefined-transfer-result.patch
Type: text/x-patch
Size: 1152 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090301/84dab633/attachment.bin>
-------------- next part --------------

-- 
Alexandre Oliva           http://www.lsd.ic.unicamp.br/~oliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer


More information about the Gcc-patches mailing list