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