php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44684 Segmentation fault in zend_unregister_functions
Submitted: 2008-04-10 12:15 UTC Modified: 2008-04-10 20:00 UTC
From: akriventsov at masterhost dot ru Assigned:
Status: Not a bug Package: CGI/CLI related
PHP Version: 5.2.5 OS: FreeBSD 6.2-RELEASE-p1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: akriventsov at masterhost dot ru
New email:
PHP Version: OS:

 

 [2008-04-10 12:15 UTC] akriventsov at masterhost dot ru
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-04-10 17:56 UTC] iliaa@php.net
Does it crash without the Zend Optimizer?
 [2008-04-10 18:28 UTC] akriventsov at masterhost dot ru
No, it is working fine without Zend.
Also it is working with php-cli.
 [2008-04-10 20:00 UTC] scottmac@php.net
Please report this issue to Zend, this has nothing to do with PHP.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 29 15:00:02 2025 UTC