|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-02-27 18:52 UTC] ms419 at freezone dot co dot uk
Description: ------------ http://cgi.sfu.ca/~jdbates/tmp/php/200902270/core I am experiencing a reproducible segfault. I experience it with PHP 5.2.4 and 5.2.6. The segfault occurs at this expression: strlen($repository) where $repository is an object with a __toString() method. By substituting this expression, the segfault does not occur: strlen($repository->__toString()) To try to debug this segfault, I compiled a recent 5.2 snapshot with --enable-debug. It produced the above linked core file, which I opened with gdb to print a backtrace: http://cgi.sfu.ca/~jdbates/tmp/php/200902270/screenlog I am not sure what should be my next steps to help fix this segfault? PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
We have also tracked down a segfault which appears to be directly related to this. <?=html_entity_decode($form->getElement('query'))?> where $form is a Zend_Form object from Zend Framework. Not able to reproduce it out of context but within the context of the site happens almost 100% of the time. Removing html_entity_decode() fixes the segfault, as does casting (string) on the $form, or calling $form->render(). The implicit call to __toString() appears to be the root cause of this problem.