Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 97452 - dev-lang/perl-5.8.7 ebuild fails: miniperl segmentation fault while making DynaLoader
Summary: dev-lang/perl-5.8.7 ebuild fails: miniperl segmentation fault while making Dy...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High blocker (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
: 97813 104721 114288 119212 119216 119332 119610 125313 134739 136545 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-30 00:42 UTC by Howard B. Golden
Modified: 2009-02-13 04:39 UTC (History)
28 users (show)

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


Attachments
perl-5.8.7-cflags-regexp.patch (perl-5.8.7-cflags-regexp.patch,458 bytes, patch)
2005-07-03 21:14 UTC, solar (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Howard B. Golden 2005-06-30 00:42:19 UTC
While building dev-lang/perl-5.8.7 with stack-protector enabled, miniperl gets a
segmentation fault while making DynaLoader. This is reported as Perl #36309. See
http://www.gossamer-threads.com/lists/perl/porters/193645 .

Reproducible: Always
Steps to Reproduce:
emerge =dev-lang/perl-5.8.7
Actual Results:  
./miniperl minimod.pl > minimod.tmp
sh mv-if-diff minimod.tmp lib/ExtUtils/Miniperl.pm
touch lib/ExtUtils/Miniperl.pm
cd lib/unicore &&  ../../miniperl -I../../lib mktables -w
`sh  cflags "optimize='-march=athlon-xp -O2 -pipe -fstack-protector'"
perlmain.o` -fPIC perlmain.c
          CCCMD =  i686-pc-linux-gnu-gcc -DPERL_CORE -c -fno-strict-aliasing
-pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=athlon-xp -O2 -pipe
-fstack-protector  -Wall

        Making DynaLoader (static_pic)
Processing hints file hints/linux.pl
Writing Makefile for DynaLoader
make[1]: Entering directory
`/var/tmp/portage/perl-5.8.7/work/perl-5.8.7/ext/DynaLoader'
make[1]: Leaving directory
`/var/tmp/portage/perl-5.8.7/work/perl-5.8.7/ext/DynaLoader'
make[1]: Entering directory
`/var/tmp/portage/perl-5.8.7/work/perl-5.8.7/ext/DynaLoader'
../../miniperl "-I../../lib" "-I../../lib" "-I../../lib" "-I../../lib"
DynaLoader_pm.PL DynaLoader.pm
../../miniperl "-I../../lib" "-I../../lib" "-I../../lib" "-I../../lib"
XSLoader_pm.PL XSLoader.pm
cp XSLoader.pm ../../lib/XSLoader.pm
cp DynaLoader.pm ../../lib/DynaLoader.pm
AutoSplitting ../../lib/DynaLoader.pm (../../lib/auto/DynaLoader)
rm -f DynaLoader.xs
cp dl_dlopen.xs DynaLoader.xs
../../miniperl "-I../../lib" "-I../../lib" ../../lib/ExtUtils/xsubpp
-noprototypes -typemap ../../lib/ExtUtils/typemap DynaLoader.xs > DynaLoader.xsc
&& mv DynaLoader.xsc DynaLoader.c
/bin/sh: line 1:  1994 Segmentation fault      ../../miniperl "-I../../lib"
"-I../../lib" ../../lib/ExtUtils/xsubpp -noprototypes -typemap
../../lib/ExtUtils/typemap DynaLoader.xs >DynaLoader.xsc
make[1]: *** [DynaLoader.o] Error 139
make[1]: Leaving directory
`/var/tmp/portage/perl-5.8.7/work/perl-5.8.7/ext/DynaLoader'
make: *** [lib/auto/DynaLoader/DynaLoader.a] Error 2

Expected Results:  
Should have compiled without error.

Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0,
2.6.11-gentoo-r5 i686)
=================================================================
System uname: 2.6.11-gentoo-r5 i686 AMD Athlon(tm) XP 2200+
Gentoo Base System version 1.6.12
ccache version 2.4 [enabled]
dev-lang/python:     2.1.3-r1, 2.2.3-r5, 2.3.5-r1, 2.4.1-r1
sys-apps/sandbox:    1.2.9
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fstack-protector"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openjms/config /usr/kde/2/share/config
/usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config
/usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config
/usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/fax
/usr/lib/mozilla/defaults/pref /usr/share/config /var/bind /var/qmail/alias
/var/qmail/control /var/spool/fax/etc /var/vpopmail/domains /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/texmf/web2c
/etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fstack-protector"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="ftp://gentoo.ccccom.com http://mirror.datapipe.net/gentoo
ftp://gentoo.chem.wisc.edu/gentoo/ ftp://mirror.usu.edu/mirrors/gentoo/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowex 3dnowext X Xaw3d a52 aac aalib acl acpi acpi4linux adns
alsa amd antlr apache2 apm ared aredmem arts artswrappersuid artworkextra
audiofile avi bash-completion bcmath berkdb bitmap-fonts bonobo bzip2 bzlib c++
calendar caps cdb cdda cddb cdf cdparanoia cdr chroot cjk clamav cln crypt ctype
cups curl curlwrappers dba dbase dbx dio directfb divx4linux djbfft dnd doc
droproot dv dvd dvdr eds emacs emboss encode erandom esd ethereal evo examples
exif fam fastcgi fbcon fdftk flac flatfile font-server foomaticdb
foreign-package foreign-sysvinit fortran freetds ftp gb gcj gcl gd gd-external
gdbm gif ginac glep gmp gnome gnomedb gnuplot gpm graphviz gstreamer gtk gtk2
gtkhtml guile haskell iconv icq idea idl imagemagick imap imlib inifile innodb
insecure-drivers ipv6 jabber jack java javamail jce jdepend jms jpeg jsch junit
jython kde kdeenablefinal kdepim kdexdeltas kerberos latex ldap leim lesstif
libclamav libg++ libgda libwww lids live log4j ltsp lua lzw-tiff mad maildir
mailwrapper matroska mbox mcal mdb memlimit mha mikmod mime ming mmap mmx motif
mozdevelop mozilla moznoirc moznomail mozsvg mozxmlterm mp3 mpeg mysql nas
native ncurses netboot nls nptl nptlonly oav objc ocaml odbc ofx ogg oggvorbis
ooo-kde opengl opens oss pam parse-clocks pcntl pcre pda pdf pdflib pear-db perl
pg-hier pg-intdatetime php pic pie plotutils png posix postgres postgresql ppds
pwdb python qt quicktime radeon rdesktop readline rhino ruby ruby18 samba sasl
sdk sdl session sguil simplexml skey slang slp snmp soap sockets speex spell spl
sql sqlite sse ssl subversion svg svga tcltk tcpd tetex theora threads tidy tiff
tokenizer truetype truetype-fonts type1 type1-fonts unicode usb utf8 vhosts
vorbis wddx win32codecs winbind wmf wxwin wxwindows xalan xemacs xerces xine xml
xml2 xmlrpc xmms xpm xv xvid xvmc yahoo yv12 zeo zlib video_cards_radeon
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS
Comment 1 Guillaume Castagnino 2005-06-30 01:26:02 UTC
Confirm the problem with a hardened box :

Portage 2.0.51.22-r1 (hardened/x86/2.6, gcc-3.4.4, glibc-2.3.5-r0,
2.6.11-xwing-r3 i686)
=================================================================
System uname: 2.6.11-xwing-r3 i686 Intel(R) Celeron(R) CPU 2.53GHz
Gentoo Base System version 1.6.12
dev-lang/python:     2.4.1-r1
sys-apps/sandbox:    1.2.9
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -mtune=pentium4 -fomit-frame-pointer -funroll-loops
-pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -O2 -mtune=pentium4 -fomit-frame-pointer
-funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildsyspkg candy ccache distlocks sandbox sfperms strict
userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo/
http://ftp.gentoo.skynet.be/pub/gentoo/
http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
LANG="fr_FR.UTF-8"
LC_ALL="fr_FR.UTF-8"
LINGUAS="fr"
PKGDIR="/usr/portage//packages/x86/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage/"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://r2d2.v6.xwing.info/gentoo-portage"
USE="x86 4kstacks X509 acl acpi acpi4linux apache2 bash-completion berkdb clamav
crypt dba dbx dga dlloader enscript extensions fbcon freetype fs gd gdbm gif
hardened idled imagemagick imap imlib2 ipv6 ithreads jpeg maildir md5sum mmx
mysql ncurses nls nptl nptlonly pam perl pic png prelude print python readline
rrdtool samba sasl slang smartcard sqlite sse sse2 ssl tcpd threads tiff
truetype truetype-fonts type1 type1-fonts unicode usb userlocales xml2 zlib
linguas_fr userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, MAKEOPTS
Comment 2 César Fernández 2005-06-30 06:04:50 UTC
Same problem here: 
 
Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0, 
2.6.12-gentoo-r1 i686) 
================================================================= 
System uname: 2.6.12-gentoo-r1 i686 AMD Athlon(TM) XP 1800+ 
Gentoo Base System version 1.6.12 
ccache version 2.4 [enabled] 
dev-lang/python:     2.4.1-r1 
sys-apps/sandbox:    1.2.8 
sys-devel/autoconf:  2.13, 2.59-r7 
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5 
sys-devel/binutils:  2.16.1 
sys-devel/libtool:   1.5.18-r1 
virtual/os-headers:  2.6.11-r2 
ACCEPT_KEYWORDS="x86 ~x86" 
AUTOCLEAN="yes" 
CBUILD="i686-pc-linux-gnu" 
CFLAGS="-march=athlon-xp -mmmx -m3dnow -msse -mfpmath=sse,387 -ffast-math -O2 
-fomit-frame-pointer -frename-registers -funroll-loops -fstack-protector -fPIC 
-pipe" 
CHOST="i686-pc-linux-gnu" 
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-march=athlon-xp -mmmx -m3dnow -msse -mfpmath=sse,387 -ffast-math 
-O2 -fomit-frame-pointer -frename-registers -funroll-loops -fstack-protector 
-fPIC -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoconfig ccache distlocks sandbox sfperms strict" 
GENTOO_MIRRORS="http://distfiles.gentoo.org 
http://distro.ibiblio.org/pub/Linux/distributions/gentoo" 
LANG="es_ES@euro" 
LC_ALL="es_ES@euro" 
LDFLAGS="-Wl,-O1" 
LINGUAS="es" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" 
USE="x86 16bit 3dnow 3dnowext S3TC X a52 aac aalib acpi alsa avi 
bash-completion berkdb bidi bzip2 cdparanoia cdr chroot cjk crypt cscope css 
cups curl dbus dlloader dvd dvdr dvdread edl emboss faac faad fam fbcon ffmpeg 
flac font-server foomaticdb foreign-sysvinit fpx gd gdbm gif gimpprint glitz 
gpm graphviz gstreamer gtk gtk2 hal hardened imagemagick imap imlib imlib2 
immqt ipv6 ithreads jabber java javascript jbig jce jikes jpeg jpeg2k justify 
kde kdeenablefinal lcms libcaca libg++ libwww linguas_es live lm_sensors 
logitech-mouse lzo lzw-tiff mad matroska md5sum mikmod mmap mmx mmxext mng 
monkey mozilla moznoirc mozsvg mp3 mpeg mpeg4 mpi mplayer msn musepack mysql 
ncurses network nls no-old-linux no_wxgtk1 nomac nomalloccheck nomotif nptl 
nptlonly ogg oggvorbis openexr opengl pam pdflib perl pic png ppds python qt 
rdesktop readline rtc sasl snmp speex spell sse ssl stencil-buffer svg symlink 
tcpd tga theora threads tiff truetype truetype-fonts unicode urandom usb 
userlocales vim-with-x visualization vorbis win32codecs wmf xine xml2 xprint 
xrandr xscreensaver xv xvid zeroconf zlib userland_GNU kernel_linux 
elibc_glibc" 
Unset:  ASFLAGS, CTARGET, MAKEOPTS, PORTDIR_OVERLAY 
 
