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

From: Date: Thu, 12 Oct 2006 09:57:02 +0000
Subject: #39132 [Opn->Fbk]: integer overflow in memory_limit with memory >= 2GB.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-103465@lists.php.net to get a copy of this message
ID: 39132 Updated by: tony2001@php.net Reported By: php at vicaya dot com -Status: Open +Status: Feedback Bug Type: Unknown/Other Function Operating System: Linux 64-bit PHP Version: 5.1.6 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2006-10-12 08:05:22] derick@php.net Yes, it's using a size_t which AFAIK is limited to 32bit on most systems. ------------------------------------------------------------------------ [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

« previous php.bugs (#103465) next »