Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 125861 - zsnes 1.42 crashes with glibc 2.4
Summary: zsnes 1.42 crashes with glibc 2.4
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
: 142233 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-11 12:40 UTC by Christian Lemke
Modified: 2007-02-04 15:39 UTC (History)
10 users (show)

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


Attachments
zsnes-memfix.patch (zsnes-memfix.patch,565 bytes, patch)
2006-03-15 23:31 UTC, Leonardo Boshell (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Lemke 2006-03-11 12:40:32 UTC
With glibc 2.3.6-r3 everything was fine.

ZSNES output:
*** glibc detected *** zsnes: munmap_chunk(): invalid pointer: 0xbff9dd7d ***
======= Backtrace: =========
/lib/libc.so.6[0x41cd34cf]
/lib/libc.so.6[0x41cd3876]
zsnes[0x80db617]
/lib/libc.so.6(__libc_start_main+0xe2)[0x41c85872]
zsnes(__gxx_personality_v0+0xd1)[0x804be91]
======= Memory map: ========
08048000-082f2000 r-xp 00000000 03:04 1043066    /usr/games/bin/zsnes
082f2000-08346000 rwxp 002a9000 03:04 1043066    /usr/games/bin/zsnes
08346000-085d2000 rwxp 08346000 00:00 0          [heap]
41c52000-41c6c000 r-xp 00000000 03:04 260988     /lib/ld-2.4.so
41c6c000-41c6d000 r-xp 00019000 03:04 260988     /lib/ld-2.4.so
41c6d000-41c6e000 rwxp 0001a000 03:04 260988     /lib/ld-2.4.so
41c70000-41d88000 r-xp 00000000 03:04 261785     /lib/libc-2.4.so
41d88000-41d8a000 r-xp 00117000 03:04 261785     /lib/libc-2.4.so
41d8a000-41d8c000 rwxp 00119000 03:04 261785     /lib/libc-2.4.so
41d8c000-41d8f000 rwxp 41d8c000 00:00 0
41d91000-41db4000 r-xp 00000000 03:04 262895     /lib/libm-2.4.so
41db4000-41db6000 rwxp 00022000 03:04 262895     /lib/libm-2.4.so
41db8000-41dba000 r-xp 00000000 03:04 262958     /lib/libdl-2.4.so
41dba000-41dbc000 rwxp 00001000 03:04 262958     /lib/libdl-2.4.so
41dbe000-41e89000 r-xp 00000000 03:04 783716     /usr/lib/libX11.so.6.2
41e89000-41e8d000 rwxp 000cb000 03:04 783716     /usr/lib/libX11.so.6.2
41e8f000-41e9d000 r-xp 00000000 03:04 783722     /usr/lib/libXext.so.6.4
41e9d000-41e9e000 rwxp 0000d000 03:04 783722     /usr/lib/libXext.so.6.4
41ea0000-41eb1000 r-xp 00000000 03:04 262894     /lib/libz.so.1.2.3
41eb1000-41eb2000 rwxp 00010000 03:04 262894     /lib/libz.so.1.2.3
41eb4000-41ec3000 r-xp 00000000 03:04 261807     /lib/libpthread-2.4.so
41ec3000-41ec4000 r-xp 0000f000 03:04 261807     /lib/libpthread-2.4.so
41ec4000-41ec5000 rwxp 00010000 03:04 261807     /lib/libpthread-2.4.so
41ec5000-41ec7000 rwxp 41ec5000 00:00 0
41eee000-41fb6000 r-xp 00000000 03:04 1108898    /usr/lib/gcc-lib/i686-pc-linux-gnu/3.4.5/libstdc++.so.6.0.3
41fb6000-41fbb000 rwxp 000c8000 03:04 1108898    /usr/lib/gcc-lib/i686-pc-linux-gnu/3.4.5/libstdc++.so.6.0.3
41fbb000-41fc1000 rwxp 41fbb000 00:00 0
41fc3000-41fcb000 r-xp 00000000 03:04 1108311    /usr/lib/gcc-lib/i686-pc-linux-gnu/3.4.5/libgcc_s.so.1
41fcb000-41fcc000 rwxp 00007000 03:04 1108311    /usr/lib/gcc-lib/i686-pc-linux-gnu/3.4.5/libgcc_s.so.1
420d8000-420fd000 r-xp 00000000 03:04 783624     /usr/lib/libpng.so.3.1.2.8
420fd000-420fe000 rwxp 00024000 03:04 783624     /usr/lib/libpng.so.3.1.2.8
42a8a000-42aec000 r-xp 00000000 03:04 783233     /usr/lib/libvga.so.1.9.24
42aec000-42af2000 rwxp 00062000 03:04 783233     /usr/lib/libvga.so.1.9.24
42af2000-42b0a000 rwxp 42af2000 00:00 0
42b51000-42bae000 r-xp 00000000 03:04 782933     /usr/lib/libSDL-1.2.so.0.7.2
42bae000-42bb0000 rwxp 0005c000 03:04 782933     /usr/lib/libSDL-1.2.so.0.7.2
42bb0000-42bf9000 rwxp 42bb0000 00:00 0
43415000-43479000 r-xp 00000000 03:04 1628931    /usr/lib/opengl/nvidia/lib/libGL.so.1.0.6629
43479000-43489000 rwxp 00063000 03:04 1628931    /usr/lib/opengl/nvidia/lib/libGL.so.1.0.6629
43489000-4348a000 rwxp 43489000 00:00 0
48286000-48287000 r-xp 00000000 03:04 1630578    /usr/lib/opengl/nvidia/tls/libnvidia-tls.so.1.0.6629
48287000-48288000 rwxp 00000000 03:04 1630578    /usr/lib/opengl/nvidia/tls/libnvidia-tls.so.1.0.6629
48855000-48f66000 r-xp 00000000 03:04 1630481    /usr/lib/opengl/nvidia/lib/libGLcore.so.1.0.6629
48f66000-48f82000 rwxp 00710000 03:04 1630481    /usr/lib/opengl/nvidia/lib/libGLcore.so.1.0.6629
48f82000-48f96000 rwxp 48f82000 00:00 0
b7ed6000-b7f83000 rwxp b7ed6000 00:00 0
b7f9d000-b7f9e000 rwxp b7f9d000 00:00 0
b7f9e000-b7f9f000 rwxp 00000000 00:0c 1123       /dev/zero
bff89000-bff9f000 rwxp bff89000 00:00 0          [stack]
ffffe000-fffff000 ---p 00000000 00:00 0          [vdso]
Terminated.


emerge --info:
Portage 2.1_pre5-r4 (default-linux/x86/2005.0, gcc-3.4.5, glibc-2.4-r0, 2.6.15-gentoo-r7 i686)
=================================================================
System uname: 2.6.15-gentoo-r7 i686 Celeron (Coppermine)
Gentoo Base System version 1.12.0_pre16
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.4.2-r1
sys-apps/sandbox:    1.2.17
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-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/X11/xkb /usr/share/config /usr/share/hal/fdi /var/qmail/control /var/www/localhost/htdocs"
CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe"
DISTDIR="/mnt/E/distfiles"
FEATURES="autoconfig confcache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://einstein.fem.tu-ilmenau.de http://ftp.tu-ilmenau.de/Mirrors/gentoo http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo"
LANG="de_DE@euro"
LC_ALL="de_DE@euro"
LDFLAGS="-Wl,-O1"
LINGUAS="de en"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X aac alsa apm arts avi bash-completion berkdb bitmap-fonts bzip2 cdparanoia cdr crypt cups dbus doc dri dvd dvdr dvdread emboss encode exif fbcon ffmpeg foomaticdb gdbm gif glut gmp gphoto2 gpm gtk gtk2 hal idn imagemagick imlib ipv6 java jikes jpeg jpeg2k kde kdexdeltas libg++ libwww lm_sensors mad matroska mmx mng mp3 mpeg mysql ncurses nls nptl ogg oggvorbis opengl pam pdflib perl pic png ppds python qt readline samba sasl scanner sdl session slang source spell sqlite sqlite3 sse ssl svga tcpd theora tiff truetype truetype-fonts type1-fonts usb vcd vorbis win32codecs xine xml xml2 xprint xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_de linguas_en userland_GNU video_cards_nvidia video_cards_nv"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, MAKEOPTS
Comment 1 Erik Andrén 2006-03-12 07:38:10 UTC
I can confirm this bug. 

emerge --info
Portage 2.1_pre5-r4 (default-linux/x86/2005.1, gcc-3.4.5, glibc-2.4-r0, 2.6.15.4 i686)
=================================================================
System uname: 2.6.15.4 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 2.00GHz
Gentoo Base System version 1.12.0_pre16
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.12
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-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 -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /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/"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="sv"
MAKEOPTS="-j2"
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 X aac acpi akode alsa apm arts artswrappersuid asf avi bash-completion berkdb bitmap-fonts bluetooth bzip2 cairo crypt cups dbus dri dvd dvdread eds emboss encode exscalibar foomaticdb fortran gdbm gif glitz gmb gnome gpm gst gstreamer gstreamer10 gtk gtk2 hal imlib ipod ipv6 java jpeg kde ldap libcaca libg++ libwww mad mikmod mmap mmx mmxext motif mp3 mpeg ncurses nls nptl nptlonly nsplugin ogg oggvorbis opengl oss pam pdf pdflib perl png python qt quicktime readline real samba sdl sharedmem spell sse sse2 ssl svg tcpd truetype truetype-fonts type1-fonts udev unicode usb v4l v4l2 video_cards_radeon vorbis wifi win32codecs xanim xcomposite xine xml2 xmms xv xvid zeroconf zlib elibc_glibc input_devices_mouse input_devices_evdev input_devices_keyboard input_devices_synaptics kernel_linux linguas_sv userland_GNU video_cards_ati"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, LDFLAGS
Comment 2 Nicholas Doyle 2006-03-13 18:13:52 UTC
Me too!

Portage 2.1_pre6-r2 (default-linux/amd64/2006.0, gcc-3.4.5, glibc-2.4-r0, 2.6.15-gentoo-r5-niskel x86_64)
=================================================================
System uname: 2.6.15-gentoo-r5-niskel x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.12.0_pre16
dev-lang/python:     2.3.5-r2, 2.4.2-r1
sys-apps/sandbox:    1.2.17
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-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer -fno-ident"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer -fno-ident -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac alsa asf avi berkdb bitmap-fonts bzip2 cairo crypt cups dri dvd dvdr eds emboss encode flac foomaticdb fortran gif glut gpm gtk2 hal imlib ipv6 java jpeg kde lzw lzw-tiff mad mikmod mng mp3 mpeg musicbrainz ncurses nls nptl nptlonly nvidia ogg opengl pam pdflib perl png ppds python qt quicktime readline samba sdl speex spell ssl subversion svg tcpd theora tiff truetype truetype-fonts type1-fonts udev unicode usb v4l v4l2 vorbis wifi xcomposite xpm xv xvid zlib elibc_glibc kernel_linux linguas_en userland_GNU video_cards_nvidia"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG
Comment 3 Leonardo Boshell (RETIRED) gentoo-dev 2006-03-15 23:31:13 UTC
Created attachment 82265 [details, diff]
zsnes-memfix.patch

Hi guys,

I also came across this problem after upgrading to glibc-2.4. At first I thought it had to do with the changes regarding threads in the new glibc, but after running zsnes through gdb I noticed that this was actually a trivial memory corruption bug in zsnes that apparently the old glibc wasn't detecting.

Anyway, this is the patch I created to solve it; it works for me, but please test and perhaps report upstream.

Thanks.
Comment 4 Erik Andrén 2006-03-15 23:53:56 UTC
Your patch resolved the issue for me. Thanks a bunch, 
You should notify the zsnes devs of this issue. 
Comment 5 Steven Ketelsen 2006-03-16 20:30:41 UTC
(In reply to comment #4)
> Your patch resolved the issue for me. Thanks a bunch, 
> You should notify the zsnes devs of this issue. 
> 

Not comfortable with re-digesting my own ebuilds (yet) and using diff to patch.  could someone handhold me at podfish at gmail dot com?

Thanks!
Comment 6 Steven Ketelsen 2006-03-19 17:15:06 UTC
According to the zsnes devs, this patch is irrelevant--it's been fine in CVS for months, and I should use that instead.  Maybe they should release, then?
Comment 7 Mr. Bones. (RETIRED) gentoo-dev 2006-03-19 20:19:00 UTC
yes, I would love to see them do a real release.
Comment 8 Steven Ketelsen 2006-03-31 08:42:29 UTC
....so, is this patch going into portage?  does it negatively affect machines with <glibc-2.4?
Comment 9 Roc Vallès 2006-05-17 10:59:53 UTC
I'm suffering this problem. I don't understand what's stopping its fixing:
- There's a patch.
- There are newer versions (see 131198) with their own ebuilds.
Comment 10 Chris Gianelloni (RETIRED) gentoo-dev 2006-05-17 14:34:59 UTC
http://www.gentoo.org/proj/en/desktop/games/#doc_chap5_sect10

Time is what is stopping it.  There's only so many of us that can do the necessary testing and then commit the patch.  I'm sorry, but have some patience.  We all have lives and families just like the rest of you, and none of us are paid to do this.
Comment 11 Ben Ford 2006-06-15 21:29:29 UTC
works for me.  This patch has now been sent upstream.
Comment 12 Benjamin Hodgetts 2006-07-06 14:20:04 UTC
Just out of interest, how long is this likely to take? (to become part of portage I mean).
Comment 13 Mr. Bones. (RETIRED) gentoo-dev 2006-07-06 21:17:53 UTC
http://www.gentoo.org/proj/en/desktop/games/#doc_chap5_sect10
Comment 14 SpanKY gentoo-dev 2006-07-30 22:01:13 UTC
*** Bug 142233 has been marked as a duplicate of this bug. ***
Comment 15 Benjamin Hodgetts 2006-07-31 07:45:26 UTC
Is this bug related to the "Illegal Instruction" bug? (run zsnes, says Illegal Instruction in the terminal then exits) or is that a seperate issue?
Comment 16 Mr. Bones. (RETIRED) gentoo-dev 2006-08-15 10:41:15 UTC
in portage.  thanks for the bug report and patch.
Comment 17 Steven Ketelsen 2006-08-20 23:41:22 UTC
right on!  Thank you for taking the time, Mr. Bones.  and thanks for the patch, Leonardo!
Comment 18 Thomas R. (TRauMa) 2007-02-04 15:39:32 UTC
Uhm, not to nitpick, but shouldn't you either bump 1.42 to -r1 or make the next ver stable? RESOLVED FIXED is a funny state for a bug where people who already have zsnes installed have to re-emerge manually (after they hunted bugzilla for this, that is).