#35243 [NEW]: Crashes in php_mblen when compiled with thread-safety on Linux
| From: | shulmanb at il dot ibm dot com | Date: | Wed, 16 Nov 2005 15:07:05 +0000 |
| Subject: | #35243 [NEW]: Crashes in php_mblen when compiled with thread-safety on Linux | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-88283@lists.php.net to get a copy of this message | ||
From: shulmanb at il dot ibm dot com
Operating system: Linux
PHP version: 5.0.5
PHP Bug Type: Scripting Engine problem
Bug description: Crashes in php_mblen when compiled with thread-safety on Linux
Description:
------------
When running on Linux with --enable-maintainer-zts (and yes, I know it's
not wise...), crashes sometimes happen in ext/standard/php_string.h when
using the php_mblen macro.
This happens because in ext/standard/basic_functions.c, in the
basic_globals_ctor function, the value of mblen_state is not initialized.
The basic_globals_ctor function should include the following lines as part
of the initialization:
#if defined(_REENTRANT)&&defined(HAVE_MBRLEN)&&defined(HAVE_MBSTATE_T)
memset(&BG(mblen_state), 0, sizeof(BG(mblen_state)));
#endif
Unfortunately, I am unable to include code that demonstrate this, as the
crash strongly depends on the (random) value of mblen_state.
--
Edit bug report at http://bugs.php.net/?id=35243&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35243&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35243&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35243&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35243&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35243&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35243&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35243&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35243&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35243&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35243&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35243&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35243&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35243&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35243&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35243&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35243&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35243&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35243&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35243&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35243&r=mysqlcfg