Bug #68057 [Opn]: Incorrect parsing of big arrays in PHP 5.6.0

From: Date: Fri, 19 Sep 2014 18:25:15 +0000
Subject: Bug #68057 [Opn]: Incorrect parsing of big arrays in PHP 5.6.0
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187610@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68057&edit=1 ID: 68057 User updated by: vostreltsov at gmail dot com Reported by: vostreltsov at gmail dot com Summary: Incorrect parsing of big arrays in PHP 5.6.0 Status: Open Type: Bug Package: Arrays related Operating System: Linux PHP Version: 5.6.0 Block user comment: N Private report: N New Comment: Forgot to mention that the problem appeared after upgrading from 5.5.X (don't remember the exact version) to 5.6.0. Previous Comments: ------------------------------------------------------------------------ [2014-09-19 18:20:54] vostreltsov at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=68057&edit=1

« previous php.bugs (#187610) next »