public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Dominique d'Humières" <dominiq@lps.ens.fr>
To: "jvdelisle@charter.net" <jvdelisle@charter.net>
Cc: fortran@gcc.gnu.org, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [6 Regession] Usage of unitialized pointer io/list_read.c (
Date: Tue, 16 Feb 2016 13:17:00 -0000	[thread overview]
Message-ID: <B7792191-AC9E-422F-A4CE-27E0D3C8D499@lps.ens.fr> (raw)

Hi Jerry,

> Thanks for review. Committed to trunk r233436.

The test gfortran.dg/read_bang4.f90 fails on x86_64-apple-darwin15:

a.out(15552,0x7fff7b2e3000) malloc: *** error for object 0x7fb472804c00: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

Program received signal SIGABRT: Process abort signal.

If I compile the test with -fsanitize=address, I get

=================================================================
==15561==ERROR: AddressSanitizer: attempting double-free on 0x61a00001c280 in thread T0:
    #0 0x106d1ac40 in wrap_free.part.0 sanitizer_malloc_mac.inc:103
    #1 0x106c0078f in _gfortrani_list_formatted_read list_read.c:137
    #2 0x4400000042  (<unknown module>)

0x61a00001c280 is located 0 bytes inside of 1200-byte region [0x61a00001c280,0x61a00001c730)
freed by thread T0 here:
    #0 0x106d19e09 in wrap_realloc sanitizer_malloc_mac.inc:108
    #1 0x106b38a14 in _gfortrani_xrealloc memory.c:98

previously allocated by thread T0 here:
    #0 0x106d19fe9 in wrap_calloc sanitizer_malloc_mac.inc:114
    #1 0x106b389d2 in _gfortrani_xcalloc memory.c:84

SUMMARY: AddressSanitizer: double-free sanitizer_malloc_mac.inc:103 in wrap_free.part.0
==15561==ABORTING

Program received signal SIGABRT: Process abort signal.

TIA

Dominique

             reply	other threads:[~2016-02-16 13:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-16 13:17 Dominique d'Humières [this message]
2016-02-16 17:59 ` Jerry DeLisle
2016-02-16 19:38   ` Dominique d'Humières
2016-02-16 20:50     ` Jerry DeLisle
2016-02-17  1:37     ` Jerry DeLisle
2016-02-17 17:02       ` Jerry DeLisle
  -- strict thread matches above, loose matches on Subject: below --
2016-02-15 21:45 Jerry DeLisle
2016-02-15 22:16 ` Janne Blomqvist
2016-02-16  0:07   ` Jerry DeLisle
2016-02-16  8:06   ` Christophe Lyon
2016-02-16 17:49     ` Jerry DeLisle
2016-02-17  8:36       ` Christophe Lyon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B7792191-AC9E-422F-A4CE-27E0D3C8D499@lps.ens.fr \
    --to=dominiq@lps.ens.fr \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jvdelisle@charter.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).