From: scottmacvicar at ntlworld dot com Operating system: RHEL 4 PHP version: 5.2.1 PHP Bug Type: GD related Bug description: Thread safety issue in GD
Description: ------------ Appears to be still several more thread safety issues in GD, I've not had time to track these all down yet. We're running gdft.c from CVS to fix a few identified issues already. Looking at the code there still appears to be a race condition within the code but it appears to be a pretty tight loop since its not happening as often as before. By looking at gdft.c it looks possible for a fontCache entry to exist during a check, by the time it gets to obtaining the lock the fontCache has been cleared or something similarly evil. The backtrace we've got is: http://public.vbulletin.com/bugs/php/gdcache-bt.txt Patch for first issue to deal with the possibility that a cache entry is null: http://public.vbulletin.com/bugs/php/gdcache-patch-1.txt Potential patch for second issue to deal with gdCacheSetup thread safety: http://public.vbulletin.com/bugs/php/gdcache-patch-2.txt -- Edit bug report at http://bugs.php.net/?id=40858&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40858&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40858&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40858&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40858&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40858&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40858&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40858&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40858&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40858&r=support Expected behavior: http://bugs.php.net/fix.php?id=40858&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40858&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40858&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40858&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40858&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40858&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40858&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40858&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40858&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40858&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40858&r=mysqlcfg