From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116324 invoked by alias); 6 Jul 2015 15:32:29 -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 116252 invoked by uid 48); 6 Jul 2015 15:32:24 -0000 From: "glaubitz at physik dot fu-berlin.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/66780] New: [4.9 Regression] Compiling with -fstack-protector-strong causes binary to segfault Date: Mon, 06 Jul 2015 15:32:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: glaubitz at physik dot fu-berlin.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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 target_milestone cf_gcctarget Message-ID: 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: 2015-07/txt/msg00468.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66780 Bug ID: 66780 Summary: [4.9 Regression] Compiling with -fstack-protector-strong causes binary to segfault Product: gcc Version: 4.9.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: glaubitz at physik dot fu-berlin.de CC: kkojima at gcc dot gnu.org, olegendo at gcc dot gnu.org Target Milestone: --- Target: sh*-*-* Hello! After several days of debugging, I finally found out why many packages build on the Debian sh4 buildds currently segfault on sh4, it's the CFLAG -fstack-protector-strong which is the culprit. To reproduce: $ wget http://http.debian.net/debian/pool/main/p/procps/procps_3.3.10.orig.tar.xz $ tar xf procps_3.3.10.orig.tar.xz $ cd procps-3.3.10 $ export CFLAGS="-g -fstack-protector-strong -Wformat -Werror=format-security" ; export "CXXFLAGS=-g -fstack-protector-strong -Wformat -Werror=format-security" ; ./configure ; make $ ./ps/pscommand Signal 11 (SEGV) caught by lt-pscommand (procps-ng version 3.3.10). /root/procps/procps-3.3.10/ps/.libs/lt-pscommand:display.c:66: please report this bug Segmentation fault $ make clean $ export CFLAGS="-g -Wformat -Werror=format-security" ; export "CXXFLAGS=-g -Wformat -Werror=format-security" ; ./configure ; make $ ./ps/pscommand PID TTY TIME CMD 5396 pts/0 00:00:00 lt-pscommand 32356 pts/0 00:00:00 bash $ This bug affects many packages in the Debian sh4 port, for example: pcre3: http://buildd.debian-ports.org/status/fetch.php?pkg=pcre3&arch=sh4&ver=2%3A8.35-7&stamp=1436092677 cups: http://buildd.debian-ports.org/status/fetch.php?pkg=cups&arch=sh4&ver=1.7.5-12&stamp=1436128958 glib-2.0: http://buildd.debian-ports.org/status/fetch.php?pkg=glib2.0&arch=sh4&ver=2.44.1-1.1&stamp=1436141984 Adrian