Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 18672 - net-misc/openssh-3.6.1_p1 fails with -fstack-protector (gcc 3.2.2-r3)
Summary: net-misc/openssh-3.6.1_p1 fails with -fstack-protector (gcc 3.2.2-r3)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: High major (vote)
Assignee: Matthew Rickard
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-02 22:24 UTC by Chris PeBenito (RETIRED)
Modified: 2006-02-04 06:03 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris PeBenito (RETIRED) gentoo-dev 2003-04-02 22:24:43 UTC
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
Comment 1 Chris PeBenito (RETIRED) gentoo-dev 2003-04-08 21:41:11 UTC
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
Comment 2 Chris PeBenito (RETIRED) gentoo-dev 2003-04-17 14:54:38 UTC
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
Comment 3 Chris PeBenito (RETIRED) gentoo-dev 2003-04-24 10:44:49 UTC
Tried the patch from IBM's Hiroaki Etoh.  Now all of the segfaults are cleared up, and everything compiles successfully.
Comment 4 Matthew Rickard 2003-04-24 11:32:42 UTC
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);
Comment 5 Matthew Rickard 2003-04-24 21:42:16 UTC
Committed the fix.