netpbm-10.30-r1 still segfaults here. I just re-emerged it, because bug #114812 says this segfault is fixed, and I suspected that prelink messed this up. Reproducible: Always Steps to Reproduce: Call pnmtopng without args or with any args (only --help does not segfault here). E.g. I tried "pnmtopng -transparent '#ffffff' action-background.ppm". Actual Results: # pnmtopng zsh: segmentation fault (core dumped) pnmtopng # gdb =pnmtopng core GNU gdb 6.4 Copyright 2005 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu"...(no debugging symbols found) Using host libthread_db library "/lib/tls/libthread_db.so.1". (no debugging symbols found) Core was generated by `pnmtopng'. Program terminated with signal 11, Segmentation fault. warning: Can't read pathname for load map: Eingabe-/Ausgabefehler. Reading symbols from /usr/lib/libnetpbm.so.10...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libnetpbm.so.10 Reading symbols from /usr/lib/libpng.so.3...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libpng.so.3 Reading symbols from /usr/lib/libz.so.1...(no debugging symbols found)...done. Loaded symbols for /usr/lib/libz.so.1 Reading symbols from /lib/tls/libm.so.6... (no debugging symbols found)...done. Loaded symbols for /lib/tls/libm.so.6 Reading symbols from /lib/tls/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/tls/libc.so.6 Reading symbols from /lib/ld-linux.so.2...done. Loaded symbols for /lib/ld-linux.so.2 #0 0x44077067 in rawmemchr () from /lib/tls/libc.so.6 (gdb) bt #0 0x44077067 in rawmemchr () from /lib/tls/libc.so.6 #1 0x4406e0a1 in _IO_list_resetlock () from /lib/tls/libc.so.6 #2 0x44063787 in vsscanf () from /lib/tls/libc.so.6 #3 0x4405ef9d in sscanf () from /lib/tls/libc.so.6 #4 0x08049656 in ?? () #5 0x00000001 in ?? () #6 0x0804e329 in _IO_stdin_used () #7 0xbfe60f28 in ?? () #8 0xbfe60f2c in ?? () #9 0xbfe60f3c in ?? () #10 0xbfe60f38 in ?? () #11 0xbfe60f34 in ?? () #12 0xbfe60f30 in ?? () #13 0x08051008 in ?? () #14 0x00000001 in ?? () #15 0x00000001 in ?? () #16 0x00000000 in ?? () (gdb) q Portage 2.0.51.22-r3 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r2, 2.6.13-suspend2-r4 i686) ================================================================= System uname: 2.6.13-suspend2-r4 i686 AMD Athlon(tm) Processor Gentoo Base System version 1.6.13 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] 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.15.92.0.2-r10, 2.16.1 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="no" CBUILD="i686-pc-linux-gnu" CFLAGS="-mcpu=athlon -O2 -pipe -g" 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 /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="-mcpu=athlon -O2 -pipe -g" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks fixpackages sandbox sfperms strict" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo/ http://www.ibiblio.org/pub/Linux/distributions/gentoo" LANG="de_DE@euro" LINGUAS="en_GB de fa" MAKEOPTS="" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/overlays/g-cpan /usr/local/overlays/gentoo-de /usr/local/portage" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="x86 3dnow X a52 aac aalib ac3 acl alsa apache2 apm arts audiofile avi bash-completion berkdb bitmap-fonts bluetooth bmp bonobo bzip2 cdb cdr crypt cups curl dbus dga doc dts dvb dvd dvdread edl eds emboss encode esd exif exiscan-acl expat fam fame ffmpeg flac foomaticdb freetype gcj gd gdbm ggi gif gimpprint glut gmp gnokii gnome gphoto2 gstreamer gtk gtk2 gtkhtml guile hal idn imagemagick imap imlib innodb ipv6 irmc jack java joystick jpeg junit kde kdepim kdexdeltas lcms ldap libg++ libwww lirc live lzo mad mailwrapper matroska matrox mbox mcal memlimit mhash mikmod mjpeg mmx mng mono mozdevelop mozilla mozsvg mp3 mpeg mplayer mpm-prefork mule mysql nas ncurses network nls nptl nsplugin nvram objc oci8 odbc ogg oggvorbis opengl oracle oss pam pcre pda pdflib perl php pic plotutils png postgres python qt quicktime rdesktop readline real recode rtc ruby samba scanner sdl slang speex spell sqlite ssl subtitles svg tcltk tcpd tetex theora tiff truetype truetype-fonts type1-fonts udev usb v4l v4l2 vcd vorbis wifi wmf xemacs xine xinetd xml xml2 xmms xosd xprint xv xvid zlib video_cards_matrox linguas_en_GB linguas_de linguas_fa userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LC_ALL, LDFLAGS
netpbm-10.31 pnmtopng also segfaults. This patch fix a problem: --- netpbm-10.31/converter/other/pnmtopng-orig.c 2005-12-29 16:35:13.000000000 +0000 +++ netpbm-10.31/converter/other/pnmtopng.c 2005-12-29 16:34:05.000000000 +0000 @@ -417,9 +417,9 @@ if (cmdlineP->rgbSpec) parseRgbOpt(rgb, &cmdlineP->rgb); - if (cmdlineP->modtimeSpec) + if (cmdlineP->modtimeSpec && modtime != NULL) parseModtimeOpt(modtime, &cmdlineP->modtime); if (cmdlineP->zlibCompression.levelSpec && cmdlineP->zlibCompression.level > 9)
Created attachment 75718 [details, diff] Fix for a problem. This patch fix a problem for netpmb-10.31. I think for 10.30 it should work also.
Comment on attachment 75718 [details, diff] Fix for a problem. different issue, file a new bug report
post the actual files that are causing pnmtopng to segfault and the commands you used to make it segfault
# pnmtopng /usr/share/netpbm/pcxstd.ppm Segmentation fault
Created attachment 76436 [details] pnm file that causes pnmtopng to segfault
works fine for me on x86 and amd64 ... your current gdb bt is useless though, so we'll need to generate a proper one ... do this: # CFLAGS='-g -O -pipe' FEATURES='nostrip' emerge netpbm # gdb --args pnmtopng /usr/share/netpbm/pcxstd.ppm
Oh - it works fine if I use CFLAGS='-g -O -pipe'! Only with -O2 I get the segfault: # CFLAGS='-g -O2 -pipe' FEATURES='nostrip' emerge netpbm # gdb --args pnmtopng /usr/share/netpbm/pcxstd.ppm GNU gdb 6.4 [...] This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) run Starting program: /usr/bin/pnmtopng /usr/share/netpbm/pcxstd.ppm Program received signal SIGSEGV, Segmentation fault. 0x44077090 in rawmemchr () from /lib/tls/libc.so.6 (gdb) bt #0 0x44077090 in rawmemchr () from /lib/tls/libc.so.6 #1 0x4406e0a1 in _IO_list_resetlock () from /lib/tls/libc.so.6 #2 0x44063787 in vsscanf () from /lib/tls/libc.so.6 #3 0x4405ef9d in sscanf () from /lib/tls/libc.so.6 #4 0x0804d54d in main (argc=2, argv=0xbf820474) at pnmtopng.c:226 (gdb)
can you try upgrading to 10.31 and see if that fixes things for you ?
Yes, 10.31-r1 works fine with the -O2 flag. # locate .ppm | xargs -n 1 pnmtopng >/dev/null also worked fine, not a single segfault anymore.
*** Bug 125915 has been marked as a duplicate of this bug. ***