Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 260578 - dev-php5/pecl-imagick-2.1.1 segfaults on identifyImage() with media-gfx/imagemagick-6.4.8.3
Summary: dev-php5/pecl-imagick-2.1.1 segfaults on identifyImage() with media-gfx/image...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-28 01:41 UTC by Adam Randall
Modified: 2009-04-09 10:36 UTC (History)
0 users

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


Attachments
My test.pdf file (test.pdf,48.55 KB, application/pdf)
2009-02-28 01:42 UTC, Adam Randall
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Randall 2009-02-28 01:41:10 UTC
dev-lang/php-5.2.8-r2
dev-php5/pecl-imagick-2.1.1
media-gfx/imagemagick-6.4.8.3

When performing Imagick::identifyImage() on a PDF loaded through Imagick:pingImage() a segmentation fault occurs. This only seems to happen with PDF files, and only when done with pingImage(). If readImage() is used instead, identifyImage() works as expected. This behavior changed between imagemagick 6.4.4.6 and 6.4.8.3.

This segfaults all the time:
php -r '$img = new Imagick(); $img->pingImage( "test.pdf" ); var_dump( $img->identifyImage() );'

This works:
php -r '$img = new Imagick(); $img->readImage( "test.pdf" ); var_dump( $img->identifyImage() );'

As I do not have debug symbols I cannot give a backtrace, but do know that it is dying in ExportQuantumPixels() inside of the /lib/libMagickCore.so.1 library.

I have tried removing imagick-2.1.1 and doing a direct pecl installation of imagick 2.2.1, which was released 2009-02-06, but that does not resolve the issue.

Reverting to ImageMagick 6.4.4.6 does resolve the issue for me, but I don't wish to do this.

To ensure that everything was clean, imagick and imagemagick were both uninstalled and reinstalled. This did not affect the issue.

Reproducible: Always

Steps to Reproduce:




Portage 2.1.6.7 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.22-gentoo-r5 i686)
=================================================================
System uname: Linux-2.6.22-gentoo-r5-i686-Intel-R-_Celeron-R-_CPU_2.53GHz-with-glibc2.0
Timestamp of tree: Thu, 26 Feb 2009 17:30:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.2-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.63
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
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.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /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/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo"
LDFLAGS="-Wl,-O1"
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="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://140.211.166.165/gentoo-portage"
USE="acl apache2 bash-completion berkdb bzip2 cli cracklib crypt ctype cups curl dri fortran gd gdbm gif gpm iconv imagemagick ipv6 isdnlog jpeg midi mudflap mysql ncurses nls nptl nptlonly openmp pam pcre pdf perl png postgres pppd python readline reflection samba session simplexml sockets spl ssl sysfs tcpd threads tiff unicode x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 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 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 evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

A GDB output:

# gdb php
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(no debugging symbols found)
(gdb) run -r '$i = new Imagick(); $i->pingImage( "/tmp/i2x/12357631181151031735/fax000138186.pdf" ); var_dump( $i->identifyImage() );'
Starting program: /usr/bin/php -r '$i = new Imagick(); $i->pingImage( "/tmp/i2x/12357631181151031735/fax000138186.pdf" ); var_dump( $i->identifyImage() );'
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xb77d76c0 (LWP 19214)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb77d76c0 (LWP 19214)]
0xb75e281f in ExportQuantumPixels () from /usr/lib/libMagickCore.so.1
(gdb) quit
Comment 1 Adam Randall 2009-02-28 01:42:58 UTC
Created attachment 183436 [details]
My test.pdf file

This is my testing file, which was created from Word 07 with the Save As PDF option.
Comment 2 Christian Hoffmann (RETIRED) gentoo-dev 2009-04-09 10:36:36 UTC
Might be related to an old pecl-imagick version. Please retry with either 2.2.2 or 2.3.0_beta1 which I've just added to the tree.