openssh fails when propolice is on. If I remove -fstack-protector from cflags, it compiles ok. Tried cflags of -O2 -fstack-protector, and it still fails. gcc -O2 -fstack-protector -pipe -Wall -Wpointer-arith -Wno-uninitialized -I. -I. -DSSHDIR=\"/etc/ssh\" -D_PATH_SSH_PROGRAM=\"/usr/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/lib/misc/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/lib/misc/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/usr/lib/misc/ssh-keysign\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DSSH_RAND_HELPER=\"/usr/lib/misc/ssh-rand-helper\" -DHAVE_CONFIG_H -c ssh.c progressmeter.c: In function `draw_progress_meter': progressmeter.c:271: internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. make: *** [progressmeter.o] Error 1 make: *** Waiting for unfinished jobs.... !!! ERROR: net-misc/openssh-3.6.1_p1 failed. !!! Function src_compile, Line 92, Exitcode 2 !!! compile problem
Found another one where gcc segfaults. This time in dev-db/mysql-4.0.12. Can't be totally sure that they're related, but posting anyway. /bin/sh ../libtool --mode=compile gcc -DDEFAULT_CHARSET_HOME="\"/usr\"" -DDATADIR="\"/var/lib/mysql\"" -DSHAREDIR="\"/usr/share/mysql\"" -DDONT_USE_RAID -I. -I. -I.. -I./../include -I../include -I./.. -I.. -I.. -O3 -DDBUG_OFF -mcpu=750 -fsigned-char -mpowerpc-gfxopt -frename-registers -fforce-addr -fstack-protector -pipe -DHAVE_ERRNO_AS_DEFINE=1 -DUSE_OLD_FUNCTIONS -O3 -c -o password.lo `test -f password.c || echo './'`password.c password.c: In function `check_scramble': password.c:191: internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. make[2]: *** [password.lo] Error 1
bah, hit another compile fail in sys-apps/gawk-3.1.2-r3 if gcc -DDEFPATH="\".:/usr/share/awk\"" -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR="\"/usr/share/locale\"" -I. -I. -I. -I./intl -mcpu=750 -O2 -fsigned-char -mpowerpc-gfxopt -frename-registers -fforce-addr -fstack-protector -pipe -MT builtin.o -MD -MP -MF ".deps/builtin.Tpo" \ -c -o builtin.o `test -f 'builtin.c' || echo './'`builtin.c; \ then mv ".deps/builtin.Tpo" ".deps/builtin.Po"; \ else rm -f ".deps/builtin.Tpo"; exit 1; \ fi builtin.c: In function `format_tree': builtin.c:1105: internal error: Segmentation fault
Tried the patch from IBM's Hiroaki Etoh. Now all of the segfaults are cleared up, and everything compiles successfully.
Just for archiving purposes, here is the patch from Hiroaki Etoh to fix the PPC segfault issues. I will commit this fix as soon as I have a chance to test on x86 and make sure that still works :) Index: protector.c =================================================================== RCS file: /home/cvsroot/gcc/gcc/Attic/protector.c,v retrieving revision 1.1.24.2 diff -u -r1.1.24.2 protector.c --- protector.c 2003/03/11 05:51:30 1.1.24.2 +++ protector.c 2003/04/23 14:19:11 @@ -2004,7 +2004,9 @@ insn_pushed = FALSE; debuginsn = insn; push_frame_in_operand (insn, PATTERN (insn), push_size, boundary); - if (insn_pushed) + if (insn_pushed + /* skip if it is called from purge_address_of */ + && cse_not_expected) { rtx after = insn; rtx seq = split_insns (PATTERN (insn), insn);
Committed the fix.