From:             grnick at mail dot ru
Operating system: Redhat Linux 9.0
PHP version:      5.0.1
PHP Bug Type:     Zend Engine 2 problem
Bug description:  __destruct causes segmentation fault

Description:
------------
If class includes function __destruct() any error of script  makes
segmentation fault.

Configure Command: './configure' '--with-pgsql' '--with-mysql'
'--with-apxs' '--with-apxs=/usr/local/apache/bin/apxs' '--enable-sysvsem'
'--enable-sockets'

Apache/1.3.24
Loaded Modules  mod_php5, mod_setenvif, mod_so, mod_auth, mod_access,
mod_rewrite, mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis,
mod_cgi, mod_dir, mod_autoindex, mod_include, mod_status, mod_negotiation,
mod_mime, mod_log_config, mod_env, http_core


Reproduce code:
---------------
class C1 {}

class C2 {

        public function __construct() {
                $v = new C();
//              throw new Exception("");
        }
        public function __destruct() {$id=0;}
}

$obj = new C2();

Expected result:
----------------
Fatal error: Class 'C' not found in test.php on line 7

Actual result:
--------------
Apache error_log
[notice] child pid 11402 exit signal Segmentation fault (11)

-- 
Edit bug report at http://bugs.php.net/?id=29966&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=29966&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29966&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29966&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=29966&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=29966&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=29966&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=29966&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=29966&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=29966&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=29966&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=29966&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=29966&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=29966&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=29966&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=29966&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=29966&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=29966&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=29966&r=float

Reply via email to