public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/55482] New: gfortran.dg/class_array_7.f03 execution failures with -fsanitize=address
@ 2012-11-27  1:40 howarth at nitro dot med.uc.edu
  2012-11-27  1:52 ` [Bug sanitizer/55482] " howarth at nitro dot med.uc.edu
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2012-11-27  1:40 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55482

             Bug #: 55482
           Summary: gfortran.dg/class_array_7.f03 execution failures with
                    -fsanitize=address
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: howarth@nitro.med.uc.edu
                CC: dodji@gcc.gnu.org, dvyukov@gcc.gnu.org,
                    jakub@gcc.gnu.org, kcc@gcc.gnu.org


Using...

make -k check-gfortran RUNTESTFLAGS="--target_board=unix'{-fsanitize=address}'"

on x86_64-apple-darwin12 produced regressions in the execution tests for...

FAIL: gfortran.dg/class_array_7.f03  -O0  execution test
FAIL: gfortran.dg/class_array_7.f03  -O1  execution test
FAIL: gfortran.dg/class_array_7.f03  -O2  execution test
FAIL: gfortran.dg/class_array_7.f03  -O3 -fomit-frame-pointer  execution test
FAIL: gfortran.dg/class_array_7.f03  -O3 -fomit-frame-pointer -funroll-loops 
execution test
FAIL: gfortran.dg/class_array_7.f03  -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions  execution test
FAIL: gfortran.dg/class_array_7.f03  -O3 -g  execution test
FAIL: gfortran.dg/class_array_7.f03  -Os  execution test

which are of the form...

Executing on host:
/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/../../gfortran
-B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/../../
-B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libgfortran/
/sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121124/gcc/testsuite/gfortran.dg/class_array_7.f03
 -fno-diagnostics-show-caret   -O0   -pedantic-errors 
-B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libgfortran/.libs
-L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libgfortran/.libs
-L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libgfortran/.libs
-B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libquadmath/.libs
-L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libquadmath/.libs
-L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libquadmath/.libs
 -lm   -fsanitize=address -o ./class_array_7.exe    (timeout = 300)
PASS: gfortran.dg/class_array_7.f03  -O0  (test for excess errors)
Setting LD_LIBRARY_PATH to
.:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libgfortran/.libs:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libgfortran/.libs:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libquadmath/.libs:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libquadmath/.libs:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc:.:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libgfortran/.libs:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libgfortran/.libs:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libquadmath/.libs:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin11.4.2/./libquadmath/.libs:/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc
=================================================================
==52005== ERROR: AddressSanitizer: heap-buffer-overflow on address
0x000104c56fe8 at pc 0x101d34edd bp 0x7fff61930200 sp 0x7fff619301f8
READ of size 4 at 0x000104c56fe8 thread T0
    #0 0x101d34edc
(/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/./class_array_7.exe+0x100002edc)
    #1 0x101d34979
(/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/./class_array_7.exe+0x100002979)
    #2 0x101d35523
(/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/./class_array_7.exe+0x100003523)
    #3 0x101d3579c
(/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/./class_array_7.exe+0x10000379c)
    #4 0x101d334ef
(/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/./class_array_7.exe+0x1000014ef)
    #5 0x0
0x000104c56fe8 is located 0 bytes to the right of 40-byte region
[0x000104c56fc0,0x000104c56fe8)
allocated by thread T0 here:
    #0 0x101ebdd85 (/sw/lib/gcc4.8/lib/libasan.0.dylib+0xbd85)
    #1 0x7fff958d53c7 (/usr/lib/system/libsystem_c.dylib+0xa03c7)
    #2 0x7fff958d61a3 (/usr/lib/system/libsystem_c.dylib+0xa11a3)
    #3 0x101d350a3
(/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/./class_array_7.exe+0x1000030a3)
    #4 0x101d3579c
(/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/./class_array_7.exe+0x10000379c)
    #5 0x101d334ef
(/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/gfortran/./class_array_7.exe+0x1000014ef)
Shadow byte and word:
  0x10002098adfd: fb
  0x10002098adf8: 00 00 00 00 00 fb fb fb
More shadow bytes:
  0x10002098add8: fa fa fa fa fa fa fa fa
  0x10002098ade0: fa fa fa fa fa fa fa fa
  0x10002098ade8: fa fa fa fa fa fa fa fa
  0x10002098adf0: fa fa fa fa fa fa fa fa
=>0x10002098adf8: 00 00 00 00 00 fb fb fb
  0x10002098ae00: fa fa fa fa fa fa fa fa
  0x10002098ae08: fd fd fd fd fd fd fd fd
  0x10002098ae10: fa fa fa fa fa fa fa fa
  0x10002098ae18: fd fd fd fd fd fd fd fd
Stats: 0M malloced (0M for red zones) by 7 calls
Stats: 0M realloced by 0 calls
Stats: 0M freed by 4 calls
Stats: 0M really freed by 0 calls
Stats: 1M (384 full pages) mmaped in 3 calls
  mmaps   by size class: 7:4095; 8:2047; 11:255;
  mallocs by size class: 7:3; 8:2; 11:2;
  frees   by size class: 7:2; 11:2;
  rfrees  by size class:
Stats: malloc large: 0 small slow: 3
==52005== ABORTING
FAIL: gfortran.dg/class_array_7.f03  -O0  execution test


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug sanitizer/55482] gfortran.dg/class_array_7.f03 execution failures with -fsanitize=address
  2012-11-27  1:40 [Bug sanitizer/55482] New: gfortran.dg/class_array_7.f03 execution failures with -fsanitize=address howarth at nitro dot med.uc.edu
@ 2012-11-27  1:52 ` howarth at nitro dot med.uc.edu
  2012-12-10 17:15 ` howarth at nitro dot med.uc.edu
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2012-11-27  1:52 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55482

--- Comment #1 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-11-27 01:52:37 UTC ---
Created attachment 28786
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28786
assembly file for gfortran.dg/class_array_7.f03  -O0 with -fsanitize=address


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug sanitizer/55482] gfortran.dg/class_array_7.f03 execution failures with -fsanitize=address
  2012-11-27  1:40 [Bug sanitizer/55482] New: gfortran.dg/class_array_7.f03 execution failures with -fsanitize=address howarth at nitro dot med.uc.edu
  2012-11-27  1:52 ` [Bug sanitizer/55482] " howarth at nitro dot med.uc.edu
