php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57897 coredump in phpinfo()
Submitted: 2007-11-02 16:38 UTC Modified: 2007-11-03 08:24 UTC
From: nof8 at mail dot ru Assigned:
Status: Closed Package: imagick (PECL)
PHP Version: 5.2.1 OS: FreeBSD 6.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
30 - 18 = ?
Subscribe to this entry?

 
 [2007-11-02 16:38 UTC] nof8 at mail dot ru
Description:
------------
I got php crashed when running 'phpinfo()' command with imagick.so enabled.

It fails both running as Apache2.2 module and in command line with 

php -r 'phpinfo();'

The failure message is:

php in free(): error: junk pointer, too high to make sense
Abort trap: 6 (core dumped)

PHP ver: 5.2.4 (not 5.2.1 as I was forced to choose in 'select' box of bugreport interface - there's no 5.2.4 option)
pecl-imagick ver: 2.0.1
ImageMagick library version: ImageMagick-nox11-6.3.5.10_1
All php extensions disabled, but imagick.so

ImageMagick library is compiled with the following options enabled:
WITHOUT_X11=true                                           
WITHOUT_IMAGEMAGICK_TESTS=true                   
WITHOUT_IMAGEMAGICK_PERL=true                     
WITHOUT_IMAGEMAGICK_MODULES=true             
WITHOUT_IMAGEMAGICK_BZLIB=true                 
WITHOUT_IMAGEMAGICK_16BIT_PIXEL=true 
WITHOUT_IMAGEMAGICK_DJVU=true               
WITHOUT_IMAGEMAGICK_LCMS=true                      
WITH_IMAGEMAGICK_TTF=true                              
WITHOUT_IMAGEMAGICK_FONTCONFIG=true    
WITH_IMAGEMAGICK_JPEG=true                      
WITHOUT_IMAGEMAGICK_OPENEXR=true             
WITH_IMAGEMAGICK_PNG=true                           
WITHOUT_IMAGEMAGICK_TIFF=true                      
WITHOUT_IMAGEMAGICK_FPX=true                        
WITHOUT_IMAGEMAGICK_JBIG=true                      
WITHOUT_IMAGEMAGICK_JPEG2000=true          
WITHOUT_IMAGEMAGICK_DOT=true                    
WITHOUT_IMAGEMAGICK_WMF=true                         
WITHOUT_IMAGEMAGICK_SVG=true                         
WITHOUT_IMAGEMAGICK_PDF=true                         
WITHOUT_IMAGEMAGICK_MPEG2=true                   
WITHOUT_IMAGEMAGICK_GSLIB=true

I had the same issue with imagick 0.9.13

I think it's the same bug as http://pecl.php.net/bugs/bug.php?id=6488
Not sure if I'm doing right thing reposting it here, but the goal besides the report itself was to warn all people going to download imagick looking into empty 'bugs' section. People see no bugs, but bugs exist actually (at least this one). I have this bug in conditions different from bug #6488 and with latest 'stable' version of both php and imagick extension. 

Some guy here http://pecl.php.net/bugs/bug.php?id=6488 recommends compiling ImageMagick with --enable-embeddable, but it doesn't help, just chages error message to:

Assertion failed:
((SizeOfBlock(memory) % (4*sizeof(size_t))) == 0), function
RelinquishMagickMemory, file magick/memory.c, line 591


Reproduce code:
---------------
php -r 'phpinfo();'

Expected result:
----------------
full and valid phpinfo() output

Actual result:
--------------
partial phpinfo() output, broken somewhere in the middle, finished with this message:

php in free(): error: junk pointer, too high to make sense
Abort trap: 6 (core dumped)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-02 16:44 UTC] nof8 at mail dot ru
I got the same issue with magickwand.so.
So maybe it's ImageMagick bug actually, not imagick's or magicwand's
Nevertheless it crashes.
 [2007-11-02 16:59 UTC] mkoppanen@php.net
Can you try to compile ImageMagick from sources? I got a report earlier about FreeBSD/ImageMagick issues which were solved by recompiling.
 [2007-11-03 08:23 UTC] nof8 at mail dot ru
rebuilding ImageMagick-6.3.5-10 from ports doesn't help:
---
cd /usr/ports/graphics/ImageMagick
make deinstall distclean install
---


But installing ImageMagick-6.3.6-5 from source helps!
---
./configure --with-windows-font-dir=/usr/share/misc/fonts --without-x --without-threads
make install
---

I think --without-threads is not neccesary, but without it I got 
/libexec/ld-elf.so.1: /usr/local/lib/libMagick.so.10: Undefined symbol "pthread_equal"

Thanks for help. I hope port version of ImageMagick will be updated to 6.3.6-10 soon.
 [2007-11-03 08:24 UTC] nof8 at mail dot ru
I mean 'updated to 6.3.6-5' of course (6.3.6-10 is not out yet :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 02:01:29 2024 UTC