From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31775 invoked by alias); 6 May 2014 05:31:42 -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 31722 invoked by uid 48); 6 May 2014 05:31:37 -0000 From: "athantor+gccbugzilla at athi dot pl" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/61071] New: With certain configurations of variables on function's stack, when debugging 32bit binary compiled with '-fsanitize=address', some variables in gdb are printed out as '' despite passing '-O0 -ggdb3' in compilation switches. Date: Tue, 06 May 2014 05:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: athantor+gccbugzilla at athi dot pl X-Bugzilla-Status: UNCONFIRMED 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_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-05/txt/msg00318.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61071 Bug ID: 61071 Summary: With certain configurations of variables on function's stack, when debugging 32bit binary compiled with '-fsanitize=3Daddress', some variables in gdb are printed out as '' despite passing '-O0 -ggdb3' in compilation switches. Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: athantor+gccbugzilla at athi dot pl CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org Created attachment 32739 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=3D32739&action=3Dedit testcase Description: With certain configurations of variables on function's stack, when debugging 32bit binary compiled with '-fsanitize=3Daddress', some variables in gdb are printed out as '' despite passing '-O0 -ggdb3' in compilation switches. Problem occurres (for me) only when debugging 32bit binary; same code in 64= bit works OK. It doesn't matter if I'm cross compiling it 64b=E2=86=9232b nor i= f I compile it natively on i386 version of Arch. It was working OK with gcc <4.9. Additional info: Linux kk 3.14.2-1-ARCH #1 SMP PREEMPT Sun Apr 27 11:28:44 CEST 2014 x86_64 GNU/Linux gcc 4.9.0 gdb 7.7 glibc 2.19 binutils 2.24 Steps to reproduce: 1) Compile attached source file with gcc -m32 -Wall -Wextra -Wno-unused-variable -fsanitize=3Daddress -ggdb3 -O0= -o test test.c 2) gdb it with: gdb --ex 'b main' --ex 'r' --ex 'p d' --ex 'q' ./test If you'll compile with ASAN, gdb will show that variable 'd' is optimized o= ut despite '-O0' in gcc switches: Breakpoint 1, main () at test.c:10 10 int d =3D 4; $1 =3D remove '-fsanitize=3Daddress' from switches and gdb works as it should (ign= ore uninitialized value): Breakpoint 1, main () at test.c:10 10 int d =3D 4; $1 =3D 134513883 What's funny, if I'll remove zeroing of the 't' array or decrease its size = to 36B, then gdb starts to print 'd' OK. In both cases debug info about the 'd' variable seems to be present in the binary: <2>: Abbrev Number: 8 (DW_TAG_variable) DW_AT_name : d DW_AT_decl_file : 1 DW_AT_decl_line : 11 DW_AT_type : <0x53> >>From gcc-bugs-return-450627-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue May 06 06:11:58 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 7114 invoked by alias); 6 May 2014 06:11:57 -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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 7076 invoked by uid 48); 6 May 2014 06:11:53 -0000 From: "wence at gmx dot li" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/61068] -O3 generates bad code (when tree-vectorize or inline-functions is on) Date: Tue, 06 May 2014 06:11:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wence at gmx dot li X-Bugzilla-Status: UNCONFIRMED 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: attachments.isobsolete attachments.created 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-05/txt/msg00319.txt.bz2 Content-length: 553 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61068 Lawrence Mitchell changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #32738|0 |1 is obsolete| | --- Comment #4 from Lawrence Mitchell --- Created attachment 32740 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32740&action=edit updated preprocessed source (no double[][] -> (double *))