IM6: SIGSEV in ProfileImage

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
udotirol
Posts: 1
Joined: 2019-02-03T03:28:49-07:00
Authentication code: 1152

IM6: SIGSEV in ProfileImage

Post by udotirol »

Not sure if the issue is in ImageMagic or in the PHP binding, but I hope you don't mind me starting here :)

We've seen PHP segfaulting over some issue in combination with ImageMagic, see the back trace below:

Code: Select all

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000008029cf6a8 in ProfileImage () from /usr/local/lib/libMagickCore-6.so.6
(gdb) bt
#0  0x00000008029cf6a8 in ProfileImage () from /usr/local/lib/libMagickCore-6.so.6
#1  0x000000080280c075 in MagickProfileImage () from /usr/local/lib/libMagickWand-6.so.6
#2  0x0000000802722925 in zim_imagick_profileimage (execute_data=0x801627430, return_value=0x7fffffffb1a8) at imagick_class.c:5056
#3  0x000000000072bcf5 in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER (execute_data=0x8016273a0) at Zend/zend_vm_execute.h:907
This happens with ImageMagick 6.9.10.22 on FreeBSD 11.2 and FreeBSD 12.

Fortunately we have been able to workaround the issue by upgrading to ImageMagick 7.0.8.22, but I'm quite sure this will have some unexpected sideeffects on the PHP side.

Thanks
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: IM6: SIGSEV in ProfileImage

Post by magick »

The fault is likely in ImageMagick unless the PHP binding is passing a faulty profile blob to ImageMagick. The only way to know for sure is to reproduce the issue. Can you post a link to one of the images that fail, and a minimal PHP script that consistently fails. Once we can reproduce the problem, we will be able to determine its cause and offer a patch to fix it.
Post Reply