#38217 [Opn->Csd]: ReflectionClass::newInstanceArgs() tries to allocate too much memory
| From: | tony2001@php.net | Date: | Wed, 26 Jul 2006 08:03:51 +0000 |
| Subject: | #38217 [Opn->Csd]: ReflectionClass::newInstanceArgs() tries to allocate too much memory | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-99900@lists.php.net to get a copy of this message | ||
ID: 38217
Updated by: tony2001@php.net
Reported By: alex at kiesel dot name
-Status: Open
+Status: Closed
Bug Type: Reproducible crash
Operating System: FreeBSD 6.0
PHP Version: 5CVS-2006-07-26 (CVS)
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2006-07-26 07:46:41] alex at kiesel dot name
Description:
------------
ReflectionClass::newInstanceArgs() tries to allocate huge pieces of
memory, the engine dies because allowed memory size is exceeded.
Omitting the empty constructor makes the problem go away, so it might
be related to that.
The error also occurs in PHP 5.1.4.
Reproduce code:
---------------
<?php
class Object {
public function __construct() {
}
}
$class= new ReflectionClass('Object');
var_dump($class->newInstanceArgs());
?>
Expected result:
----------------
PHP Warning: ReflectionClass::newInstanceArgs() expects exactly 2
parameters, 1 given in /usr/home/alex/reflection_newinstance.php
object(Object)#2 (0) {
}
Actual result:
--------------
PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried
to allocate 550152752 bytes) in
/usr/home/alex/reflection_newinstance.php on line 8
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38217&edit=1