This is the mail archive of the gcc-bugs@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]

[Bug fortran/65089] FAIL: gfortran.dg/io_real_boz(2|_[45]).f90 when tested with -fsanitize=address


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65089

--- Comment #17 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Author: jvdelisle
Date: Sat Nov  7 18:13:17 2015
New Revision: 229935

URL: https://gcc.gnu.org/viewcvs?rev=229935&root=gcc&view=rev
Log:
2015-11-07 Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        Backport from trunk
        PR libgfortran/65089
        * io/format.h (free_format): New function to free memory
        allocated for building format error messages.
        * io/format.c (format_error): Add checks before freeing memory
        to avoid potential segfaults and free formatting data when
        needed on error conditions. Always allocate and NULL terminate
        the string.
        * io/transfer.c (st_read_done, st_write_done): Use new
        free_format function to clean up memory allocations when done.

Modified:
    branches/gcc-5-branch/libgfortran/ChangeLog
    branches/gcc-5-branch/libgfortran/io/format.c
    branches/gcc-5-branch/libgfortran/io/format.h
    branches/gcc-5-branch/libgfortran/io/transfer.c

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