@ 2012-12-10 17:15 ` howarth at nitro dot med.uc.edu
  2012-12-10 18:58 ` [Bug fortran/55482] " jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2012-12-10 17:15 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55482

Jack Howarth <howarth at nitro dot med.uc.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-apple-darwin12       |x86_64-apple-darwin12,x86_6
                   |                            |4-unknown-linux-gnu
               Host|x86_64-apple-darwin12       |x86_64-apple-darwin12,x86_6
                   |                            |4-unknown-linux-gnu
              Build|x86_64-apple-darwin12       |x86_64-apple-darwin12,x86_6
                   |                            |4-unknown-linux-gnu

--- Comment #2 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-12-10 17:14:57 UTC ---
Also seen on x86_64 Fedora 15.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/55482] gfortran.dg/class_array_7.f03 execution failures with -fsanitize=address
  2012-11-27  1:40 [Bug sanitizer/55482] New: gfortran.dg/class_array_7.f03 execution failures with -fsanitize=address howarth at nitro dot med.uc.edu
  2012-11-27  1:52 ` [Bug sanitizer/55482] " howarth at nitro dot med.uc.edu
  2012-12-10 17:15 ` howarth at nitro dot med.uc.edu
@ 2012-12-10 18:58 ` jakub at gcc dot gnu.org
  2012-12-11 15:10 ` tromey at gcc dot gnu.org
  2013-06-29 22:07 ` dominiq at lps dot ens.fr
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-12-10 18:58 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55482

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|sanitizer                   |fortran

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-10 18:58:28 UTC ---
Can be reproduced also without -fsanitize=address, under valgrind, thus either
FE bug or testsuite bug.

BTW, the debug info for the classes looks wrong, break 25 (i.e. on the
a%i = b%i
line) plus ptype a
yields:
(gdb) ptype a
type = Type __class_realloc_Base_type
PTR TO -> (     Type base_type
integer(kind=4) :: i
    End Type base_type :: _data)
PTR TO -> (     Type __vtype_realloc_Base_type
integer(kind=4) :: _hash
integer(kind=4) :: _size
PTR TO -> (         Type __vtype_realloc_Base_type
integer(kind=4) :: _hash
integer(kind=4) :: _size
PTR TO -> (             Type __vtype_realloc_Base_type
integer(kind=4) :: _hash
integer(kind=4) :: _size
PTR TO -> (                 Type __vtype_realloc_Base_type
integer(kind=4) :: _hash
integer(kind=4) :: _size
PTR TO -> (                     Type __vtype_realloc_Base_type
etc. forever.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/55482] gfortran.dg/class_array_7.f03 execution failures with -fsanitize=address
  2012-11-27  1:40 [Bug sanitizer/55482] New: gfortran.dg/class_array_7.f03 execution failures with -fsanitize=address howarth at nitro dot med.uc.edu
                   ` (2 preceding siblings ...)
  2012-12-10 18:58 ` [Bug fortran/55482] " jakub at gcc dot gnu.org
@ 2012-12-11 15:10 ` tromey at gcc dot gnu.org
  2013-06-29 22:07 ` dominiq at lps dot ens.fr
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu.org @ 2012-12-11 15:10 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55482

Tom Tromey <tromey at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at gcc dot gnu.org

--- Comment #4 from Tom Tromey <tromey at gcc dot gnu.org> 2012-12-11 15:09:26 UTC ---
(In reply to comment #3)

> BTW, the debug info for the classes looks wrong, break 25
[...]

The DWARF seems reasonable enough to me.  I think this is a gdb bug.
Basically, the Fortran type-printer always prints the target type
of a pointer type.  This causes infinite recursion.
I don't know Fortran well enough to say what the best fix would be.
If someone can tell me what it ought to do, I can implement it.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug fortran/55482] gfortran.dg/class_array_7.f03 execution failures with -fsanitize=address
  2012-11-27  1:40 [Bug sanitizer/55482] New: gfortran.dg/class_array_7.f03 execution failures with -fsanitize=address howarth at nitro dot med.uc.edu
                   ` (3 preceding siblings ...)
  2012-12-11 15:10 ` tromey at gcc dot gnu.org
@ 2013-06-29 22:07 ` dominiq at lps dot ens.fr
  4 siblings, 0 replies; 6+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-29 22:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55482

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Fixed by the patch for PR57456, r199528, duplicate of pr56956.

*** This bug has been marked as a duplicate of bug 56596 ***


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-06-29 22:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-27  1:40 [Bug sanitizer/55482] New: gfortran.dg/class_array_7.f03 execution failures with -fsanitize=address howarth at nitro dot med.uc.edu
2012-11-27  1:52 ` [Bug sanitizer/55482] " howarth at nitro dot med.uc.edu
2012-12-10 17:15 ` howarth at nitro dot med.uc.edu
2012-12-10 18:58 ` [Bug fortran/55482] " jakub at gcc dot gnu.org
2012-12-11 15:10 ` tromey at gcc dot gnu.org
2013-06-29 22:07 ` dominiq at lps dot ens.fr

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).