#23466 [Opn->Fbk]: Segmentation fault or misbehaving ob_start on PHP5.0.0-dev
ID: 23466
Updated by: moriyoshi@php.net
Reported By: php at fuer-et dot de
-Status: Open
+Status: Feedback
Bug Type: Zend Engine 2 problem
Operating System: Linux, Red Hat 8
PHP Version: 5CVS-2003-05-03 (dev)
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2003-05-05 15:02:25] moriyoshi@php.net
related to bug #23489
------------------------------------------------------------------------
[2003-05-03 11:34:30] php at fuer-et dot de
<?php
class Foo {
function bar($str)
{
return $str.'bar';
}
}
function baz($str) {
return $str."baz\n";
}
$foo = new Foo;
ob_start('baz');
ob_start(array(&$foo, 'bar'));
print 'foo';
?>
This script fails to add 'bar' to the string on every machine when
using PHP5, and it segfaults on mine.
et@edea:~$ /usr/local/sources/php-4.3.1/sapi/cli/php test.php
foobarbaz
et@edea:~$ /usr/local/sources/unstable/php5-200305031330/sapi/cli/php
test.php
Segmentation fault (core dumped)
Backtrace is:
(gdb) bt
#0 0x0816d425 in zend_hash_index_find (ht=0x0, h=0, pData=0x0)
at
/home/et/sources/unstable/php5-200305031330/Zend/zend_hash.c:979
#1 0x08160a02 in call_user_function_ex (function_table=0x828d128,
object_pp=0x0, function_name=0x4026d0b4,
retval_ptr_ptr=0xbfffe4e0, param_count=2, params=0xbfffe4e8,
no_separation=1, symbol_table=0x0)
at
/home/et/sources/unstable/php5-200305031330/Zend/zend_execute_API.c:555
#2 0x081467c9 in php_end_ob_buffer (send_buffer=1 '\001', just_flush=0
'\0')
at /home/et/sources/unstable/php5-200305031330/main/output.c:241
#3 0x0814693b in php_end_ob_buffers (send_buffer=0 '\0')
at /home/et/sources/unstable/php5-200305031330/main/output.c:335
#4 0x0813bc8c in php_request_shutdown (dummy=0x0) at
/home/et/sources/unstable/php5-200305031330/main/main.c:1091
#5 0x08181368 in main (argc=2, argv=0xbfffec64) at
/home/et/sources/unstable/php5-200305031330/sapi/cli/php_cli.c:1006
#6 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6
(gdb)
config.nice:
#! /bin/sh
#
# Created by configure
'./configure' \
'--enable-bcmath' \
'--with-gmp' \
'--with-mysql' \
'--with-pgsql' \
'--enable-calendar' \
'--with-apxs=/opt/apache/1.3.27/bin/apxs' \
'--with-zlib' \
'--with-bz2' \
'--with-config-file-path=/home/et' \
'--with-openssl' \
'--enable-debug' \
"$@"
I know the config file path is odd, i just use the machine for
developing and i'm the only one working on it ;)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23466&edit=1
Thread (5 messages)