Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 104434 - pnmtopng (netpbm 10.29) segmentation fault
Summary: pnmtopng (netpbm 10.29) segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-31 16:59 UTC by Heiko Baums
Modified: 2005-09-27 12:02 UTC (History)
2 users (show)

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


Attachments
Fixes case where no alpha mask is not provided as argument (what_if_no_alpha_file.patch,604 bytes, patch)
2005-09-05 16:53 UTC, Andy Chambers
Details | Diff
Revised patch that keeps the paths to the source file better matched (netpbm-fix-segfault.patch,599 bytes, patch)
2005-09-06 13:29 UTC, Andy Chambers
Details | Diff
Ebuild that applies the patch above (netpbm-10.29-r1.ebuild,2.42 KB, text/plain)
2005-09-06 13:32 UTC, Andy Chambers
Details
Forgot to adjust the header (netpbm-10.29-r1.ebuild,2.42 KB, text/plain)
2005-09-06 13:42 UTC, Andy Chambers
Details
Fixed header line (netpbm-10.29-r1.ebuild,2.32 KB, text/plain)
2005-09-06 13:48 UTC, Andy Chambers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Baums 2005-08-31 16:59:44 UTC
pnmtopng from the package netpbm-10.29 gives a segmentation fault and a 0 byte 
output file. 

Reproducible: Always
Steps to Reproduce:
1.pnmtopng input.pnm output.png  
2.  
3.  
  
Actual Results:  
 


Gentoo Base System version 1.12.0_pre7 
Portage 2.0.51.22-r2 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r1, 
2.6.13-gentoo i686) 
================================================================= 
System uname: 2.6.13-gentoo i686 AMD Athlon(tm) XP 1600+ 
dev-lang/python:     2.4.1-r1 
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 
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 -fomit-frame-pointer" 
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/splash /etc/terminfo /etc/texmf/web2c /etc/env.d" 
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoconfig distlocks sandbox sfperms strict" 
GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ 
http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ 
http://gd.tuwien.ac.at/opsys/linux/gentoo/ 
ftp://pandemonium.tiscali.de/pub/gentoo/ 
http://pandemonium.tiscali.de/pub/gentoo/" 
LANG="de_DE@euro" 
LC_ALL="de_DE@euro" 
LINGUAS="de" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/usr/var" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/usr/local/portage" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="3dnow 3dnowext X a52 aac aalib accessibility acpi aim alsa apache2 apm 
arts audiofile avi bash-completion berkdb bitmap-fonts bluetooth bonobo 
cdparanoia cdr crypt cups curl dba dga directfb divx4linux doc dv dvd dvdr 
dvdread eds emacs emacs-w3 emboss encode f77 fam fame fbcon flash font-server 
foomaticdb fortran ftp gcc-libffi gcj gd gdbm gif gimpprint gpm gstreamer gtk 
gtk2 gtkhtml guile icq imagemagick imlib ipv6 irmc jabber jce jpeg kde lcms 
ldap libg++ libwww live lzo mad maildir mailwrapper mbox mikmod milter mime 
ming mjpeg mmx mmx2 mmxext motif mozilla mp3 mpeg msn mysql nas ncurses 
network nls nvidia objc odbc offensive ogg oggvorbis on-the-fly-crypt opengl 
oscar oss pam pdflib perl php plugin png ppds print python qt quicktime 
readline real scanner sdl slang smime spell spl sqlite sse ssl svga tcltk tcpd 
tetex theora tidy tiff tokenizer truetype truetype-fonts type1-fonts unicode 
usb videos visualization vorbis win32codecs wmf x86 xine xml xml2 xmms xpm xv 
xvid yahoo zlib linguas_de userland_GNU kernel_linux elibc_glibc" 
Unset:  ASFLAGS, CTARGET, LDFLAGS, MAKEOPTS
Comment 1 Heiko Baums 2005-08-31 17:03:44 UTC
Step to Reproduce is of course: 
pnmtopng input.pnm > output.png 
 
Sorry for the typo. 
Comment 2 Andy Chambers 2005-09-05 16:53:50 UTC
Created attachment 67705 [details, diff]
Fixes case where no alpha mask is not provided as argument

Patch for the file /netpbm-10.29/converter/other/pnmtopng.c

