Bug #74380 [Com]: Reflexion try to allocate 8791646535632 bytes
Edit report at https://bugs.php.net/bug.php?id=74380&edit=1
ID: 74380
Comment by: nicolas dot gourdeau at orange dot com
Reported by: nicolas dot gourdeau at orange dot com
Summary: Reflexion try to allocate 8791646535632 bytes
Status: Feedback
Type: Bug
Package: Reflection related
Operating System: windows 7 Pro SP1
PHP Version: 7.1.3
Block user comment: N
Private report: N
New Comment:
I have some debug, it is link to the same issue, sometimes when i ask for a class intarface name
thru reflextion, I get a strange name: "#\s*\r?\n \* +#"
object(ReflectionClass)#10 (1) {
["name"]=>
string(45) "Symfony\Component\HttpFoundation\ParameterBag"
}
["name"]=>
string(45) "Symfony\Component\HttpFoundation\ParameterBag"
["notice"]=>
array(0) {
}
["len"]=>
int(8)
["ns"]=>
string(8) "Symfony\"
["parent"]=>
bool(false)
["parentInterfaces"]=>
array(1) {
["#\s*\r?\n \* +#"]=>
int(1)
}
["deprecatedInterfaces"]=>
array(0) {
}
["interface"]=>
string(15) "#\s*\r?\n \* +#"
}
I'm trying to do a simple reproducing script.
Previous Comments:
------------------------------------------------------------------------
[2017-04-06 10:13:31] krakjoe@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2017-04-06 10:10:05] nicolas dot gourdeau at orange dot com
Description:
------------
Php Version:
PHP 7.1.3 (cli) (built: Mar 14 2017 23:33:39) ( ZTS MSVC14 (Visual C++ 2015) x64 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.3, Copyright (c) 1999-2017, by Zend Technologies
Contexte: Symfony3 - Mode: Dev
Symfony3 process php code with reflexion. During this process this error happend often but not
everytime:
OutOfMemoryException in DebugClassLoader.php line 204:
Error: Allowed memory size of 8589934592 bytes exhausted (tried to allocate 8791646535632 bytes)
$refl = new \ReflectionClass($class);
foreach ($refl->getInterfaceNames() as $interface) {
class_implements($interface); => generate the error
}
Test script:
---------------
I did not sucess to reproduce the bug out of symfony3 context
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74380&edit=1
Thread (4 messages)