This is the mail archive of the gcc-prs@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]

c++/162: Re: Seems like an exception bug in GCC 2.95.2



>Number:         162
>Category:       c++
>Synopsis:       Seems like an exception bug in GCC 2.95.2
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    unassigned
>State:          analyzed
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 01 22:36:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Iggy Veresov <iggy@homepage.ru>
>Release:        2.95.3 19991030
>Organization:
Chaos Hack Labz.
>Environment:
>Description:
 Original-Message-ID: <38E6AD08.F5CC52AF@homepage.ru>
 Date: Sun, 02 Apr 2000 02:14:32 +0000

 [MvL: Bug is fixed in 2.96 20000401. It occurs only with -O2]

 The following program drops core after about 500000 iterations:

 #include <iostream.h>

 class X { };

 int
 main (int argc, char **argv)
 {
   int i = 0;
   while (1) {
     i++;
     if (i % 100000 == 0) cout << i << " iterations\n" << flush;
     try {
       throw X ();
     }
     catch (...) { }
   }
 }    

 Tracing its stack gives us:

 Program terminated with signal 11, Segmentation fault.
 Reading symbols from /lib/libm.so.6...done.
 Reading symbols from /lib/libc.so.6...done.
 Reading symbols from /lib/ld-linux.so.2...done.
 #0  0x8050957 in extract_cie_info (f=0x8054f84, c=0xbf800104) at
 ./frame.c:626
 626         {
 (gdb) bt
 #0  0x8050957 in extract_cie_info (f=0x8054f84, c=0xbf800104) at
 ./frame.c:626
 #1  0x8050f27 in __frame_state_for (pc_target=0x804a64d,
 state_in=0xbf800228) at ./frame.c:627
 #2  0x804f33f in next_stack_level (pc=0x804a64d, udata=0xbf800298,
 caller_udata=0xbf800228)
 #3  0x804f56c in throw_helper (eh=0x8058598, pc=0x804a64d,
 my_udata=0xbf800358, offset_p=0xbf800354)
 #4  0x804f78c in __throw ()
 #5  0x804a64e in main ()
 #6  0x4004e1eb in __libc_start_main (main=0x804a5c0 <main>, argc=1,
 argv=0xbffff8e4, init=0x804a054 <_init>, fini=0x80532dc <_fini>,
     rtld_fini=0x4000a610 <_dl_fini>, stack_end=0xbffff8dc) at
 ../sysdeps/generic/libc-start.c:90


 There must be some kind of memory leak, because it tends to grow from
 500k to 8M.


 Operating system is RedHat 5.1; kernel 2.2.14, glibc 2.1.2

 -- 
 /ig, 
 mailto:iggy@homepage.ru,
 http://www.homepage.ru/~iggy

>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:

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