[patch, libfortran] Fix PR 32217, crash on unpack of zero-sized array
Thomas Koenig
tkoenig@alice-dsl.net
Sun Jul 8 21:44:00 GMT 2007
:ADDPATCH fortran:
Hello world,
having returned from my holidays, here's a small patch that fixes PR
32217. The problem here was that the data pointer for a zero-sized
array was dereferenced inside the library, which caused a segfault.
Regression-tested on i686-pc-linux-gnu. Also regression-tested on PPC
with Darwin 7 by Dominique, as noted in the PR.
OK for trunk?
Thomas
2007-07-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/32217
* intrinsics/unpack_generic.c: If the destination array is
empty, return early.
2007-07-08 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/32217
* gfortran.dg/unpack_zerosize_1.f90: New test case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unpack-diff
Type: text/x-patch
Size: 1317 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070708/36c807eb/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unpack_zerosize_1.f90
Type: text/x-fortran
Size: 461 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070708/36c807eb/attachment-0001.bin>
More information about the Gcc-patches
mailing list