This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Possible memory-eating bug in egcs-1.0.1


First of all: apologies if this is old hat. I leafed through the
egcs-bugs archive without finding anything.

I seem to have found a problem with egcs-c++-1.0.1. My setup is:

Intel 586, 120MHz, 32MB ram, about 40MB swap.
Linux RedHat 5.0, glibc-2.0.6, egcs-1.0.1, everything installed from
binary distributions (rpm files).

The case is the following:

I'm trying to compile the LyX document processor, which is C++ and uses
the XForms library.

One of the source files I have been able to compile with gcc 2.7.2.3 and
also with egcs-1.0. However, with this source file egcs-1.0.1 chews on
the file for a long time, and then suddenly starts eating the memory
at a high rate.

The source file is a bit of a beast. It contains one function which is
more than 2000 lines of code, and it includes around 40 header files.
Therefore I haven't even tried to see if the problem is due to a smaller
part of the source.

The call to the compiler is:

        gcc -c  -g -O2 -I. -I. -I../images   -I/usr/X11R6/include lyxfunc.C

The memory usage (from 'ps l') shows that the SIZE
of cc1plus quickly rises to about 10MB and then slowly increases to
about 15MB. At this point it suddenly takes off and very soon eats
up all available memory. RSS always lags behind SIZE by 1.5-2 MB.

The effect is the same if I remove the -g option, but goes away if I
compile without -O2.


Now, is there anything I can do to help tracking down this (if it's not
already been found)? I haven't been able to reproduce this with any other
source, though I've compiled the Linux kernel, Wine, and the QT library.
The offending LyX file is in the LyX-0.12.0 version, and is called

        lyx-0.12.0/src/lyxfunc.C


Hope this helps. Let me know if I can do more.


Thomas



-------------------------------------------------------------------------
Thomas Huld
European Commission - Joint Research Centre - Ispra Site(IT)
T.P.723                 
I-21020 Ispra                | Insofar as my employer has coherent
Absurdistan                  | opinions they are unlikely to be mine
tel. +39 (0)332 785273
fax. +39 (0)332 785869
e-mail: thomas.huld@jrc.it 

Bureaucarcinoma: a terminal disease which afflicts research institutions.
Braindeath occurs when the administration staff reaches 50% of total.
-------------------------------------------------------------------------






Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]