#36071 [Asn]: Engine Crash related with 'clone'

From: Date: Wed, 18 Jan 2006 22:38:08 +0000
Subject: #36071 [Asn]: Engine Crash related with 'clone'
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-92155@lists.php.net to get a copy of this message
ID: 36071 User updated by: kaien at sparcs dot org Reported By: kaien at sparcs dot org Status: Assigned Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 5CVS-2006-01-18 (snap) Assigned To: dmitry New Comment: make_real_object() in ZEND_ASSIGN_OBJ separates EG(error_zval_ptr) Thanks to SEGV, or modification on EG(error_zval_ptr) could be harder to figure out. <? $a = clone 0; $a[0]->b = 0; print_r(clone 1); ?> Warning: __clone method called on non-object in - on line 2 Warning: __clone method called on non-object in - on line 4 stdClass Object ( [b] => 0 ) Segmentation fault (core dumped) Previous Comments: ------------------------------------------------------------------------ [2006-01-18 20:08:07] tony2001@php.net Dmitry, please take a look at it. ------------------------------------------------------------------------ [2006-01-18 19:47:26] kaien at sparcs dot org Sorry. The comment part (/* */) was just an attempt at humor, which I thought I had omitted. Same problem with 5.1.1, 5.1.2. No crash with 5.0.3. ------------------------------------------------------------------------ [2006-01-18 19:33:26] kaien at sparcs dot org Description: ------------ 2 line of php code crash latest engine. configure --disable-all /* We want immediate fix. We are scheduled for migration of our service from php4 to php5 next week. */ Reproduce code: --------------- <? $a = clone 0; $a[0]->b = 0; ?> Expected result: ---------------- NO seg fault. Actual result: -------------- Warning: __clone method called on non-object in - on line 2 Segmentation fault (core dumped) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36071&edit=1

« previous php.bugs (#92155) next »