Req #61549 [ReO->Csd]: 2GB string size limit is too small
| From: | dmitry@php.net | Date: | Mon, 06 Apr 2015 15:22:23 +0000 |
| Subject: | Req #61549 [ReO->Csd]: 2GB string size limit is too small | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-191850@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61549&edit=1
ID: 61549
Updated by: dmitry@php.net
Reported by: tstarling@php.net
Summary: 2GB string size limit is too small
-Status: Re-Opened
+Status: Closed
Type: Feature/Change Request
Package: Scripting Engine problem
Operating System: any
PHP Version: master
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
Implemented in PHP-7 (only in 64-bit version of course).
Previous Comments:
------------------------------------------------------------------------
[2012-03-31 11:57:21] tstarling@php.net
It's not quite as simple as changing the type of zvalue_value.str.len. String sizes are assumed
to be ints or unsigned ints in lots of other interfaces, perhaps most notably
zend_parse_parameters().
------------------------------------------------------------------------
[2012-03-31 01:46:13] yohgaki@php.net
I think this is good changes for next PHP release.
------------------------------------------------------------------------
[2012-03-31 01:45:20] yohgaki@php.net
Re-opened as feature request.
String size is limited by zvalue due to "signed int" for string length. 2GB
string size limit is too small for today. Memory is cheap and there many PC has
more than 8GB or more. It's simply too small for load large files, etc.
------------------------------------------------------------------------
[2012-03-30 10:26:27] yohgaki@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
------------------------------------------------------------------------
[2012-03-29 03:08:53] tstarling@php.net
Description:
------------
According to language.types.string.php: "Note: It is no problem for a string to become very
large. PHP imposes no boundary on the size of a string; the only limit is the available memory of
the computer on which PHP is running."
The incorrectness of this statement is growing as time goes on. Strings are limited to 2GB, which is
a small and ever-shrinking fraction of the memory available on a typical modern server.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61549&edit=1