[Bug fortran/60576] [6/7/8 Regression] FAIL: gfortran.dg/assumed_rank_7.f90

2018-02-01 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60576

--- Comment #26 from Dominique d'Humieres  ---
% gfc /opt/gcc/_clean/gcc/testsuite/gfortran.dg/assumed_rank_7.f90
-fsanitize=address
% ./a.out
=
==77100==ERROR: AddressSanitizer: stack-buffer-overflow on address
0x7ffeed4a1f28 at pc 0x000102a2f4b4 bp 0x7ffeed4a1b70 sp 0x7ffeed4a1320
READ of size 400 at 0x7ffeed4a1f28 thread T0
#0 0x102a2f4b3 in wrap_memmove (libasan.5.dylib:x86_64+0x184b3)
#1 0x102760657 in bar.3811 (a.out:x86_64+0x13657)
#2 0x10275efa3 in MAIN__ (a.out:x86_64+0x11fa3)
#3 0x10276076e in main (a.out:x86_64+0x1376e)
#4 0x7fff7011c114 in start (libdyld.dylib:x86_64+0x1114)

Address 0x7ffeed4a1f28 is located in stack of thread T0 at offset 312 in frame
#0 0x10275e0a8 in MAIN__ (a.out:x86_64+0x110a8)

  This frame has 5 object(s):
[32, 48) 'FRAME.13'
[96, 184) 'at'
[224, 312) 'atmp.6'
[352, 760) 'class.4' <== Memory access at offset 312 partially underflows
this variable
[800, 1208) 'class.5'
HINT: this may be a false positive if your program uses some custom stack
unwind mechanism or swapcontext
  (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow
(libasan.5.dylib:x86_64+0x184b3) in wrap_memmove
Shadow bytes around the buggy address:
  0x1fffdda94390: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1fffdda943a0: 00 00 00 00 00 00 00 00 00 f2 f3 f3 f3 f3 00 00
  0x1fffdda943b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1
  0x1fffdda943c0: f1 f1 00 00 f2 f2 f2 f2 f2 f2 00 00 00 00 00 00
  0x1fffdda943d0: 00 00 00 00 00 f2 f2 f2 f2 f2 00 00 00 00 00 00
=>0x1fffdda943e0: 00 00 00 00 00[f2]f2 f2 f2 f2 00 00 00 00 00 00
  0x1fffdda943f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1fffdda94400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1fffdda94410: 00 00 00 00 00 00 00 00 00 00 00 00 00 f2 f2 f2
  0x1fffdda94420: f2 f2 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1fffdda94430: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:   00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:   fa
  Freed heap region:   fd
  Stack left redzone:  f1
  Stack mid redzone:   f2
  Stack right redzone: f3
  Stack after return:  f5
  Stack use after scope:   f8
  Global redzone:  f9
  Global init order:   f6
  Poisoned by user:f7
  Container overflow:  fc
  Array cookie:ac
  Intra object redzone:bb
  ASan internal:   fe
  Left alloca redzone: ca
  Right alloca redzone:cb
==77100==ABORTING

[Bug fortran/60576] [6/7/8 Regression] FAIL: gfortran.dg/assumed_rank_7.f90

2018-02-01 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60576

--- Comment #25 from Thomas Koenig  ---
Strange, I don't see it; what I get is

ig25@linux-d6cw:/tmp> gfortran -g -fsanitize=address assumed_rank_7.f90 
ig25@linux-d6cw:/tmp> ./a.out

=
==21952==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 24 byte(s) in 1 object(s) allocated from:
#0 0x7fa951f6cf30 in __interceptor_malloc
../../../../trunk/libsanitizer/asan/asan_malloc_linux.cc:86
#1 0x4013fc in MAIN__ /tmp/assumed_rank_7.f90:18
#2 0x40333b in main /tmp/assumed_rank_7.f90:25
#3 0x7fa950ec3f49 in __libc_start_main (/lib64/libc.so.6+0x20f49)

SUMMARY: AddressSanitizer: 24 byte(s) leaked in 1 allocation(s).

... but the memory leak from an allocate in the main program is
something else

I also don't see anything with valgrind.

Can you post your output?

[Bug fortran/60576] [6/7/8 Regression] FAIL: gfortran.dg/assumed_rank_7.f90

2018-02-01 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60576

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #24 from Dominique d'Humieres  ---
Still failing at r257125 when the test is compiled with -fsanitize=address.

[Bug fortran/60576] [6/7/8 Regression] FAIL: gfortran.dg/assumed_rank_7.f90

2018-02-01 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60576

Thomas Koenig  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 CC||tkoenig at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #23 from Thomas Koenig  ---
I just tested it with current trunk and gcc 7.  It is fixed.

Closing.

[Bug fortran/60576] [6/7/8 Regression] FAIL: gfortran.dg/assumed_rank_7.f90

2017-11-03 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60576

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|5.5 |6.5