This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, libgfortran] PR 61035 Stack overflow in GETCWD


PING

On Sat, May 3, 2014 at 11:47 PM, Janne Blomqvist
<blomqvist.janne@gmail.com> wrote:
> Hello,
>
> 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?
>
> 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.
>
>
> --
> Janne Blomqvist



-- 
Janne Blomqvist


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]