php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61514 magick/semaphore.c:525: LockSemaphoreInfo: Assertion `semaphore_info != (Semaph
Submitted: 2012-03-26 16:24 UTC Modified: 2013-02-18 00:35 UTC
From: pahan at hubbitus dot info Assigned:
Status: No Feedback Package: gmagick (PECL)
PHP Version: 5.4.0 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pahan at hubbitus dot info
New email:
PHP Version: OS:

 

 [2012-03-26 16:24 UTC] pahan at hubbitus dot info
Description:
------------
Please look at report from one of our user: 
https://bugzilla.redhat.com/show_bug.cgi?id=751376

It have example and reproduce script.

Test script:
---------------
<?php

$image = new Gmagick();
$svg = file_get_contents('image.svg');
$image->readImageBlob($svg);
$image->write('image.jpg');
echo get_class($image). PHP_EOL;
exit;
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-11-10 19:33 UTC] rasmus@php.net
-Status: Open +Status: Feedback
 [2012-11-10 19:33 UTC] rasmus@php.net
I am not able to reproduce this on my Ubuntu laptop with the image.svg from the redhat bug. But Valgrind is picking up a 
conditional on an uninitialized value deep in the guts of libGraphicksMagick:

==32161== Conditional jump or move depends on uninitialised value(s)
==32161==    at 0xF369577: DrawImage (in /usr/lib/libGraphicsMagick.so.3.9.0)
==32161==    by 0xF40C8B3: ??? (in /usr/lib/libGraphicsMagick.so.3.9.0)
==32161==    by 0xF306C37: ReadImage (in /usr/lib/libGraphicsMagick.so.3.9.0)
==32161==    by 0xF43DBB5: ??? (in /usr/lib/libGraphicsMagick.so.3.9.0)
==32161==    by 0xF306C37: ReadImage (in /usr/lib/libGraphicsMagick.so.3.9.0)
==32161==    by 0xF2C9BEC: BlobToImage (in /usr/lib/libGraphicsMagick.so.3.9.0)
==32161==    by 0xF040609: MagickReadImageBlob (in /usr/lib/libGraphicsMagickWand.so.2.5.0)
==32161==    by 0xEE16133: zim_gmagick_readimageblob (gmagick_methods.c:3696)
==32161==    by 0x87CEA1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:642)
==32161==    by 0x8366DE: execute (zend_vm_execute.h:410)
==32161==    by 0x7D751C: zend_execute_scripts (zend.c:1309)
==32161==    by 0x7772A2: php_execute_script (main.c:2482)
==32161==    by 0x87F4C2: do_cli (php_cli.c:988)
==32161==    by 0x439F3F: main (php_cli.c:1364)
==32161==  Uninitialised value was created by a heap allocation
==32161==    at 0x4C2B3F8: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==32161==    by 0xF368C6B: DrawImage (in /usr/lib/libGraphicsMagick.so.3.9.0)
==32161==    by 0xF40C8B3: ??? (in /usr/lib/libGraphicsMagick.so.3.9.0)
==32161==    by 0xF306C37: ReadImage (in /usr/lib/libGraphicsMagick.so.3.9.0)
==32161==    by 0xF43DBB5: ??? (in /usr/lib/libGraphicsMagick.so.3.9.0)
==32161==    by 0xF306C37: ReadImage (in /usr/lib/libGraphicsMagick.so.3.9.0)
==32161==    by 0xF2C9BEC: BlobToImage (in /usr/lib/libGraphicsMagick.so.3.9.0)
==32161==    by 0xF040609: MagickReadImageBlob (in /usr/lib/libGraphicsMagickWand.so.2.5.0)
==32161==    by 0xEE16133: zim_gmagick_readimageblob (gmagick_methods.c:3696)
==32161==    by 0x87CEA1: zend_do_fcall_common_helper_SPEC (zend_vm_execute.h:642)
==32161==    by 0x8366DE: execute (zend_vm_execute.h:410)
==32161==    by 0x7D751C: zend_execute_scripts (zend.c:1309)
==32161==    by 0x7772A2: php_execute_script (main.c:2482)
==32161==    by 0x87F4C2: do_cli (php_cli.c:988)
==32161==    by 0x439F3F: main (php_cli.c:1364)

It is hard to see how this is caused by PHP. We simply call MagickReadImageBlob() which calls DrawImage() which does this 
malloc that is then not initialized before some condition happens on that memory. I am using GraphicsMagick 1.3.16 here. Of 
course this may have nothing to do with this bug, but to look into it further we need a reproducable test case.
 [2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC