#24659 [Fbk->Opn]: Segmentation fault: xml_set_*_handler with object reference

From: Date: Thu, 17 Jul 2003 01:56:29 +0000
Subject: #24659 [Fbk->Opn]: Segmentation fault: xml_set_*_handler with object reference
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-44164@lists.php.net to get a copy of this message
ID: 24659 User updated by: fujimura at wakhok dot ac dot jp Reported By: fujimura at wakhok dot ac dot jp -Status: Feedback +Status: Open Bug Type: XML related Operating System: Linux kernel-2.4.21 PHP Version: 5.0.0b2-dev New Comment: > Backtrace is useless as long as you don't have > --enable-debug in your configure line. Okay, I rebuilt PHP with --enable-debug, but this bug did not reproduce. And next, I did again without --enable-debug, this bug reproduced. I have discovered that set_exception_handler() causes this one too. <?php set_exception_handler("test_func"); function test_func($exception) { var_dump($exception); exit; } throw new Exception(); print "A"; ?> I cannot understand. The debug codes of Zend causes with this? What can I do? > Also include the full configure line you used. ./configure \ --with-apxs=/usr/local/apache/bin/apxs \ --disable-short-tags \ --enable-versioning \ --enable-mbstring \ --enable-mbregex \ --enable-dom \ --with-iconv \ --with-xsl \ --with-openssl \ --with-zlib \ --with-bz2 ...and --enable-debug Previous Comments: ------------------------------------------------------------------------ [2003-07-16 03:54:01] sniper@php.net Backtrace is useless as long as you don't have --enable-debug in your configure line. So add it, and put new backtrace here. Also include the full configure line you used. ------------------------------------------------------------------------ [2003-07-15 04:16:58] fujimura at wakhok dot ac dot jp -$parser AND die; +$parser OR die; ;-) ------------------------------------------------------------------------ [2003-07-15 04:15:16] fujimura at wakhok dot ac dot jp Description: ------------ The following code crashes(segmentation fault, and empty output) at a whim. But it does not reproduce when php invoked as CLI. Reproduce code: --------------- <?php class MyHandler { public function test($parser, $data) { print $data; } } $parser = xml_parser_create(); $parser AND die; $handler = new MyHandler(); xml_set_default_handler($parser, array($handler, "test")); xml_parser_free($parser); ?> Expected result: ---------------- Nothing. Actual result: -------------- SIGSEGV logged to error_log. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24659&edit=1

« previous php.bugs (#44164) next »