This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
EH, x86, optimizations and memory leaks
- To: egcs at cygnus dot com
- Subject: EH, x86, optimizations and memory leaks
- From: Manush Dodunekov <manush at litecom dot se>
- Date: Thu, 26 Nov 1998 17:52:47 +0100 (CET)
- Organization: LiteCom Interactive
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.
egcs is configured with --enable-threads on an i686-pc-linux-gnu
(redhat 5.2 with glibc 2.0.7)
Last time tried with egcs 1.1.1 prerelease 3, but older versions
behaved the same way.
Any ideas on what I can do to avoid this? Or should I just forget about
mixing EH and optimizations?
------------------------------------------
Manush Dodunekov / LiteCom Interactive
manush@litecom.se, http://www.litecom.se
------------------------------------------