This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, libgfortran] PR65089 FAIL: gfortran.dg/io_real_boz(2|_[45]).f90 when tested with -fsanitize=address
- From: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- To: Jerry DeLisle <jvdelisle at charter dot net>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 13 Apr 2015 21:32:03 +0300
- Subject: Re: [patch, libgfortran] PR65089 FAIL: gfortran.dg/io_real_boz(2|_[45]).f90 when tested with -fsanitize=address
- Authentication-results: sourceware.org; auth=none
- References: <552AE99E dot 5030802 at charter dot net>
On Mon, Apr 13, 2015 at 12:54 AM, Jerry DeLisle <jvdelisle@charter.net> wrote:
> Hi all,
>
> The attached patch fixes this bug. It also eliminates non-freed memory
> whenever
> a format error occurs. Particular important when the user has use IOSTAT
> and generate_error does not exit, but returns to continue program execution.
>
> Regression tested on x86-64 and tested with -fsanitize=address and valgrind
> on a number of existing test cases. Changelog is fairly clear I think.
>
> OK for trunk?
Instead of xmalloc + memcpy + null-terminating, please use fc_strdup
(or fc_strdup_notrim if you want to retain trailing spaces) in order
to create a heap-allocated null-terminated copy of a
non-null-terminated string.
WIth that change, Ok for trunk and affected branches.
Since it doesn't seem to be Ãber-critical, I suggest you wait with
backporting to the 5.x branch until after the imminent release of 5.1
(if I understand the new numbering scheme correctly).
Thanks.
--
Janne Blomqvist