Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 203491 - games-puzzle/enigma segfaults with open(NULL, O_RDONLY)
Summary: games-puzzle/enigma segfaults with open(NULL, O_RDONLY)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-27 17:52 UTC by Joseph Booker
Modified: 2009-01-14 02:02 UTC (History)
1 user (show)

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


Attachments
strace for enigma-1.01 (enigma-1.01-strace,25.11 KB, text/plain)
2007-12-27 17:53 UTC, Joseph Booker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Booker 2007-12-27 17:52:02 UTC
Originally compiled as:
   USE="nls"
   CFLAGS="-O2 -pipe -fomit-frame-pointer -march=athlon64"

When running (either as 'enigma' alone, or with --nosound, --nomusic, -w, or --nograb), the following is displayed:

"joe@fenrir ~ $ enigma

Fatal Error
  Message: Segmentation fault"

Happens with both games-puzzle/enigma-1.01 and games-puzzle/enigma-1.00-r2

When compiling again with CFLAGS="" and CXXFLAGS="", it still segfaults and the strace is identical except for the memory addresses

When compiling with FEATURES="nostrip keepwork" CFLAGS="-g -ggdb" CXXFLAGS="-g -ggdb" emerge -va enigma, running under gdb and using 'bt' gets:
#0  0x0000000000497f5e in PreferenceManager (this=0xac1880) at PreferenceManager.cc:108
#1  0x0000000000499700 in enigma::PreferenceManager::instance () at PreferenceManager.cc:55
#2  0x000000000047c84a in enigma::Application::init (this=0x8e4180, argc=1, argv=0x7fff647944b8) at main.cc:280
#3  0x000000000047d640 in main (argc=1, argv=0x7fff647944b8) at main.cc:800

PreferenceManager.cc:108 is 'propertiesElem = dynamic_cast<DOMElement *>(doc->getElementsByTagName( Utf8ToXML("properties").x_str())->item(0));', I don't know enough of this code to fix it

Reproducible: Always

Steps to Reproduce:
1. emerge games-puzzle/enigma
2. run enigma in a terminal

Actual Results:  
Fatal Error
  Message: Segmentation fault

Expected Results:  
Hours of fun

Portage 2.1.4_rc11 (default-linux/amd64/2007.0/desktop, gcc-4.2.2, glibc-2.7-r1, 2.6.24-rc6-mm1 x86_64)
=================================================================
System uname: 2.6.24-rc6-mm1 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor TK-53
Timestamp of tree: Wed, 26 Dec 2007 15:46:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.3
dev-lang/python:     2.4.3-r4, 2.5.1-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=athlon64"
CHOST="x86_64-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"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer -march=athlon64"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/ "
LINGUAS="en en_US"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/custom-kernels"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X Xaw3d aalib acl acpi addbookmarks agg aio alias alsa amd64 autoreplace avahi background bash-completion bitmap-fonts branding bzip2 cairo cdaudio cddb cdio cdr cli connectionstatus contactnotes cracklib crypt curl daap dbus dillo directfb dri dvd dvdr dvdread emacs emboss encode escreen evo exif extra-cardsets fam fasttrack fbcon ffmpeg firefox ftp gdbm gif ginac gnutella gpm graphviz gstreamer gtk gzip-el hal hdf5 highlight history hpn iconv imagemagick imap ipod ipv6 irc isdnlog java javascript jingle john jpeg kde kdeenablefinal kqemu latex mad midi mikmod mmx mmxext mono mozsha1 mp3 mp4 mpeg mplayer mtp mudflap musepack music musicbrainz nas ncurses netmeeting network network-cron nforce2 nls nowlistening npp nptl nptlonly nsplugin nvidia offensive ogg openft opengl openmp openstreetmap pam pcre pdf perl plotutils pmu png pppd python qt3 qt3support qt4 quicktime rar readline reflection rtc sdl session sms solver sound spell spl srt sse sse2 ssl startup-notification statistics stream svg sysfs tcpd tetex texteffect themes theora tiff toolbar translater truetype truetype-fonts type1-fonts unicode vim-pager vim-syntax vim-with-x vorbis wavpack webpresence wifi winpopup wmf xface xgetdefault xine xml xorg xv xvid xvmc yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif 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 en_US" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Joseph Booker 2007-12-27 17:53:08 UTC
Created attachment 139439 [details]
strace for enigma-1.01
Comment 2 Tristan Heaven (RETIRED) gentoo-dev 2008-01-04 05:27:21 UTC
Does it work with dev-libs/xerces-c-2.7.0-r1 ?
Comment 3 Tristan Heaven (RETIRED) gentoo-dev 2008-01-10 20:33:59 UTC
Pretty sure this is a bug in xerces-c 2.8.0, although I haven't been able to reproduce it yet. I should have more time next week.

cpp people: can you confirm this?
Comment 4 Joseph Booker 2008-01-10 23:49:53 UTC
sorry for the long response, downgrading to dev-libs/xerces-c-2.7.0-r1 and recompiling enigma did work
Comment 5 Tiziano Müller (RETIRED) gentoo-dev 2008-01-11 10:02:40 UTC
It's possible, but can't confirm. Please try xerces-c-2.8 compiled without iconv or with icu useflag.
Comment 6 Joseph Booker 2008-01-11 22:24:13 UTC
Thats it, with USE="icu -debug -doc -iconv -libwww -+threads" for dev-libs/xerces-c-2.8.0, enigma works
Comment 7 Mr. Bones. (RETIRED) gentoo-dev 2009-01-13 01:38:10 UTC
Try the latest version of the ebuild in portage please.  It now requires dev-libs/xerces-c-3 but I want to make sure there isn't an additional dep for the use flags.
Comment 8 Joseph Booker 2009-01-14 02:02:15 UTC
Well, using USE="curl iconv icu libwww -debug -doc -threads -elibc_Darwin -elibc_FreeBSD" (i.e., nothing in my package.uses) for dev-libs/xerces-c-3.0.0-r1 and recompiling enigma keeps it working