Bug #52565 [Fbk->Opn]: print out of Zend_Form causing segmentation fault
| From: | martin dot minka at gmail dot com | Date: | Mon, 09 Aug 2010 08:43:20 +0000 |
| Subject: | Bug #52565 [Fbk->Opn]: print out of Zend_Form causing segmentation fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-153278@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52565&edit=1
ID: 52565
User updated by: martin dot minka at gmail dot com
Reported by: martin dot minka at gmail dot com
Summary: print out of Zend_Form causing segmentation fault
-Status: Feedback
+Status: Open
Type: Bug
Package: Reproducible crash
Operating System: Linux
PHP Version: 5.3.3
Block user comment: N
New Comment:
Thank you for quick reactions. I compiled PHP with debug enabled and
produced backtrace. It is attached in patch section.
Reproduce script is included in the original text. That exact script
crashes for me everytime.
Previous Comments:
------------------------------------------------------------------------
[2010-08-09 09:41:57] mike@php.net
IIRC there's a place in (older version of?) the ZF Form libs where
__toString() does not return a string, causing a unexpected SIGSEGV.
------------------------------------------------------------------------
[2010-08-09 09:29:28] pajoye@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
We also need a small reproduce script.
------------------------------------------------------------------------
[2010-08-09 00:30:49] rasmus@php.net
And the backtrace?
------------------------------------------------------------------------
[2010-08-09 00:25:49] martin dot minka at gmail dot com
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 this bug report at http://bugs.php.net/bug.php?id=52565&edit=1