From: akriventsov at masterhost dot ru
Operating system: FreeBSD 6.2-RELEASE-p1
PHP version: 5.2.5
PHP Bug Type: CGI related
Bug description: Segmentation fault in zend_unregister_functions
Description:
------------
I have segmentation fault in php-cgi -m with zend optimizer.
/home/support/akriventsov-sp/php-5.2.5/sapi/cgi/php-cgi -c ../php.ini -m
[PHP Modules]
cgi
ctype
date
dom
filter
hash
iconv
json
libxml
pcre
PDO
pdo_sqlite
posix
Reflection
session
SimpleXML
SPL
SQLite
standard
tokenizer
xml
xmlreader
xmlwriter
Zend Optimizer
[Zend Modules]
Zend Extension Manager
Zend Optimizer
Segmentation fault: 11 (core dumped)
In php.ini:
[Zend]
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer=/home/support/akriventsov-sp/ZendOptimizer-3.3.0a-freebsd6.0-i386/data/
zend_optimizer.version=3.3.0a
zend_extension=/home/support/akriventsov-sp/ZendOptimizer-3.3.0a-freebsd6.0-i386/data/ZendExtensionManager.so
I have the same in freebsd 6.2, 6.3 with php-5.2.5,5.2.5,5.2.6RC4 with
different versions of zend 3.2.6 and 3.3.0a
Reproduce code:
---------------
tar xzf php-5.2.5.tar.gz
cd php-5.2.5
./configure
make
install zend optimizer to php.ini
sapi/cgi/php-cgi -c /path/to/php.ini -m
Expected result:
----------------
No segmentation fault
Actual result:
--------------
In gdb I've got
GNU gdb 6.1.1 [FreeBSD]
Starting program: /home/support/akriventsov-sp/php-5.2.5/sapi/cgi/php-cgi
-c ../php.ini -m
[PHP Modules]
..
[Zend Modules]
Zend Extension Manager
Zend Optimizer
Program received signal SIGSEGV, Segmentation fault.
0x08293592 in zend_unregister_functions (functions=0x3c8398e0, count=-1,
function_table=0x0) at
/home/support/akriventsov-sp/php-5.2.5/Zend/zend_API.c:1869
1869 while (ptr->fname) {
(gdb) p ptr
$1 = (zend_function_entry *) 0x3c8398e0
(gdb) p *ptr
Error accessing memory address 0x3c8398e0: Bad address.
--
Edit bug report at http://bugs.php.net/?id=44684&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=44684&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=44684&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=44684&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44684&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=44684&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44684&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44684&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44684&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44684&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44684&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=44684&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=44684&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44684&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44684&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44684&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44684&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44684&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44684&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44684&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44684&r=mysqlcfg