|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51158 abnormal memory consumption during build of 5.3.1 (and 5.3.0)
Submitted: 2010-02-26 16:44 UTC Modified: 2010-02-26 16:50 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: stolen dot data dot net at gmail dot com Assigned:
Status: Wont fix Package: Compile Failure
PHP Version: 5.3.1 OS: openbsd
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: stolen dot data dot net at gmail dot com
New email:
PHP Version: OS:


 [2010-02-26 16:44 UTC] stolen dot data dot net at gmail dot com
tried to migrate from 5.2.10 to 5.3.1 today on my server running openbsd  
4.6. building php 5.3.1 (as well as 5.3.0) eats an abnormal amount of 
memory - far more than 750mb - actually leading to my machine being 
exhausted and crashing beyond recovery. it's equipped with 512mb of RAM 
and has 256mb of swap available, but even this was not enough. at a 
certain stage in compiling, all of it is consumed in less than 2-3 
seconds, even when running in single-user mode to have as much of the 
memory as possible free and available.

this does not happen with the 5.2.x branch (i even tried the latest 
5.2.13). it does not even come close to using 300mb of RAM during 
building, using the exact same configuration parameters.

Reproduce code:
./configure --prefix=/usr/opt/php --with-apxs=/usr/opt/apache/bin/apxs --enable-sqlite-utf8 --with-zlib --with-mcrypt --enable-mbstring --disable-xmlreader --disable-xmlwriter --without-pear --disable-libxml --disable-dom --disable-simplexml --disable-xml --disable-phar


Expected result:

Actual result:
beyond 750mb of ram required; machine crashes when swap memory is 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-26 16:50 UTC]
Sorry, optimizing memory during the build isn't something we can worry 
about.  Even my tiny $300 Netbook here has 2G of ram.  If you can't 
find a machine to build on with enough ram, you will have to build with 
-O0 which should make it build for you.  Of course, it won't be as 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Jul 04 04:05:46 2022 UTC