Bug #52565 [NEW]: print out of Zend_Form causing segmentation fault

From: Date: Sun, 08 Aug 2010 22:25:50 +0000
Subject: Bug #52565 [NEW]: print out of Zend_Form causing segmentation fault
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-153246@lists.php.net to get a copy of this message
From:             
Operating system: Linux
PHP version:      5.3.3
Package:          Reproducible crash
Bug Type:         Bug
Bug description:print out of Zend_Form causing segmentation fault

Description:
------------
Our real application is crashing with signal 11. I was able to simplify the
code to following test code which is far from our real application, but
causes crash in the same kind of code construction: echo is_null($form) ?
'':  $form;
 
I am able to reproduce this crash with PHP 5.3.3 and PHP 5.2.14. 
It does not crash when runnig in CLI mode.

How to run:
1. configure include path to contain Zend library (I was testing with
http://framework.zend.com/svn/framework/standard/tags/release-1.10.6/library/Zend)
2. restart apache
3. point your browser to bug.php

Test script:
---------------
set_include_path('.' . PATH_SEPARATOR . '/var/www/library');
require 'Zend/Form.php';
class TestClass {
	function crash() {
		$form = new Zend_Form();
		echo is_null($form) ? '':  $form;
		// it works if there echo instead of die() here
		die("this ends with signal 11 SIGSEGV, returns HTTP code 500");
	}
}
$test = new TestClass();
$test->crash();

Expected result:
----------------
the program should die and print out message "this ends with signal 11
SIGSEGV, returns HTTP code 500"

Actual result:
--------------
HTTP response code 500 returned and signal 11 SIGSEGV logged

-- 
Edit bug report at http://bugs.php.net/bug.php?id=52565&edit=1
-- 
Try a snapshot (PHP 5.2):            http://bugs.php.net/fix.php?id=52565&r=trysnapshot52
Try a snapshot (PHP 5.3):            http://bugs.php.net/fix.php?id=52565&r=trysnapshot53
Try a snapshot (trunk):              http://bugs.php.net/fix.php?id=52565&r=trysnapshottrunk
Fixed in SVN:                        http://bugs.php.net/fix.php?id=52565&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52565&r=needdocs
Fixed in release:                    http://bugs.php.net/fix.php?id=52565&r=alreadyfixed
Need backtrace:                      http://bugs.php.net/fix.php?id=52565&r=needtrace
Need Reproduce Script:               http://bugs.php.net/fix.php?id=52565&r=needscript
Try newer version:                   http://bugs.php.net/fix.php?id=52565&r=oldversion
Not developer issue:                 http://bugs.php.net/fix.php?id=52565&r=support
Expected behavior:                   http://bugs.php.net/fix.php?id=52565&r=notwrong
Not enough info:                     http://bugs.php.net/fix.php?id=52565&r=notenoughinfo
Submitted twice:                     http://bugs.php.net/fix.php?id=52565&r=submittedtwice
register_globals:                    http://bugs.php.net/fix.php?id=52565&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52565&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52565&r=dst
IIS Stability:                       http://bugs.php.net/fix.php?id=52565&r=isapi
Install GNU Sed:                     http://bugs.php.net/fix.php?id=52565&r=gnused
Floating point limitations:          http://bugs.php.net/fix.php?id=52565&r=float
No Zend Extensions:                  http://bugs.php.net/fix.php?id=52565&r=nozend
MySQL Configuration Error:           http://bugs.php.net/fix.php?id=52565&r=mysqlcfg



Thread (9 messages)

« previous php.bugs (#153246) next »