Upstream has been notified of the bug and I presume a fix will
appear in a later version.  This patch should fix the problem
now though
Comment 3 Andy Chambers 2005-09-06 13:29:55 UTC
Created attachment 67761 [details, diff]
Revised patch that keeps the paths to the source file better matched

This is the same patch as before really, the only difference being
I copied how patches to packages are made in other packages.

An revised ebuild that uses the patch follows.

Andy
Comment 4 Andy Chambers 2005-09-06 13:32:11 UTC
Created attachment 67762 [details]
Ebuild that applies the patch above

Nuff said
Comment 5 Andy Chambers 2005-09-06 13:40:11 UTC
Comment on attachment 67762 [details]
Ebuild that applies the patch above

-r1
Comment 6 Andy Chambers 2005-09-06 13:42:37 UTC
Created attachment 67763 [details]
Forgot to adjust the header
Comment 7 Andy Chambers 2005-09-06 13:48:20 UTC
Created attachment 67764 [details]
Fixed header line

Apologies for all the wrong attachments.  This should
now be correct
Comment 8 Heiko Baums 2005-09-06 17:49:12 UTC
 (In reply to comment #7) 
> Apologies for all the wrong attachments.  This should 
> now be correct 
 
Never mind. Unfortunately I hadn't had time to test the patches until now. 
But with the attachments of comment #3 and comment #7 pnmtopng works. 
Thank you! 
 
The only thing that has to be done is to put the patches into the portage tree. 
Comment 9 SpanKY gentoo-dev 2005-09-26 18:13:42 UTC
thanks, patch now in 10.29-r1
Comment 10 Heiko Baums 2005-09-27 10:03:20 UTC
Sorry but the new ebuild and patch in portage doesn't work. 
 
This is the error message I get: 
i686-pc-linux-gnu-gcc -c 
-I/usr/var/portage/netpbm-10.29-r1/work/netpbm-10.29/other -I. -I -DNDEBUG \ 
     -march=athlon-xp -O2 -pipe -fomit-frame-pointer   -o ppmsvgalib.o 
ppmsvgalib.c 
i686-pc-linux-gnu-gcc  -o ppmsvgalib ppmsvgalib.o \ 
  
`/usr/var/portage/netpbm-10.29-r1/work/netpbm-10.29/buildtools/libopt /usr/var/portage/netpbm-10.29-r1/work/netpbm-10.29/lib/libnetpbm.so` 
libvga.so -lm   \ 
 
i686-pc-linux-gnu-gcc: libvga.so: No such file or directory 
make[1]: *** [ppmsvgalib] Error 1 
make[1]: Leaving directory 
`/usr/var/portage/netpbm-10.29-r1/work/netpbm-10.29/other' 
make: *** [other/all] Error 2 
 
!!! ERROR: media-libs/netpbm-10.29-r1 failed. 
!!! Function src_compile, Line 567, Exitcode 2 
!!! emake failed 
!!! If you need support, post the topmost build error, NOT this status message. 
 
Of course I had svgalib installed and reinstalled svgalib but I still get the 
same error message. 
 
I don't know if this error is caused by this but I found out that your patch is 
a bit different than Andy's patch in comment #3. 
 
In the first line of your patch there's a ~ missing. 
And are you sure that also in a patch the comments don't need a # at beginning 
of the line? 
 
And your ebuild is pretty different as Andy's in comment #7. Unfortunately I 
don't know much about building ebuilds, so I can't check this. 
Comment 11 SpanKY gentoo-dev 2005-09-27 10:32:58 UTC
unrelated

this bug is about netpbm crashing, nothing else
Comment 12 Heiko Baums 2005-09-27 11:59:30 UTC
My bug from comment #10 is related to your bugfix from comment #9 so it is 
related to this bug. 
 
With the original patch and ebuild by Andy Chambers I don't get this 
installation error. I've just tried that again. That's why your bugfix must 
have an error somewhere. So my bug from comment #10 is an aftereffect from your 
fix. 
 
Therefore and because your patch has differences to Andy's patch I don't see a 
reason for opening a new bug. Sorry. 
Comment 13 SpanKY gentoo-dev 2005-09-27 12:02:25 UTC
no, it is not

i rewrote the 10.29-r1 ebuild in addition to this one fix

again, this bug is just about pnmtopng segfaulting which is now fixed, it is not
about build failure with svga support enabled