Comment 3 Michael Cummings (RETIRED) gentoo-dev 2005-06-30 13:45:12 UTC
Hardened folks - any comments? Reading through the gossamer-threads posts, it 
would seem a flag o matic would do the trick, but this really isn't my 
territory. 
Comment 4 Nes Yarug 2005-06-30 14:57:50 UTC
Same here as well:

Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0,
2.6.9-gentoo-r1 i686)
=================================================================
System uname: 2.6.9-gentoo-r1 i686 Intel(R) Pentium(R) 4 CPU 2.53GHz
Gentoo Base System version 1.6.12
dev-lang/python:     2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.9
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -pipe -Os -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -pipe -Os -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo/ http://gentoo.mirror.sdv.fr
http://gentoo.tiscali.nl/gentoo/ ftp://ftp.solnet.ch/mirror/Gentoo"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 alsa apache2 apm bash-completion berkdb bitmap-fonts crypt cups emboss
encode foomaticdb fortran gd gdbm gif gpm hardened imagemagick imlib ipv6 java
jpeg libg++ libwww mad mikmod motif mp3 mpeg mysql ncurses nls oggvorbis opengl
oss pam pdflib perl png python readline sasl sdl slang spell ssl tcpd tiff
truetype truetype-fonts type1-fonts unicode xml2 xmms xv zlib userland_GNU
kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 5 Dirk Heinrichs 2005-07-01 00:37:44 UTC
Had the same problem. Adding -fno-stack-protector to CFLAGS solved it for me. 
Comment 6 solar (RETIRED) gentoo-dev 2005-07-01 04:31:09 UTC
Why did this just start happening?
Comment 7 Michael Cummings (RETIRED) gentoo-dev 2005-07-01 04:36:21 UTC
(In reply to comment #6) 
> Why did this just start happening? 
 
because 5.8.7 has been in our tree for maybe a good 24 hours now, tops 
(~arch'd) 
Comment 8 Mike Auty (RETIRED) gentoo-dev 2005-07-01 12:34:52 UTC
I think what solar meant was, what's changed between perl 5.8.6 which compiled
fine for all us hardened guys, and 5.8.7 which suddenly doesn't like us anymore...

The most useful reply I can think of is that it's related to the following from
the perldelta page:

"The internal pointer mapping hash used during ithreads cloning now uses an
arena for memory allocation. In tests this reduced ithreads cloning time by
about 10%."

That seems to be the only noticable change.  
Comment 9 Nes Yarug 2005-07-01 15:02:34 UTC
FWIW, the solution described in #5 worked for me.
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2005-07-03 05:34:09 UTC
*** Bug 97813 has been marked as a duplicate of this bug. ***
Comment 11 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2005-07-03 05:49:14 UTC
Also happends for me, not sure if disabling the hardended part is a usable 
solution for all, since it might lead to some security problems, right?
Comment 12 solar (RETIRED) gentoo-dev 2005-07-03 21:07:21 UTC
regcomp.c: In function `S_study_chunk':
regcomp.c:734: warning: comparison is always false due to limited range of data type

`sh  cflags "optimize='-march=i686 -O2 -pipe -fforce-addr'" regcomp.o` -fPIC
regcomp.c
	  CCCMD =  i686-pc-linux-gnu-gcc -DPERL_CORE -c -fno-strict-aliasing -pipe
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -march=i686 -O2 -pipe -fforce-addr  -Wall
regcomp.c: In function `S_study_chunk':
regcomp.c:734: warning: comparison is always false due to limited range of data type
rm -f libperl.a
/usr/bin/ar rcu libperl.a perl.o  gv.o toke.o perly.o op.o pad.o regcomp.o
dump.o util.o mg.o reentr.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o
pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o
globals.o perlio.o perlapi.o numeric.o locale.o pp_pack.o pp_sort.o 
i686-pc-linux-gnu-gcc -L/usr/local/lib -o miniperl \
    miniperlmain.o opmini.o libperl.a -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc 
./miniperl -w -Ilib -MExporter -e '<?>' || make minitest
./miniperl -Ilib configpm --heavy=lib/Config_heavy.pl configpm.tmp
sh mv-if-diff configpm.tmp lib/Config.pm
File lib/Config.pm not changed.
./miniperl -Ilib lib/lib_pm.PL
Extracting lib.pm (with variable substitutions)
	AutoSplitting perl library
./miniperl -Ilib -e 'use AutoSplit; \
autosplit_lib_modules(@ARGV)' lib/*.pm
./miniperl -Ilib -e 'use AutoSplit; \
autosplit_lib_modules(@ARGV)' lib/*/*.pm
make lib/re.pm
make[1]: Entering directory `/space/portage-tmp/portage/perl-5.8.7/work/perl-5.8.7'
make[1]: `lib/re.pm' is up to date.
make[1]: Leaving directory `/space/portage-tmp/portage/perl-5.8.7/work/perl-5.8.7'
./miniperl minimod.pl > minimod.tmp
sh mv-if-diff minimod.tmp lib/ExtUtils/Miniperl.pm
File lib/ExtUtils/Miniperl.pm not changed.
touch lib/ExtUtils/Miniperl.pm
cd lib/unicore &&  ../../miniperl -I../../lib mktables -w

	Making DynaLoader (static_pic)
make[1]: Entering directory
`/space/portage-tmp/portage/perl-5.8.7/work/perl-5.8.7/ext/DynaLoader'
make[1]: Leaving directory
`/space/portage-tmp/portage/perl-5.8.7/work/perl-5.8.7/ext/DynaLoader'
make[1]: Entering directory
`/space/portage-tmp/portage/perl-5.8.7/work/perl-5.8.7/ext/DynaLoader'
../../miniperl "-I../../lib" "-I../../lib" ../../lib/ExtUtils/xsubpp
-noprototypes -typemap ../../lib/ExtUtils/typemap DynaLoader.xs > DynaLoader.xsc
&& mv DynaLoader.xsc DynaLoader.c
/bin/sh: line 1: 31997 Segmentation fault      (core dumped) ../../miniperl
"-I../../lib" "-I../../lib" ../../lib/ExtUtils/xsubpp -noprototypes -typemap
../../lib/ExtUtils/typemap DynaLoader.xs >DynaLoader.xsc
make[1]: *** [DynaLoader.o] Error 139
make[1]: Leaving directory
`/space/portage-tmp/portage/perl-5.8.7/work/perl-5.8.7/ext/DynaLoader'
make: *** [lib/auto/DynaLoader/DynaLoader.a] Error 2

--------------------------------------------------------------------------
# cat -n regcomp.c | grep \ 734
   734			    Move(STRING(n), STRING(scan) + oldl, STR_LEN(n), char);
--------------------------------------------------------------------------
simple DynaLoader # gdb -q ../../miniperl core
Using host libthread_db library "/lib/libthread_db.so.1".
Core was generated by `../../miniperl -I../../lib -I../../lib
../../lib/ExtUtils/xsubpp -noprototypes'.
Program terminated with signal 11, Segmentation fault.
#0  0x0810c815 in S_regmatch ()
(gdb) bt full
#0  0x0810c815 in S_regmatch ()
No symbol table info available.
#1  0x08110633 in S_regmatch ()
No symbol table info available.
#2  0x08110633 in S_regmatch ()
No symbol table info available.
#3  0x0810fadd in S_regmatch ()
No symbol table info available.
#4  0x0810f5d9 in S_regmatch ()
No symbol table info available.
#5  0x0810d8fa in S_regmatch ()
No symbol table info available.
#6  0x0810f98b in S_regmatch ()
No symbol table info available.
#7  0x08110633 in S_regmatch ()
No symbol table info available.
#8  0x08110633 in S_regmatch ()
No symbol table info available.
#9  0x0810d8fa in S_regmatch ()
No symbol table info available.
#10 0x0810f98b in S_regmatch ()
No symbol table info available.
#11 0x0810f0ad in S_regmatch ()
No symbol table info available.
#12 0x0810f0ad in S_regmatch ()
No symbol table info available.
#13 0x0810f5d9 in S_regmatch ()
No symbol table info available.
#14 0x0810d8fa in S_regmatch ()
No symbol table info available.
#15 0x0810f0ad in S_regmatch ()
No symbol table info available.
#16 0x0810f0ad in S_regmatch ()
No symbol table info available.
#17 0x0810ed36 in S_regmatch ()
No symbol table info available.
#18 0x0810f0ad in S_regmatch ()
No symbol table info available.
#19 0x08110982 in S_regtry ()
No symbol table info available.
#20 0x081156ca in Perl_regexec_flags ()
No symbol table info available.
#21 0x080b89ae in Perl_pp_match ()
No symbol table info available.
#22 0x080b4f15 in Perl_runops_standard ()
No symbol table info available.
#23 0x08068b36 in perl_run ()
No symbol table info available.
#24 0x08051512 in main (argc=8, argv=0xbfffe864, env=0xbfffe888) at
miniperlmain.c:98
	exitstatus = 0

...

Comment 13 solar (RETIRED) gentoo-dev 2005-07-03 21:14:23 UTC
Created attachment 62570 [details, diff]
perl-5.8.7-cflags-regexp.patch

Patch that disables ssp on the two regexp files in perl. Allows perl to
build and run while keeping ssp active everywhere else we can. I think
the segfault happens with any ssp code when a function recursively calls
itself a bunch of times. Seen this is other regexp code before with ssp.
Comment 14 Guillaume Castagnino 2005-07-03 21:50:12 UTC
Ok, this patch work for me
But I don't know if it's the better solution or if it's the miniperl algorithm
that should be corrected...
Thanks
Comment 15 solar (RETIRED) gentoo-dev 2005-07-03 22:33:25 UTC
the root of the problem should be fixed! patch attached to simply keep 
our gentoo from full on blowing up. Problem with patches like this
however is that as soon as it's out of sight it's out of mind and we
forget where we disable security when we wanted it. However being 
that it's regexp code I don't mind so much myself it being disabled.
Comment 16 Mark Glines 2005-07-05 07:44:40 UTC
(In reply to comment #13)
solar said:

> Patch that disables ssp on the two regexp files in perl. Allows perl to
> build and run while keeping ssp active everywhere else we can. I think
> the segfault happens with any ssp code when a function recursively calls
> itself a bunch of times. Seen this is other regexp code before with ssp.

So, um, that sounds like the compiler is at fault.  Shouldn't recursive
functions work?
Comment 17 Mark Glines 2005-07-05 08:09:11 UTC
The perl-porters list mentioned this a couple weeks ago, seems to be barfing on
a pointer deref.  http://www.gossamer-threads.com/lists/perl/porters/193645
Comment 18 Mike Auty (RETIRED) gentoo-dev 2005-07-14 00:48:26 UTC
Is there anything that can be done about this temporarily.  I've found that
attempting to mask out perl-5.8.7 individually for some reason causes dependency
graph breakages (previously it was reported at the manpages package, now it's
being reported at the linuxwacom package) when attempting to update world. 
Having it unmasked means updating world has to be done manually, since this
package won't compile, and it's been like this for a few weeks now.  Does anyone
have any suggestions that could help?
Comment 19 Donnie Berkholz (RETIRED) gentoo-dev 2005-07-14 11:58:29 UTC
Sure, just specify your CFLAGS on the command line when emerging it, and make
sure -fstack-protector isn't in them.
Comment 20 Mike Auty (RETIRED) gentoo-dev 2005-07-14 14:34:08 UTC
Hmmm, first off thanks for the speedy response.  I dunno, it's possible I'm
missing something along the way, because my emerge info does have hardened, pic
and pie set, but from emerge info the CFLAGS and CXXFLAGS apparently do not list
"-fstack-protector".  Does this mean emerge info isn't showing the correct info,
or does it mean that something else is stopping perl from compiling?  Any
further ideas?

Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0, 2.6.1
2.2 i686)
=================================================================
System uname: 2.6.12.2 i686 AMD Athlon(tm) 64 Processor 3400+
Gentoo Base System version 1.6.13
ccache version 2.4 [enabled]
dev-lang/python:     2.4.1-r1
sys-apps/sandbox:    1.2.10
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X1
1/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/
distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/personal"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow X aalib acl acpi adns alsa avi bash-completion berkdb bitmap-font
s boundschecking cairo ccache cdr cjk client crypt cups djvu dlloader dvd dvdr d
vi eds emboss encode fam flac foomaticdb fortran gd gdbm gif glitz gnome gnutls
gstreamer gtk gtk2 gtkhtml hal hardened imagemagick imap imlib java jpeg junit l
ibg++ libwww mad mikmod mime mmx mmxext motif mozilla mozsvg mp3 mpeg ncurses nl
s nptl nptlonly nvidia ogg oggvorbis opengl pam pdflib perl pic pie plot png pos
tgres python quicktime readline real sdl server snmp spell sse sse2 ssl svg svga
 t1lib tcpd theora tiff truetype truetype-fonts type1-fonts unicode usb vorbis w
in32codecs xine xml2 xrandr xv xvid zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 21 solar (RETIRED) gentoo-dev 2005-07-14 14:46:26 UTC
You know.. There is a patch attached to this bug which works around the problem.
Why dont you try that...
Comment 22 Mike Auty (RETIRED) gentoo-dev 2005-07-14 15:17:49 UTC
Thank you solar, the patch seems to work fine.  I'm still confused as to how the
stack-protector/no-stack-protector flag system works, however I guess this isn't
the right place to find out.  I hope the patch gets incorporated into a revision
ebuild soon...
Comment 23 solar (RETIRED) gentoo-dev 2005-07-16 11:24:17 UTC
This only fails with -fstack-protector-all according to Peter S. Mazinger
So the patch can probably be reduced to only disable -fno-stack-protector-all
if we wanted to
Comment 24 Donnie Berkholz (RETIRED) gentoo-dev 2005-07-16 13:09:14 UTC
That's incorrect, I have -fstack-protector only in CFLAGS and hit the failure.
Comment 25 solar (RETIRED) gentoo-dev 2005-07-16 17:08:51 UTC
(In reply to comment #24)
> That's incorrect, I have -fstack-protector only in CFLAGS and hit the failure.

And you don't have +hardened or hardened specs enabled?
Comment 26 Donnie Berkholz (RETIRED) gentoo-dev 2005-07-18 00:03:56 UTC
(In reply to comment #25)
> (In reply to comment #24)
> > That's incorrect, I have -fstack-protector only in CFLAGS and hit the failure.
> 
> And you don't have +hardened or hardened specs enabled?

Nope.
Comment 27 Csaba Tóth 2005-07-23 08:29:28 UTC
the patch dont work for me.
i saved it into dev-lang/perl/files/workaround.patch

edited the perl-5.8.7.ebuild:

src_compile() {

        # would like to bracket this with a test for the existence of a
        # dotfile, but can't clean it automatically now.

        src_configure

        epatch ${FILESDIR}/workaround.patch

        emake -j1 || die "Unable to make"
}


and do an `ebuild perl-5.8.7.ebuild digest`
and it dont works. the same error appears.
pls help! or i ask better, please eliminate the bug!
thnx
Comment 28 Csaba Tóth 2005-07-23 08:33:55 UTC
oh, if it helps, my emerge info:

mars ~ # emerge info
Portage 2.0.51.22-r2 (hardened/x86/2.6, gcc-3.4.3-20050110, glibc-
2.3.4.20050125-r1, 2.6.10-hardened-r3-mars-01 i686)
=================================================================
System uname: 2.6.10-hardened-r3-mars-01 i686 Intel(R) Celeron(R) CPU 2.60GHz
Gentoo Base System version 1.6.13
dev-lang/python:     2.4.1-r1
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -mtune=pentium4 -mfpmath=sse -pipe -fomit-frame-
pointer -msse -mmmx"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openjms/config /usr/kde/2/share/config /usr/kde/3.4/e
nv /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr
/lib/X11/xkb /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -mtune=pentium4 -mfpmath=sse -pipe -fomit-frame-
pointer -msse -mmmx"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig buildpkg distlocks fixpackages sandbox sfperms 
strict"
GENTOO_MIRRORS="http://gentoo.mirror.icd.hu/ ftp://ftp.gentoo.mesh-
solutions.com/gentoo/ ftp://mirror.nutsmaas.nl/gentoo/ ftp://linux.rz.ruhr-uni-
bochum.de/gentoo-mirror/ ftp://212.219.56.146/sites/www.ibiblio.org/gentoo/ 
http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/"
LANG="hu_HU.utf8"
LC_ALL="hu_HU.utf8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage//packages/x86/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage/"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X aac accounting acl acpi acpi4linux activefilter adns apache2 apm arts 
asm bash-completion bcmath berkdb bzip2 bzlib c++ calendar cap caps cdparanoia 
cdr cdrom chroot clamac clamav cracklib crypt ctype cups curl curlwrappers 
cyrus dba dbase dbm devfs devfs26 devmap dhcp dio directfb dlloader dmx dnd 
dnsdb drac dv dvb dvd dvdr dvdread encode erandom escreen esd ethereal evms2 
exif extensions f2c fam fastcgi flac freetype fs ftp gcj gd gdbm geoip gif gmp 
gnutls gpm gtk gtk2 guile hal hardened iconv idled image imagemagick imap 
imlib inifile innodb intl ipv6 java javascript jikes jpeg jpeg2k junit ldap 
lesstif libg++ libwww live lm_sensors lzo lzw lzw-tiff mad mcal memlimit mhash 
mime mmap mmx mmx2 mng motif mp3 mpeg mpeg4 mpm-prefork mpm-worker mppe-mppc 
msdav msession mysql ncurses nethack network nls nptl nptlonly ntlm oav objc 
odbc ogg oggvorbis openal opengl openssh pam parse-clocks pcap pcntl pcre pdf 
pdflib perl pg-vacuumdelay php pic png pnp posix postgres pthreads pwdb python 
qt readline recode rpc samba sasl sdl sftplogging shared sharedmem simplexml 
skey slang smime sms snmp sockets spell squid sse ssl svg svga sysvipc tcltk 
tcpd threads tiff transcode truetype type1 unicode usb userlocales vhosts 
virus-scan vorbis wmf x86 xfs xinetd xml xml2 xmlrpc xpm zlib userland_GNU 
kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS

Comment 29 Olivier Castan 2005-08-02 06:44:33 UTC
About comment #27, IMHO you shouldn't patch after configuring but before. Just
add somenting like :
cd ${S}; epatch ${FILESDIR}/${P}-cflags-regexp.patch

in src_unpack() it may work better
Comment 30 solar (RETIRED) gentoo-dev 2005-08-02 13:09:38 UTC
Changing Severity to a blocker. This prevents ~arch bootstrapping and can be 
observed in other distros that also use ssp. Perl team I know your pretty swamped, 
right now so if you don't comment on this bug in the next few days I'm going to 
assume that is the same as a thumbs up from you for me on merging the patch.
Comment 31 Michael Cummings (RETIRED) gentoo-dev 2005-08-03 17:04:35 UTC
Solar said in comment #30
> Changing Severity to a blocker. This prevents ~arch bootstrapping and can be 
> observed in other distros that also use ssp. Perl team I know your pretty
swamped, 
> right now so if you don't comment on this bug in the next few days I'm going to 
> assume that is the same as a thumbs up from you for me on merging the patch.

I have no problems with it - actually been working with someone on the mod_perl
mess and the problems getting perl-* to compile on ppc, missed the part in this
thread where you were good with the patch. I have no problems with you
committing, or my committing, or being committed.
Comment 32 solar (RETIRED) gentoo-dev 2005-08-03 19:55:50 UTC
Thanks Michael Cummings.

Patched perl up then. 
Reopen if problem continues. 
Please re-review if we need to add extra patches for this when 5.8.8 is hitting
the tree.

Changing resolution to TEST-REQUEST
Comment 33 Csaba Tóth 2005-08-04 12:37:34 UTC
It works for me.
Comment 34 Graham Murray 2005-08-07 02:53:41 UTC
It does NOT work for me.

The patch is putting the -fno-stack-protector at the start of the compile
command, but the -fstack-protector (from CFLAGS) comes after it and nullifies
the effect of the patch.

CCCMD =  i686-pc-linux-gnu-gcc -DPERL_CORE -c -D_REENTRANT -D_GNU_SOURCE
-DTHREADS_HAVE_PIDS -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FI
LE_OFFSET_BITS=64 -fno-stack-protector -O2 -march=nocona -pipe -fstack-protector
-fomit-frame-pointer  -Wall
Comment 35 solar (RETIRED) gentoo-dev 2005-08-07 04:25:56 UTC
Note:
The patch is intended to fix hardened toolchains compiles only. 
-fstack-protector in CFLAGS is beyond the scope of hardened and is simply 
unsupported as it can lead to miscompiles of many things.

My guess is that your normal cflags are filling the $optimize variable, in which
case you can probably edit the patch on your local box and change it to read as.

+    [[ $file == regcomp ]] && export optimize="${optimize} -fno-stack-protector"
+    [[ $file == regexec ]] && export optimize="${optimize} -fno-stack-protector"
Comment 36 Ryan Hill (RETIRED) gentoo-dev 2005-08-07 14:47:45 UTC
this patch chokes gcc-4.x which does not have ssp support.  can we make it
conditional?

--- /usr/portage/dev-lang/perl/perl-5.8.7.ebuild        2005-08-03
21:05:29.000000000 -0600
+++ perl-5.8.7.ebuild   2005-08-07 15:46:21.000000000 -0600
@@ -120,7 +120,7 @@
        # with ssp enabled. This become fatal during compile time so we
        # temporally disable ssp on two regexp files till upstream has a
        # chance to work it out. Bug #97452
-       epatch "${FILESDIR}"/${P}-regexp-nossp.patch
+       gcc-specs-ssp && epatch "${FILESDIR}"/${P}-regexp-nossp.patch
 }

 src_configure() {
Comment 37 solar (RETIRED) gentoo-dev 2005-08-07 21:33:54 UTC
No we can't/ should not do conditional patching. 
We need to add the stubs to the unsupported gcc-4.0 or just bump it to 4.1
Starting with gcc-4.1 ssp is included mainline.
Comment 38 Joshua Kinard gentoo-dev 2005-10-22 12:53:11 UTC
*** Bug 104721 has been marked as a duplicate of this bug. ***
Comment 39 Joshua Kinard gentoo-dev 2005-12-16 17:08:03 UTC
*** Bug 114288 has been marked as a duplicate of this bug. ***
Comment 40 Jakub Moc (RETIRED) gentoo-dev 2006-01-16 10:08:50 UTC
*** Bug 119212 has been marked as a duplicate of this bug. ***
Comment 41 Jakub Moc (RETIRED) gentoo-dev 2006-01-16 10:53:56 UTC
*** Bug 119216 has been marked as a duplicate of this bug. ***
Comment 42 Jakub Jozwicki 2006-01-17 06:58:29 UTC
It appears that patch doesn't work

../../miniperl "-I../../lib" "-I../../lib" ../../lib/ExtUtils/xsubpp -noprototypes -typemap ../../lib/ExtUtils/typemap DynaLoader.xs > DynaLoader.xsc && mv DynaLoader.xsc DynaLoader.c
/bin/sh: line 1:  6087 Segmentation fault      ../../miniperl "-I../../lib" "-I../../lib" ../../lib/ExtUtils/xsubpp -noprototypes -typemap ../../lib/ExtUtils/typemap DynaLoader.xs >DynaLoader.xsc
make[1]: *** [DynaLoader.o] Error 139
make[1]: Leaving directory `/var/tmp/portage/perl-5.8.7-r3/work/perl-5.8.7/ext/DynaLoader'
make: *** [lib/auto/DynaLoader/DynaLoader.a] Error 2

Portage 2.0.53 (hardened/x86/2.6, gcc-3.4.5, glibc-2.3.5-r2, 2.6.15-gentoo i686)
=================================================================
System uname: 2.6.15-gentoo i686 AMD Athlon(tm) XP 1600+
Gentoo Base System version 1.12.0_pre13
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     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.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=pentium3 -fomit-frame-pointer -fforce-addr -fstack-protector"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /lib/rcscripts /sbin /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -pipe -march=pentium3 -fomit-frame-pointer -fforce-addr -fstack-protector"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks loadpolicy prelink sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LC_ALL="pl_PL.UTF-8"
LINGUAS="pl"
PKGDIR="/usr/portage//packages/x86/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage/"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl adns alsa apache2 asf audiofile bash-completion berkdb bzip2 cdr crypt cups curl dbus dlloader dri dvd dvdr dvdread ethereal exif expat fam ffmpeg flac foomaticdb gd gdbm gif gimpprint glut gmp gphoto2 gpm gstreamer gtk gtk2 hal hardened idn imagemagick imlib java jpeg jpeg2k junit kde lcms ldap libwww mad mmx mng mono motif mozilla mp3 ncurses nls nptl ogg opengl pam pcre perl php pic pie png postgres ppds python qt readline ruby samba sdl slang slp spell sqlite sse ssl svg tcltk tcpd tetex tiff truetype truetype-fonts udev unicode usb userlocales vorbis wmf x86 xine xml2 xmms xv xvid zeroconf zlib linguas_pl userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LDFLAGS, MAKEOPTS


Comment 43 Jakub Moc (RETIRED) gentoo-dev 2006-01-17 13:43:53 UTC
*** Bug 119332 has been marked as a duplicate of this bug. ***
Comment 44 Jakub Moc (RETIRED) gentoo-dev 2006-01-17 15:39:01 UTC
(In reply to comment #42)
> It appears that patch doesn't work

See Comment #35 
Comment 45 Jakub Moc (RETIRED) gentoo-dev 2006-01-19 15:14:34 UTC
*** Bug 119610 has been marked as a duplicate of this bug. ***
Comment 46 Jakub Moc (RETIRED) gentoo-dev 2006-03-06 23:52:35 UTC
*** Bug 125313 has been marked as a duplicate of this bug. ***
Comment 47 Jakub Moc (RETIRED) gentoo-dev 2006-05-29 02:46:18 UTC
*** Bug 134739 has been marked as a duplicate of this bug. ***
Comment 48 Jakub Moc (RETIRED) gentoo-dev 2006-06-12 08:14:00 UTC
*** Bug 136545 has been marked as a duplicate of this bug. ***
Comment 49 Alexander Huynh 2008-12-17 05:06:52 UTC
It's back again in 5.8.8.

./miniperl minimod.pl > lib/ExtUtils/Miniperl.pm
cd lib/unicore &&  ../../miniperl -I../../lib mktables -w
touch uni.data
`sh  cflags "optimize='-march=athlon-xp -msse3 -O2 -pipe -fomit-frame-pointer -fstack-protector-all'" perlmain.o` -fPIC perlmain.c
          CCCMD =  i686-pc-linux-gnu-gcc -DPERL_CORE -c -fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -march=athlon-xp -msse3 -O2 -pipe -fomit-frame-pointer -fstack-protector-all  -Wall

        Making DynaLoader (static_pic)
Processing hints file hints/linux.pl
Writing Makefile for DynaLoader
make[1]: Entering directory `/var/tmp/portage/dev-lang/perl-5.8.8-r5/work/perl-5.8.8/ext/DynaLoader'
make[1]: Leaving directory `/var/tmp/portage/dev-lang/perl-5.8.8-r5/work/perl-5.8.8/ext/DynaLoader'
make[1]: Entering directory `/var/tmp/portage/dev-lang/perl-5.8.8-r5/work/perl-5.8.8/ext/DynaLoader'
../../miniperl "-I../../lib" "-I../../lib" DynaLoader_pm.PL DynaLoader.pm
../../miniperl "-I../../lib" "-I../../lib" XSLoader_pm.PL XSLoader.pm
cp XSLoader.pm ../../lib/XSLoader.pm
cp DynaLoader.pm ../../lib/DynaLoader.pm
AutoSplitting ../../lib/DynaLoader.pm (../../lib/auto/DynaLoader)
rm -f DynaLoader.xs
cp dl_dlopen.xs DynaLoader.xs
../../miniperl "-I../../lib" "-I../../lib" ../../lib/ExtUtils/xsubpp -noprototypes -typemap ../../lib/ExtUtils/typemap DynaLoader.xs > DynaLoader.xsc && mv DynaLoader.xsc DynaLoader.c
/bin/sh: line 1: 13613 Segmentation fault      ../../miniperl "-I../../lib" "-I../../lib" ../../lib/ExtUtils/xsubpp -noprototypes -typemap ../../lib/ExtUtils/typemap DynaLoader.xs > DynaLoader.xsc
make[1]: *** [DynaLoader.o] Error 139
make[1]: Leaving directory `/var/tmp/portage/dev-lang/perl-5.8.8-r5/work/perl-5.8.8/ext/DynaLoader'
make: *** [lib/auto/DynaLoader/DynaLoader.a] Error 2

Portage 2.1.4.5 (hardened/x86/2.6, gcc-3.4.6, glibc-2.6.1-r0, 2.6.25-hardened-r11-juicer i686)
=================================================================
System uname: 2.6.25-hardened-r11-juicer i686 AMD Sempron(tm) Processor 3000+
Timestamp of tree: Tue, 16 Dec 2008 04:22:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-lang/python:     2.4.3-r4, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.9
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r2
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -msse3 -O2 -pipe -fomit-frame-pointer -fstack-protector-all"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=athlon-xp -msse3 -O2 -pipe -fomit-frame-pointer -fstack-protector-all"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs candy ccache distcc distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirrors.tera-byte.com/ http://gentoo.osuosl.org/ http://www.gtlib.gatech.edu/pub/gentoo http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X acpi adns apache2 apm archive ares bash-completion berkdb bidi branding bzip2 cairo calendar cjk clamav clamd corefonts cracklib crypt csv curl curlwrappers dbase dbus device-mapper dga dhcpcd directfb disk-partition diskio djvu dmi dmx ecc exif expat fastbuild fat firefox firefox3 ftp fuse gcrypt gd geoip gif gpg gpm gtk hal hardened hash hfs hpn imagemagick imap ipv6 javascript jbig jpeg jpeg2k justify libcaca lm_sensors lock logrotate lzma lzo midi mime mozilla moznoirc mysql mysqli ncurses nls nptl nptlonly nsplugin ntfs nxclient offensive ophsmall oracle pam pcre pdf perl php pic png posix postgres postscript python qt3 qt3support qt4 rar readline rrdtool rss session smi sockets socks5 sqlite sqlite3 sse sse2 sse3 ssh ssl svg svga symlink syslog tcl tcpd tiff tokenizer unicode urandom vim vim-syntax vim-with-x wmf x86 xfce xorg xscreensaver zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack" ELIBC="glibc" INPUT_DEVICES="mouse keyboard evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt intel mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 50 Howard B. Golden 2008-12-17 05:58:26 UTC
(In reply to comment #49)
> It's back again in 5.8.8.

Pleas see comment #35. Is this what's happening in your situation? Perhaps you should try removing -fstack-protector-all from your CFLAGS.
Comment 51 Kevin van Haaren 2009-02-13 03:50:33 UTC
This is occuring in 5.8.8-r5

removing -fstack-protector-all from CFLAGS does fix it.

cflags.SH contains what appears to be the patch posted above, but does not match excatly. Changing cflags.SH to match patch did not fix problem for me.

Not sure if this should be reopened or if removing -fstack-protector-all is the final fix.
Comment 52 solar (RETIRED) gentoo-dev 2009-02-13 04:39:46 UTC
(In reply to comment #51)
> This is occuring in 5.8.8-r5
> 
> removing -fstack-protector-all from CFLAGS does fix it.


The patch was not about -fstack-protector directly in the CFLAGS of a make.conf 
It was intended for hardened users. gcc:4 would probably need to take a whole new approach.

This bug should be marked as closed