Bug 29556 - gcc got killed during C++ compilation
gcc got killed during C++ compilation
Status: CLOSED NEXTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.1
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-02-26 10:35 EST by Need Real Name
Modified: 2007-04-18 12:31 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-04 16:23:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
ii file from gcc (540.31 KB, text/plain)
2001-02-27 10:29 EST, Need Real Name
no flags Details
gcc output (1.44 KB, text/plain)
2001-02-27 10:38 EST, Need Real Name
no flags Details

  None (edit)
Description Need Real Name 2001-02-26 10:35:21 EST
This bug could (is probably) related to BUG ID:29346 

If you try to compile avifile (a DivX video player, http://divx.euro.ru/),
gcc will take a LONG LONG time to compile some files and will crash if you
don't have enough memory. FYI, I check (with top) the amount of memory gcc
was using during the compilation and it reached 450M!!! At the same time I
used strace on the process and gcc was doing multiple brk.

Finally the file is compiled correctly but it takes too long compared to
other c++ compiler. It could be a bug in the software (divx I mean) but I
do not think that gcc has to take 450M of memory to compile 1 file.
Comment 1 Jakub Jelinek 2001-02-26 11:29:15 EST
I've fixed in gcc-c++-2.96-76 a problem with inlining on trees where it could
eat excessive amounts of memory (found in mozilla), maybe this is the same.
Can you please pick one source file which eats a lot of memory to compile
and post here the exact command line, add -save-temps -v to it and attach here
the resulting .ii file?
Comment 2 Need Real Name 2001-02-26 12:03:33 EST
I could not reproduce the bug at work. I will have to find out why it is so long
on my machine at home. It is probably an issue with the upgrade process.
I will send my findings ASAP.
Comment 3 Need Real Name 2001-02-27 10:29:25 EST
Created attachment 11180 [details]
ii file from gcc
Comment 4 Need Real Name 2001-02-27 10:37:00 EST
Ok, I was able to reproduce the bug at work too.
Here is my command line:

c++ -DHAVE_CONFIG_H -I. -I. -I../../include -g -O2 -march=i586
-I/usr/X11R6/include -I/usr/include/SDL -D_REENTRANT -w -I- -I. -I../../include
-Iloader -Iloader/wine -Ivideocodec -Iaudiodec -IDirectShow -save-temps -v -c
libwin32.cpp  -fPIC -DPIC -o libwin32.lo

FYI, the program uses libtool. Notice the -O2.
Then, cpp preprocesses the file and after that cc1plus is launched automatically
like that with the .ii file:

/usr/lib/gcc-lib/i386-redhat-linux/2.96/cc1plus libwin32.ii -quiet -dumpbase
libwin32.cpp -march=i586 -g -O2 -w -version -fPIC -o libwin32.s

This process takes forever and eats a lot of memory... If you remove the -O2 in
the command line, it runs smoothly!

Hope this help. If you want more informations, please let me know.

Mathieu.

PS: I attached the output of gcc
Comment 5 Need Real Name 2001-02-27 10:38:48 EST
Created attachment 11181 [details]
gcc output
Comment 6 Need Real Name 2001-02-27 11:27:40 EST
I just installed gcc 2.96-76, same thing, doesn't work...

Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-76)
Comment 7 Need Real Name 2001-03-12 12:27:10 EST
I installed gcc 2.96 77.1 last week and now it works.

Thanks.
Comment 8 Need Real Name 2001-03-17 20:52:49 EST
I am seeing this exact same problem (hanging when compiling libwin32.cpp) with
2.96-78 - if it worked in 77.1 something must have changed in 78. 78 does fix
the problem reported as bug 28385/31937 (hang compiling Mozilla), but avifile
still doesn't compile.
Comment 9 Jakub Jelinek 2001-09-06 12:52:08 EDT
Actually, since 2.96-81 gcc throttles inlining.
Comment 10 Bill Nottingham 2006-08-04 16:23:02 EDT
Red Hat Linux and Red Hat Powertools are currently no longer supported by Red
Hat, Inc. In an effort to clean up bugzilla, we are closing all bugs in MODIFIED
state for these products.

However, we do want to make sure that nothing important slips through the
cracks. If, in fact, these issues are not resolved in a current Fedora Core
Release (such as Fedora Core 5), please open a new issues stating so. Thanks.

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