This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: EH, x86, optimizations and memory leaks
- To: Manush Dodunekov <manush at litecom dot se>
- Subject: Re: EH, x86, optimizations and memory leaks
- From: Martin Kahlert <martin dot kahlert at mchp dot siemens dot de>
- Date: Fri, 27 Nov 1998 08:36:42 +0100
- Cc: egcs at cygnus dot com
- References: <Pine.LNX.4.05.9811261736070.27131-100000@pulse.litecom.net>
- Reply-To: martin dot kahlert at mchp dot siemens dot de
Quoting Manush Dodunekov (manush@litecom.se):
>
> The following code:
>
> struct Test {};
>
> int main(void)
> {
> while(true) {
> try {
> throw Test();
> } catch(Test& t) {
> }
> }
> return 0;
> }
>
> works as it should (just eats cpu until it's killed) when compiled with no
> optimizations.
>
> However, when compiled with -O1 or higher, the same code keeps eating
> memory until the computer swaps itself to death.
On my 686-pc-linux-gnulibc1 system, it even segfaults after a while
(first it consumes 2-3MB of RAM).
> Last time tried with egcs 1.1.1 prerelease 3, but older versions
> behaved the same way.
I tried with 1.1.1pre3 and egcs-2.92.23 (snapshot 19981122).
Bye,
Martin.
--
Your mouse has moved. Windows must be restarted for the change
to take effect. Reboot now?