From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9555 invoked by alias); 10 Jul 2014 20:37:03 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 9382 invoked by uid 48); 10 Jul 2014 20:36:56 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/61775] Allocatable array initialized by implied-do loop array constructor gives invalid memory reference Date: Thu, 10 Jul 2014 20:37:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-07/txt/msg00676.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61775 Dominique d'Humieres changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-07-10 Ever confirmed|0 |1 --- Comment #3 from Dominique d'Humieres --- > Whatever the issue was, it appears to be fixed in HEAD. I don't think so. Could you run the test with -fsanitize=address. On x86_64-apple-darwin13 r212433, I get at run time: ================================================================= ==4401==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000e014 at pc 0x1064f08c1 bp 0x7fff597100e0 sp 0x7fff597100d8 WRITE of size 4 at 0x60200000e014 thread T0 #0 0x1064f08c0 (/Users/dominiq/Documents/Fortran/g95bench/win/f90/bug/a.out+0x1000018c0) #1 0x1064f0d19 (/Users/dominiq/Documents/Fortran/g95bench/win/f90/bug/a.out+0x100001d19) #2 0x7fff922ef5fc (/usr/lib/system/libdyld.dylib+0x35fc) 0x60200000e014 is located 0 bytes to the right of 4-byte region [0x60200000e010,0x60200000e014) allocated by thread T0 here: #0 0x10652a4c9 (/opt/gcc/gcc4.10p-212433/lib/libasan.1.dylib+0x314c9) #1 0x1064f0846 (/Users/dominiq/Documents/Fortran/g95bench/win/f90/bug/a.out+0x100001846) #2 0x1064f0d19 (/Users/dominiq/Documents/Fortran/g95bench/win/f90/bug/a.out+0x100001d19) #3 0x7fff922ef5fc (/usr/lib/system/libdyld.dylib+0x35fc) SUMMARY: AddressSanitizer: heap-buffer-overflow ??:0 ?? 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[04]fa fa fa 06 fa fa fa 06 fa fa fa 05 fa 0x1c0400001c10: fa fa 00 fa fa fa 00 00 fa fa 03 fa fa fa 00 02 0x1c0400001c20: fa fa 00 07 fa fa 00 fa fa fa 00 00 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 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 Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc ASan internal: fe ==4401==ABORTING