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 via email to