public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/65563] Segfault on reopening fort.xxx file with explicit name
Date: Wed, 25 Mar 2015 18:37:00 -0000	[thread overview]
Message-ID: <bug-65563-4-vJe1rxBdFk@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65563-4@http.gcc.gnu.org/bugzilla/>

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-03-25
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
With 4.8.4, 4.9.5, 4.9.2, 4.9.3, and trunk (5.0), I get the error

At line 8 of file pr65563.f90 (unit = 522, file = '')
Fortran runtime error: File already opened in another unit

However if I compile the test with -fsanitize=address, I get with 4.9x

==91085==ERROR: AddressSanitizer: heap-buffer-overflow on address
0x60200000e011 at pc 0x10a40c5d8 bp 0x7fff5580f2a0 sp 0x7fff5580f278
READ of size 2 at 0x60200000e011 thread T0
    #0 0x10a40c5d7 (/opt/gcc/gcc4.9wr/lib/libasan.1.dylib+0x175d7)
    #1 0x7fff8bd20f01 (/usr/lib/system/libsystem_c.dylib+0x45f01)
    #2 0x7fff8bd499ae (/usr/lib/system/libsystem_c.dylib+0x6e9ae)
    #3 0x7fff8bd2e154 (/usr/lib/system/libsystem_c.dylib+0x53154)
    #4 0x7fff8bd2e209 (/usr/lib/system/libsystem_c.dylib+0x53209)
    #5 0x10b0a4dca (/opt/gcc/gcc4.9wr/lib/libgfortran.3.dylib+0x2dca)

0x60200000e011 is located 0 bytes to the right of 1-byte region
[0x60200000e010,0x60200000e011)
allocated by thread T0 here:
    #0 0x10a412a06 (/opt/gcc/gcc4.9wr/lib/libasan.1.dylib+0x1da06)
    #1 0x10b0a5c24 (/opt/gcc/gcc4.9wr/lib/libgfortran.3.dylib+0x3c24)
Shadow bytes around the buggy address:
  0x1c0400001bb0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0400001bc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0400001bd0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0400001be0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c0400001bf0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x1c0400001c00: fa fa[01]fa fa fa 00 fa fa fa 06 fa fa fa 06 fa
  0x1c0400001c10: fa fa 05 fa fa fa 00 06 fa fa 00 00 fa fa 03 fa
  0x1c0400001c20: fa fa 00 06 fa fa 00 07 fa fa 00 fa fa fa 00 00
  0x1c0400001c30: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00
  0x1c0400001c40: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00
  0x1c0400001c50: fa fa 00 00 fa fa 00 00 fa fa 00 00 fa fa 00 00

while I get the above error with 4.8 and 5.0 (clean or patched trees).


  reply	other threads:[~2015-03-25 18:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 18:26 [Bug libfortran/65563] New: " tkoenig at gcc dot gnu.org
2015-03-25 18:37 ` dominiq at lps dot ens.fr [this message]
2015-03-25 20:08 ` [Bug libfortran/65563] " jvdelisle at gcc dot gnu.org
2015-03-28 19:33 ` jvdelisle at gcc dot gnu.org
2015-03-28 22:31 ` mikael at gcc dot gnu.org
2015-03-29 14:33 ` tkoenig at gcc dot gnu.org
2015-03-29 15:57 ` tkoenig at gcc dot gnu.org
2015-03-29 16:31 ` tkoenig at gcc dot gnu.org

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=bug-65563-4-vJe1rxBdFk@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).