If I build ghostscript on an AMD64 system built with hardened, pic, pie, and ssp all enabled, and run "gs" from the command line, I get a copyright notice followed by a segfault. If I recompile ghoscript after using gcc-config to switch to gcc -hardenednopie, gs works fine. I have encountered this with 2005.1, .0, and previous versions. Reproducible: Always Steps to Reproduce: 1. /etc/make.conf: USE="hardened pic pie" CFLAGS="-fstack-protector" and install a hardened system 2. emerge ghostscript 3. gs Actual Results: segfault Expected Results: GS>
Did you try it with -hardenednossp? We've seen a couple of cases where things work with pie or ssp, but not both; it'd be useful to know if that's also the case here.
btw when using -hardened or -hardenednopie, don't put -fstack-protector in CFLAGS; the compiler does this automatically. In fact, don't ever put -fstack-protector in CFLAGS, use the -hardened compiler otherwise stuff will break. Also, please paste the output of 'emerge --info'
Marking bug as INVALID. user has -fstack-protector in CFLAGS (not a hardened bug)
(In reply to comment #3) > Marking bug as INVALID. > > user has -fstack-protector in CFLAGS (not a hardened bug) Sorry to come in this late, but I also just got bitten by this bug (and I do not have -fstack-protector in my CFLAGS - I do have USE=hardened) If I choose the x86_64-pc-linux-gnu-3.4.4-vanilla GCC-config gs works without problem. Here's my emerge --info Portage 2.0.51.22-r3 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 2. 6.14-gentoo-r2 x86_64) ================================================================= System uname: 2.6.14-gentoo-r2 x86_64 AMD Athlon(tm) 64 Processor 3800+ Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/ fax /usr/share/config /var/bind /var/qmail/control /var/spool/fax/etc" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=k8 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.osuosl.org/" MAKEOPTS="-j2" PKGDIR="/var/pkgdir" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://prince.dmj.nu/gentoo-portage" USE="amd64 apache2 avi bash-completion berkdb bitmap-fonts bzip2 crypt cups curl eds emboss encode expat fam fax foomaticdb fortran gdbm gif gmp gstreamer hardened idn imlib jpeg lzw lzw-tiff mp3 mpeg ncurses nls no-htdocs opengl pdflib perl png ppds python quicktime readline samba scanner sdl ssl tcpd tiff truetype-fonts type1-fonts udev usb userlocales xml2 xpm xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS Regards, --Dan