From: [EMAIL PROTECTED]
Operating system: Linux 2.6.18
PHP version: 5.2.0RC5
PHP Bug Type: Reproducible crash
Bug description: Segmentation fault in ext/ming when adding text without
setting size before
Description:
------------
Calling addString on a SWFText object without setting height or font
before causes a segmentation fault in libming.so.
If only the height is set, the expected error occurs.
Backtrace:
(gdb) bt
#0 0xb7e124dc in SWFText_addWideString () from /usr/lib/libming.so.0
#1 0xb7e12678 in SWFText_addString () from /usr/lib/libming.so.0
#2 0x08189f23 in zim_swftext_addString (ht=1, return_value=0x875c140,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
at /home/kore/bin/php/php-5.2-stable/php-src/ext/ming/ming.c:3541
... (Complete backtrace on request)
Tested with
PHP 5.1.6, ming 0.3
PHP 5.2-RC5 ming 0.3
Reproduce code:
---------------
<?php
$text = 'Teststring';
$size = 60;
$t = new SWFText();
//$t->setHeight( $size );
//$t->setFont( new SWFFont( 'fdb_font.fdb' ) );
$t->addString( $text );
Expected result:
----------------
Error message like this:
Catchable fatal error: SWFText::addString(): font must be set before
calling addString in /home/kore/devel/ezcomponents/trunk/test.php on line
9
Actual result:
--------------
Segmentation fault.
--
Edit bug report at http://bugs.php.net/?id=39165&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=39165&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=39165&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=39165&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39165&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=39165&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39165&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39165&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39165&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39165&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39165&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=39165&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=39165&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39165&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39165&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39165&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39165&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39165&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39165&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39165&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39165&r=mysqlcfg