Bug #51425 [Opn->Fbk]: segfaults at method_exists()

[email protected] Mon, 29 Mar 2010 15:36:50 +0200 (CEST)
Newsgroups php.bugs
Message-ID <[email protected]>
Edit report at http://bugs.php.net/bug.php?id=51425&edit=1

 ID:               51425
 Updated by:       [email protected]
 Reported by:      jimmyxx at gmail dot com
 Summary:          segfaults at method_exists()
-Status:           Open
+Status:           Feedback
 Type:             Bug
 Package:          Class/Object related
 Operating System: Ubuntu 9.10
 PHP Version:      5.2.13

 New Comment:

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.




Previous Comments:
------------------------------------------------------------------------
[2010-03-29 14:59:44] jimmyxx at gmail dot com

Description:
------------
Hi,

This bug has occurred on 3 separate projects all using the same in house
PHP 
framework. All 3 changes that occurred just before the apps started
sefgaulting 
are very different but on each occasion the segfault can be traced back
to 
method_exists() which features in the frameworks URL parser. 

The method_exists() in all 3 cases was being called with valid arguments
and 
should have returned true.

In one project PHP started segfaulting when an object that has been
unseralized 
from memcache was accessed.

On another project (the one i've been fighting with all day) PHP started

segfaulting when an extra class was added in to the OO extends daisy
chain. (eg 
instead of: class a extends x {} it now reads class a extends y {} and
class y 
extends x {} - class Y can be a blank class and it still causes the
segfault..).

For the project mentioned immediately above I've tried taking the url
parser, 
and all related files out so I could run a controlled test and when run

independently it works absolutely fine which makes me think
method_exists is a 
red-herring and something else is causing method_exists to segfault.

Also it's worth mentioning that the urlparser works fine and is used on
many 
high-traffic websites. It's also called very near the top of the url
parsers 
code and the couple of bits above are trivial and won't be related.

I've never managed to figure out why method_exists segfaults and I've
always had 
to work around the bug - finding what change was made just before it
started 
segfaulting and simply finding a different solution.

Can anyone help me in figuring out what's going on here? Or what
method_exists 
does that could cause it segfault (ie: is PHP running out of file
handles or 
something?)

Any help would be much appreciated.



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51425&edit=1