Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 128806 - cc1plus tries to allocate nearly 4GB when compiling cvcl
cc1plus tries to allocate nearly 4GB when compiling cvcl
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2004-07-29 15:27 EDT by Jerry James
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-02 09:33:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Preprocessed parsePL.cpp (bzip2ed) (125.97 KB, application/octet-stream)
2004-07-29 16:03 EDT, Jerry James
no flags Details

  None (edit)
Description Jerry James 2004-07-29 15:27:44 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510

Description of problem:
Compilation of cvcl 1.1.0 fails with this error:

g++ -O2 -Wall -I/tmp/cvcl-1.1.0/src/include -I/tmp/cvcl-1.1.0 -I. -c

cc1plus: out of memory allocating 3906815220 bytes after a total of
18948096 bytes

Compiling with -O2 -fno-default-inline succeeds.  The file in question
is generated by bison.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Download and unpack cvcl-1.1.0.tar.gz
2. In the cvcl-1.1.0 directory, run ./configure
3. make

Actual Results:  When compilation reaches the file in question, it
attempts to allocate more memory than is available and fails.

Expected Results:  GCC should not fail, although what it could do in
this situation depends on why it is trying to allocate so much memory.

Additional info:

To compile with -fno-default-inline, do:
make OPTFLAGS='-O2 -fno-default-inline'
Comment 1 Jakub Jelinek 2004-07-29 15:41:00 EDT
Please provide a preprocessed source which triggers this.
(run the above command with additional -save-temps option and
attach here parsePL.ii it creates.
Comment 2 Jerry James 2004-07-29 16:03:15 EDT
Created attachment 102299 [details]
Preprocessed parsePL.cpp (bzip2ed)

I had to compress it because bugzilla complained the attachment was too large.
Comment 3 Jakub Jelinek 2004-08-02 09:33:40 EDT
Exception handling in this testcase increases number of basic blocks
from around 34000 to 176000.  Some algorithms in GCC are Ospace(nBB^2),
thus your testcase is too big.
What you can do is tweak the inline limits (see man gcc on --param)
so that less inlining happens.
GCC 3.4 has better inlining algorithm, but it is too invasive change
for GCC 3.3.  FC3t1 uses GCC 3.4.x, so you might try your fortune there.

Note You need to log in before you can comment on or make changes to this bug.