https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78958
Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2017-01-05 CC| |vehre at gcc dot gnu.org Blocks| |78672 Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- On x86_64-apple-darwin16, compiling gfortran.dg/alloc_comp_class_5.f03 with -fsanitize=address gives at run time ================================================================= ==15392==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000273 at pc 0x000108ec2ed9 bp 0x7fff56f7fb80 sp 0x7fff56f7f330 WRITE of size 3 at 0x602000000273 thread T0 #0 0x108ec2ed8 in wrap_memmove (/opt/gcc/gcc7w/lib/libasan.4.dylib+0x41ed8) #1 0x108c86723 in __copy_character_1.3652 (/Users/dominiq/Documents/Fortran/g95bench/win/f90/bug/a.out+0x100007723) #2 0x108c85c1f in __array_list_MOD_add_item (/Users/dominiq/Documents/Fortran/g95bench/win/f90/bug/a.out+0x100006c1f) #3 0x108c86f82 in MAIN__ (/Users/dominiq/Documents/Fortran/g95bench/win/f90/bug/a.out+0x100007f82) #4 0x108c8919e in main (/Users/dominiq/Documents/Fortran/g95bench/win/f90/bug/a.out+0x10000a19e) #5 0x7fffbd674254 in start (/usr/lib/system/libdyld.dylib+0x5254) 0x602000000273 is located 0 bytes to the right of 3-byte region [0x602000000270,0x602000000273) allocated by thread T0 here: #0 0x108ee1439 in wrap_malloc (/opt/gcc/gcc7w/lib/libasan.4.dylib+0x60439) #1 0x108c84e71 in __array_list_MOD_add_item (/Users/dominiq/Documents/Fortran/g95bench/win/f90/bug/a.out+0x100005e71) #2 0x108c86f82 in MAIN__ (/Users/dominiq/Documents/Fortran/g95bench/win/f90/bug/a.out+0x100007f82) #3 0x108c8919e in main (/Users/dominiq/Documents/Fortran/g95bench/win/f90/bug/a.out+0x10000a19e) #4 0x7fffbd674254 in start (/usr/lib/system/libdyld.dylib+0x5254) SUMMARY: AddressSanitizer: heap-buffer-overflow (/opt/gcc/gcc7w/lib/libasan.4.dylib+0x41ed8) in wrap_memmove Shadow bytes around the buggy address: 0x1c03fffffff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1c0400000000: fa fa fd fd fa fa fd fd fa fa 00 07 fa fa 00 06 0x1c0400000010: fa fa 03 fa fa fa 00 00 fa fa 00 06 fa fa 06 fa 0x1c0400000020: fa fa 07 fa fa fa 07 fa fa fa fd fa fa fa fd fa 0x1c0400000030: fa fa fd fd fa fa 00 fa fa fa 00 00 fa fa 00 fa =>0x1c0400000040: fa fa 00 fa fa fa 00 00 fa fa 00 fa fa fa[03]fa 0x1c0400000050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c0400000060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c0400000070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c0400000080: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c0400000090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 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 ==15392==ABORTING Program received signal SIGABRT: Process abort signal. Backtrace for this error: #0 0x108c8dee9 #1 0x108c8d243 #2 0x7fffbd881bb9 Abort See also pr78672. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78672 [Bug 78672] Gfortran test suite failures with a sanitized compiler