Bug #68057 [NEW]: Incorrect parsing of big arrays in PHP 5.6.0
| From: | vostreltsov at gmail dot com | Date: | Fri, 19 Sep 2014 18:20:55 +0000 |
| Subject: | Bug #68057 [NEW]: Incorrect parsing of big arrays in PHP 5.6.0 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-187609@lists.php.net to get a copy of this message | ||
From: vostreltsov at gmail dot com
Operating system: Linux
PHP version: 5.6.0
Package: Arrays related
Bug Type: Bug
Bug description:Incorrect parsing of big arrays in PHP 5.6.0
Description:
------------
So in my project I have an auto-generated lexer, it contains a big
array. I created a simplified script that reproduces the bug.
There are 65538 integers and it looks like something overflows inside
PHP. The var_dump call ouputs an array of only the last 2 numbers.
Removing last 2 numbers yields an empty array.
If I remove last 3 numbers, the output stops at key 32766, that is 32767
values.
Test script:
---------------
http://filebin.ca/1atoDItGZU2A
Expected result:
----------------
All of 65538 integers
Actual result:
--------------
array(2) {
[0]=>
int(0)
[1]=>
int(0)
}
--
Edit bug report at https://bugs.php.net/bug.php?id=68057&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68057&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68057&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68057&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68057&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68057&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68057&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68057&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68057&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68057&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68057&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68057&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68057&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68057&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68057&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68057&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68057&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68057&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68057&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68057&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68057&r=mysqlcfg