|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-02-18 10:36 UTC] f21 dot groups at gmail dot com
[2014-02-18 10:54 UTC] f21 dot groups at gmail dot com
[2014-02-18 10:55 UTC] f21 dot groups at gmail dot com
-Status: Open
+Status: Closed
[2014-02-18 10:55 UTC] f21 dot groups at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 23 04:00:01 2025 UTC |
Description: ------------ I am running PHP-FPM 5.5.9 with Nginx 1.4.4. Operating system is Ubuntu 13.10 64-bit. ImageMagick is ImageMagick 6.8.8-7 Q8 x86_64 2014-02-18 which was just built from source. Imagick is 3.2.0 RC1. All PHP extensions have been disabled. I am seeing a case where under some circumstances if we call identifyImage() the extension causes PHP to crash. The code is a heavily simplified version of one of my original classes. Test script: --------------- class Image{ private $_imagick; public function __construct($input){ if($input instanceof \Imagick){ $this->_imagick = $input; }else{ $this->_imagick = new \Imagick($input); } } public function createIcon(){ $icon = new \Imagick(); $newSize = clone $this; $newSize->resize(); $icon->addImage($newSize->getImagickObject()); $icon->identifyimage(); //Causes the crash } public function resize(){ $canvas = new \Imagick(); $canvas->newImage(16, 16, "white"); $this->_imagick = $canvas; } public function getImagickObject(){ return $this->_imagick; } public function __clone(){ $this->_imagick = clone $this->_imagick; } } $img = new Image('bg.jpg'); $img->createIcon(); Expected result: ---------------- PHP should not crash. Actual result: -------------- PHP crashes.