Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 237508 - dev-scheme/plt-scheme-4.1 - make[4]: *** [xsrc/salloc.c] Segmentation fault
Summary: dev-scheme/plt-scheme-4.1 - make[4]: *** [xsrc/salloc.c] Segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Scheme Project
URL:
Whiteboard:
Keywords:
: 256044 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-12 17:52 UTC by Tiago
Modified: 2009-08-01 08:41 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 Tiago 2008-09-12 17:52:34 UTC
Hi,

Emerging dev-scheme/drscheme-4.1 fails with the following:


env XFORM_USE_PRECOMP=xsrc/precomp.h ../mzschemecgc -cqu ./xform.ss --setup . --cpp "i686-pc-linux-gnu-gcc -E -DNEWGC_BTC_ACCOUNT  -DMZ_USES_SHARED_LIB -I./.. -I./../include" -o xsrc/salloc.c ./../src/salloc.c
env XFORM_USE_PRECOMP=xsrc/precomp.h ../mzschemecgc -cqu ./xform.ss --setup . --cpp "i686-pc-linux-gnu-gcc -E -DNEWGC_BTC_ACCOUNT  -DMZ_USES_SHARED_LIB -I./.. -I./../include" -o xsrc/bignum.c ./../src/bignum.c
make[4]: *** [xsrc/salloc.c] Segmentation fault
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory `/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src/mzscheme/gc2'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src/mzscheme/gc2'
make[2]: *** [3m] Error 2
make[2]: Leaving directory `/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src/mzscheme'
make[1]: *** [3m] Error 2
make[1]: Leaving directory `/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src'
make: *** [all] Error 2


emerge --info follows:

root@trillian:~# emerge --info
Portage 2.1.4.4 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r8 i686)
=================================================================
System uname: 2.6.24-gentoo-r8 i686 Intel(R) Pentium(R) 4 CPU 2.66GHz
Timestamp of tree: Fri, 12 Sep 2008 14:04:02 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13, 2.5.2-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
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=pentium4 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /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/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=pentium4 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages metadata-transfer notitles parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LC_ALL="en_US.UTF-8"
LINGUAS="en"
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="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa apache2 apm arts asf audiofile avahi bash-completion berkdb bluetooth bootsplash bzip2 cairo caps cdda cddb cdparanoia cjk cli cracklib crypt cscope css ctype cups curl cvs dbus directfb djvu dri dts dv dvd dvdnav dvdread dvi emacs encode esd exif fam fame fat fbcon ffmpeg flac fortran ftp fuse gcj gd gdbm gif gimpprint glitz glut gnuplot gphoto2 gpm graphviz gstreamer gtk gtkhtml hal haskell howl iconv id3tag idn ieee1394 imagemagick imap imlib ipv6 jack java javascript jpeg jpeg2k justify kde kdeenablefinal kdexdeltas kerberos krb4 ladspa latex lcms ldap libcaca libsamplerate lm_sensors mad mbox mdnsresponder-compat midi mime mjpeg mmx mmxext mng mono mozilla moznocompose moznoirc moznomail mozsvg mp3 mpeg mplayer msn mudflap mule mysql ncurses network nls nptl nsplugin ntfs objc objc++ objc-gc offensive ogg opengl openmp pcre pdf perl php plotutils png pop3d posix ppds python qt3 qt4 quicktime rdesktop readline real reflection reiserfs rtsp ruby samba sasl scanner sdl session slang sndfile snmp sockets softmmu sox speech speex spell spl sse sse2 ssl stream subtitles subversion svg svga svnserve symlink syslog sysvipc tcl tcltk tcpd tetex theora threads tiff timidity tk tokenizer toolbar transcode truetype twolame type1 unicode usb utempter v4l v4l2 vamp vcd vorbis wavpack wifi win32codecs wma wmf x264 x86 xattr xcomposite xine xml xorg xpm xv xvid zeroconf zlib" ALSA_CARDS="intel8x0" 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 dav_svn 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 vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="radeon vesa fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Reproducible: Always
Comment 1 Dmitry Dzhus 2008-09-13 18:51:51 UTC
I can confirm that `-O3` option is what causes an error; the emerge finishes fine with `-O2`. Probably a GCC issue.
Comment 2 Tiago 2008-09-14 00:55:03 UTC
(In reply to comment #1)
> I can confirm that `-O3` option is what causes an error; the emerge finishes
> fine with `-O2`. Probably a GCC issue.

Yup, with -O2 it works. Should this bug be closed or marked as a GCC one? (There seem to be lots of -Ox related GCC bugs reported on bugzilla.)
Comment 3 Sven E. 2008-09-28 14:55:41 UTC
make[4]: Entering directory `/var/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src/mzscheme/gc2'
env XFORM_PRECOMP=yes ../mzschemecgc -cqu ./xform.ss --setup . --cpp "i686-pc-linux-gnu-gcc -E -DNEWGC_BTC_ACCOUNT  -DMZ_USES_SHARED_LIB -I./.. -I./../include" -o xsrc/precomp.h ./precomp.c
make[4]: *** [xsrc/precomp.h] Segmentation fault
make[4]: Leaving directory `/var/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src/mzscheme/gc2'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/var/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src/mzscheme/gc2'
make[2]: *** [3m] Error 2
make[2]: Leaving directory `/var/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src/mzscheme'
make[1]: *** [3m] Error 2
make[1]: Leaving directory `/var/tmp/portage/dev-scheme/drscheme-4.1/work/plt-4.1/src'
make: *** [all] Error 2


Pretty much the same here.  Not necesarily a gcc bug though. The crash happens in scheme_apply which does a lot of error-prone stuff. This could easily be a buffer-overflow that only shows with optimization enabled.
Comment 4 Marijn Schouten (RETIRED) gentoo-dev 2009-01-24 16:19:15 UTC
*** Bug 256044 has been marked as a duplicate of this bug. ***
Comment 5 Dror Levin (RETIRED) gentoo-dev 2009-01-25 08:06:28 UTC
There's no package named dev-scheme/drscheme, which is why I couldn't find this bug (was it renamed?). Please change the summary :)

BTW, the segfault still occurs with the latest version - 4.1.4.
Comment 6 Marijn Schouten (RETIRED) gentoo-dev 2009-01-26 11:18:01 UTC
yes, it was renamed. The segfault is different, but I'm guessing it's again because of -O3. I'll talk to upstream about it and am open to suggestions.
Comment 7 Ivan Lakhturov 2009-02-14 12:10:20 UTC
(In reply to comment #1)
> I can confirm that `-O3` option is what causes an error; the emerge finishes
> fine with `-O2`. Probably a GCC issue.
> 

I confirm this bug and behavior for -march=amdfam10
Comment 8 Dror Levin (RETIRED) gentoo-dev 2009-03-22 21:55:02 UTC
Still happens in 4.1.5 (fail with -O3, win with -O2).
Comment 9 Marijn Schouten (RETIRED) gentoo-dev 2009-06-04 15:37:26 UTC
I spoke to upstream and I think they fixed this in 4.2.
Can someone confirm that please?
Comment 10 Ivan Lakhturov 2009-07-31 18:50:28 UTC
(In reply to comment #9)
> I spoke to upstream and I think they fixed this in 4.2.
> Can someone confirm that please?

Fixed in 4.2, I confirm.
Comment 11 Marijn Schouten (RETIRED) gentoo-dev 2009-08-01 08:41:50 UTC
Thanks.