From: Operating system: Debian GNU/Linux PHP version: 5.3.8 Package: *General Issues Bug Type: Bug Bug description:Negative memory (allocated -1119879168)
Description: ------------ Sample error on system with 4+ Gbyte memory: Fatal error: Out of memory (allocated -1119879168) (tried to allocate 1048581 bytes) in /usr/local/sbin/1/!testing0.php on line 13 Why displayed memory is negative? Int is using? Test script: --------------- <?php ini_set('memory_limit', '3072M'); ini_set('display_startup_errors',1); error_reporting(2045); ini_set('display_errors',1); $a = ""; for ($i = 0; $i < 1024; ++$i) $a .= chr($i%256); $b = ""; for ($i = 0; $i < 1024; ++$i) $b .= $a; $a = array(); for ($i = 0; $i < 4096; ++$i) $a[$i] = $b.$i; ?> -- Edit bug report at https://bugs.php.net/bug.php?id=60062&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60062&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60062&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60062&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=60062&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60062&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=60062&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=60062&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=60062&r=needscript Try newer version: https://bugs.php.net/fix.php?id=60062&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=60062&r=support Expected behavior: https://bugs.php.net/fix.php?id=60062&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=60062&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=60062&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=60062&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60062&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=60062&r=dst IIS Stability: https://bugs.php.net/fix.php?id=60062&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=60062&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=60062&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=60062&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=60062&r=mysqlcfg