Bug #55031 [NEW]: php exits (with code 0) on 'new ReflectionClass(X)'
| From: | ajrattink at correct dot net | Date: | Fri, 10 Jun 2011 19:00:30 +0000 |
| Subject: | Bug #55031 [NEW]: php exits (with code 0) on 'new ReflectionClass(X)' | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-161287@lists.php.net to get a copy of this message | ||
From:
Operating system: Linux 2.4.25
PHP version: 5.3.6
Package: Reflection related
Bug Type: Bug
Bug description:php exits (with code 0) on 'new ReflectionClass(X)'
Description:
------------
Creating a working example failed. And we have a codebase of >10MB
phpcode.
But these are the exact conditions of the failure:
We have a class B that extends A. Both have a method f() but they differ
such that a syntaxcheck would say this:
Strict Standards: Declaration of B::f() should be compatible with that of
A::f().
However B is loaded using __autoload('B'), normally.
Now we say (without B loaded)
$a = new ReflectionClass('B');
And php exits with code 0. No logging, no error, no Exception, no SEGV.
some added debugprints in reflection_class_object_ctor() show this:
ARA: reflection_class_object_ctor entry
ARA: calling getThis
ARA: name:'MO_KieskeurigExporter', calling zend_lookup_class
And I never return from zend_lookup_class!
Unfortunately putting a print in there probably floods the system here.
Working around the bug is much easier than debugging it. But maybe someone
more knowledgeable than me knows where that exit(0); call is parked??
Test script:
---------------
Not reproducable.
Expected result:
----------------
I accept an ReflectionException to be thrown. This does happen if I change
the classname, so it truly cannot be found. Also, if I fix the method to
match the superclass' one, everything is fine as well.
Actual result:
--------------
php exits with code 0.
However a minimal example attempt worked perfectly ok.
--
Edit bug report at http://bugs.php.net/bug.php?id=55031&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=55031&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=55031&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=55031&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=55031&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=55031&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=55031&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=55031&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=55031&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=55031&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=55031&r=support
Expected behavior: http://bugs.php.net/fix.php?id=55031&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=55031&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=55031&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=55031&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=55031&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=55031&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=55031&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=55031&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=55031&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=55031&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=55031&r=mysqlcfg