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