Edit report at http://bugs.php.net/bug.php?id=52565&edit=1
ID: 52565 Updated by: [email protected] Reported by: martin dot minka at gmail dot com Summary: print out of Zend_Form causing segmentation fault -Status: Open +Status: Feedback Type: Bug Package: Reproducible crash Operating System: Linux PHP Version: 5.3.3 Block user comment: N New Comment: Ah sorry, I did not see the attachment. However ZF is not exactly a small self contained reproduce script. I would suggest to either try to debug it or ask the ZF devs to debug. Maybe you are experiencing Mike's issue as well. Previous Comments: ------------------------------------------------------------------------ [2010-08-09 10:43:19] martin dot minka at gmail dot com 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. ------------------------------------------------------------------------ [2010-08-09 09:41:57] [email protected] 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] [email protected] 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] [email protected] 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
