ID: 47753 Comment by: berblinger at krumedia dot de Reported By: work at setor dot net Status: Open Bug Type: Reproducible crash Operating System: Linux PHP Version: 5.2.9 New Comment:
Guess this is - as you already mentioned - the same problem like the bug #47730. If you rewrite the execute() function to something like this: --------------- public function execute() { $tmp = $this->makeThrow(); $this->test( $tmp ); } --------------- everything works fine. This segfault is only caused, when one of the arguments of a valid function call throws an exception. Previous Comments: ------------------------------------------------------------------------ [2009-03-23 13:49:57] work at setor dot net public function execute() { // this works $pass = $this->makeThrow(); $this->test( $pass ); } # uname -a Linux myhost 2.6.27.15-170.2.24.fc10.x86_64 #1 SMP Wed Feb 11 23:14:31 EST 2009 x86_64 x86_64 x86_64 GNU/Linux # php -v PHP 5.2.9 (cli) (built: Mar 23 2009 14:52:55) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies Configure Command './configure' '--prefix=/ox/kayako/php' '--enable-mbstring' '--with-curl' '--with-openssl' '--with-iconv' '--with-mysqli' '--with-gd' '--with-ttf' '--enable-dbase' '--enable-soap' '--with-apxs2=/ox/kayako/apache/bin/apxs' '--enable-fastcgi' '--enable-force-cgi-redirect' '--with-libdir=lib64' '--with-png-dir' '--with-jpeg-dir' '--with-mcrypt' '--with-freetype-dir=/usr/include/freetype2' '--with-zlib' '--with-imap' '--with-kerberos' '--with-imap-ssl' '--enable-cgi' '--enable-force-cgi-redirect' '--enable-discard-path' '--with-iconv' '--enable-shmop' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--enable-sockets' '--with-bz2' '--with-gettext' '--enable-zip' '--enable-pcntl' '--with-readline' this code work fine in the same server with php 5.2.6 configured as: './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--without-mime-magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' '--disable-json' '--without-pspell' ------------------------------------------------------------------------ [2009-03-23 13:44:23] work at setor dot net Description: ------------ Looks like this bug #47730 php chashes (Segmentation fault). See reproduce code and comments inside for further details. Reproduce code: --------------- <?php ini_set( 'display_errors', 1 ); class ExceptionBug { public function execute() { $this->test( $this->makeThrow() ); } private function test( $test ) { } private function makeThrow() { throw new Exception( 'test' ); } } $Test = new ExceptionBug(); $Test->execute(); Expected result: ---------------- Fatal error: Uncaught exception 'Exception' with message 'test' in /data2/www/test.php:18 Stack trace: #0 /data2/www/test.php(9): ExceptionBug->makeThrow() #1 /data2/www/test.php(23): ExceptionBug->execute() #2 {main} thrown in /data2/www/test.php on line 18 Actual result: -------------- nothing. php crashes. Segmentation fault in cli ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47753&edit=1