|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
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-2021 The PHP Group
All rights reserved.
Last updated: Tue Mar 09 08:01:24 2021 UTC