From:
Operating system: Gentoo GNU/Linux x86_64
PHP version: 5.3.3
Package: Apache2 related
Bug Type: Bug
Bug description:Segfault on _zend_is_inconsistent
Description:
------------
I'm getting segfault on function _zend_is_inconsistent while using a
specific module that call zend_alter_ini_entry.
A check in _zend_is_inconsistent is done badly :
static void _zend_is_inconsistent(const HashTable *ht, const char *file,
int line)
{
if (ht->inconsistent==HT_OK) {
return;
}
ht here in 0x0, so segfault
A simple fix could be :
static void _zend_is_inconsistent(const HashTable *ht, const char *file,
int line)
{
if (!ht || ht->inconsistent==HT_OK) {
return;
}
Here is backtrace :
#0 0x00007ffff0bcb44c in _zend_is_inconsistent (ht=0x0,
file=0x7ffff10e5168
"/var/tmp/portage/dev-lang/php-5.3.3-r3/work/sapis-build/apache2/Zend/zend_hash.c",
line=875)
at
/var/tmp/portage/dev-lang/php-5.3.3-r3/work/sapis-build/apache2/Zend/zend_hash.c:53
#1 0x00007ffff0bce368 in zend_hash_find (ht=0x0, arKey=0x7ffff83362c0
"open_basedir", nKeyLength=13, pData=0x7fffffffdce8)
at
/var/tmp/portage/dev-lang/php-5.3.3-r3/work/sapis-build/apache2/Zend/zend_hash.c:875
#2 0x00007ffff0bd86de in zend_alter_ini_entry_ex (name=0x7ffff83362c0
"open_basedir", name_length=13, new_value=0x7ffff83a1b80
"/var/www:/var/www/otis.scabb:/var/tmp:/usr/share/php",
new_value_length=52, modify_type=4, stage=16, force_change=0) at
/var/tmp/portage/dev-lang/php-5.3.3-r3/work/sapis-build/apache2/Zend/zend_ini.c:260
#3 0x00007ffff0bd866b in zend_alter_ini_entry (name=0x7ffff83362c0
"open_basedir", name_length=13, new_value=0x7ffff83a1b80
"/var/www:/var/www/otis.scabb:/var/tmp:/usr/share/php",
new_value_length=52, modify_type=4, stage=16) at
/var/tmp/portage/dev-lang/php-5.3.3-r3/work/sapis-build/apache2/Zend/zend_ini.c:249
#4 0x00007ffff1401425 in vv_php_alter_ini (argc=<value optimized out>,
argv=0x7ffff8252970, r=<value optimized out>) at mod_virtualvalue.c:347
#5 0x00007ffff140032d in vv_translate (r=0x7ffff83a5f30) at
mod_virtualvalue.c:453
#6 0x00007ffff7fc6a2a in ap_run_translate_name (r=0x7ffff83a5f30) at
request.c:74
#7 0x00007ffff7fc7ca3 in ap_process_request_internal (r=0x7ffff83a5f30) at
request.c:150
#8 0x00007ffff7fe35fc in ap_process_request (r=0x7ffff83a5f30) at
http_request.c:280
#9 0x00007ffff7fdfe63 in ap_process_http_connection (c=0x7ffff839fde0) at
http_core.c:190
#10 0x00007ffff7fd9e0a in ap_run_process_connection (c=0x7ffff839fde0) at
connection.c:43
#11 0x00007ffff7fda383 in ap_process_connection (c=0x7ffff839fde0,
csd=0x7ffff839fbf0) at connection.c:178
#12 0x00007ffff7feadfc in child_main (child_num_arg=0) at prefork.c:662
#13 0x00007ffff7feaf1e in make_child (s=0x7ffff8213838, slot=0) at
prefork.c:702
#14 0x00007ffff7feb601 in ap_mpm_run (_pconf=0x7ffff820e138,
plog=0x7ffff82402c8, s=0x7ffff8213838) at prefork.c:978
#15 0x00007ffff7fb1254 in main (argc=4, argv=0x7fffffffe2e8) at main.c:740
--
Edit bug report at http://bugs.php.net/bug.php?id=53243&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=53243&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=53243&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=53243&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=53243&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=53243&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=53243&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=53243&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=53243&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=53243&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=53243&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=53243&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=53243&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=53243&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=53243&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53243&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=53243&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=53243&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=53243&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=53243&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=53243&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=53243&r=mysqlcfg