[PATCH, libgfortran] PR 61035 Stack overflow in GETCWD
Tobias Burnus
tobias.burnus@physik.fu-berlin.de
Mon May 12 07:56:00 GMT 2014
Janne Blomqvist wrote:
> the attached patch avoids a stack overflow crash due to not trying to
> create a null-terminated duplicate of the argument char array on the
> stack. Also, for the common case it avoids an extra allocation and an
> extra memcpy.
>
> Regtested on x86_64-unknown-linux-gnu, Ok for trunk?
Looks good to me. Thanks for the patch!
Tobias
> 2014-05-03 Janne Blomqvist <jb@gcc.gnu.org>
>
> PR libfortran/61035
> * intrinsics/getcwd.c (getcwd_i4_sub): Avoid potentially large
> stack allocation, avoid extra copying in the common case.
More information about the Fortran
mailing list