#39132 [Opn]: integer overflow in memory_limit with memory >= 2GB.

From: Date: Thu, 12 Oct 2006 08:05:23 +0000
Subject: #39132 [Opn]: integer overflow in memory_limit with memory >= 2GB.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-103461@lists.php.net to get a copy of this message
 ID:               39132
 Updated by:       derick@php.net
 Reported By:      php at vicaya dot com
 Status:           Open
 Bug Type:         Unknown/Other Function
 Operating System: Linux 64-bit
 PHP Version:      5.1.6
 New Comment:

Yes, it's using a size_t which AFAIK is limited to 32bit on most
systems.


Previous Comments:
------------------------------------------------------------------------

[2006-10-12 03:17:37] php at vicaya dot com

Description:
------------
Looks like memory_limit is kept using a 32-bit signed integer even with
php compiled on 64-bit Linux.

Reproduce code:
---------------
set memory_limit to -1 or >= 2048M

<?= count(file("a_big_file")) ?>

Expected result:
----------------
number of lines in "a_big_file".

Actual result:
--------------
"Integer overflow in memory_limit check detected"


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39132&edit=1


Thread (5 messages)

« previous php.bugs (#103461) next »