Bug #74015 [Csd]: ReflectionClass::getInterfaceNames wrong entry with random memory location

From: Date: Mon, 15 May 2017 15:00:53 +0000
Subject: Bug #74015 [Csd]: ReflectionClass::getInterfaceNames wrong entry with random memory location
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209136@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74015&edit=1 ID: 74015 Updated by: ab@php.net Reported by: uli dot hecht at gmail dot com Summary: ReflectionClass::getInterfaceNames wrong entry with random memory location Status: Closed Type: Bug Package: Reflection related Operating System: Windows PHP Version: 7.1.1 Assigned To: ab Block user comment: N Private report: N New Comment: Thanks for checking. Unfortunately there's no way for these fixes to land in lower PHP versions, as the changes are breaching. In between, there are already vc15 Apache builds provided by apachelounge.com, which are usable with our current master builds. Thus looking forward to PHP 7.2, that's it. Thanks. Previous Comments: ------------------------------------------------------------------------ [2017-05-10 06:16:10] uli dot hecht at gmail dot com Sorry, when you asked to check the latest master snapshot, I thought I'll get it here: http://windows.php.net/snapshots/ . Your linked snapshot works. However, the current stable PHP 7.1.5 still has this problem. Are there any further steps required by me? After you closed the bug, I thought everything is done and the next stable release will contain the fix. ------------------------------------------------------------------------ [2017-03-29 12:20:28] ab@php.net The fix for this bug has been committed. 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/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Please check master snapshots. ------------------------------------------------------------------------ [2017-03-27 18:35:05] ab@php.net I was asking explicitly about master,something like here http://windows.php.net/downloads/snaps/master/r5096a42/ . Please note, that latest were also to fetch from the windows.php.net page. We've recently switched to vc15, so you should be aware to fetch some of the previous vc14 master snap after the date i've asked 2017-03-08. Thanks. ------------------------------------------------------------------------ [2017-03-27 05:42:19] uli dot hecht at gmail dot com I tried with the snapshot of March, 14th (7.1.4-dev) and can still reproduce this. I'm also using Apache benchmark now, thanks Jeffrey for the great hint - didn't even know about this tool. ------------------------------------------------------------------------ [2017-03-23 19:11:26] jeffrey dot haley at gmail dot com Was able to reproduce this issue running under 7.0.17 with Windows 7 and the latest 7.0 snapshot master as of today 3/23/17 (php-7.0-ts-windows-vc14-x64-r1517fdb. Environment - Windows 7 x64 - Apache 2.4.23 win64 VC14 (from apachelounge.com) - php-7.0.17-Win32-VC14-x64 (also tried 7.0-ts-windows-vc14-x64-r1517fdb) ------------------------------------------------------------------ test.php ------------------------------------------------------------------ // Test data class DUMMY implements \Serializable, \IteratorAggregate, \Countable, \ArrayAccess { public function serialize() {} public function unserialize($serialized) {} public function getIterator() {} public function offsetExists($offset) {} public function offsetGet($offset) {} public function offsetSet($offset, $value) {} public function offsetUnset($offset) {} public function count() {} } // Provoke error $cls = new \ReflectionClass('\DUMMY'); foreach ($cls->getInterfaceNames() as $interfaceName) { class_implements($interfaceName); // Failure here } Occurs under load as described, I simulated this with the Apache benchmark tool: ab -c 100 -n 10000 "http://localhost/test.php" Following error occurs in the error log: PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 8318823012549873016 bytes) in D:\development\test.php on line 23 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=74015 -- Edit this bug report at https://bugs.php.net/bug.php?id=74015&edit=1

« previous php.bugs (#209136) next »