1008 segfaults in genattr
Robert Lipe
robertl@dgii.com
Fri Nov 21 21:50:00 GMT 1997
> So apparently the code is supposed to handle this. I think we need to
> debug _why_ the code is failing when it gets called the second time.
I'm not seeing __do_global_dtors_aux() called twice, but I think the UW
dude is.
$ gdb a.out
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.14-95q4 (i486-unknown-sco3.2v5.0.0elf),
Copyright 1995 Free Software Foundation, Inc...
Breakpoint 1 at 0x8048540
(gdb) break __do_global_dtors_aux
Breakpoint 2 at 0x8048658
(gdb) run
Starting program: /home/play/junk/gcc/a.out
Breakpoint 1 at 0x8003ded9
++count
++count
Base
--count
Breakpoint 2, 0x8048658 in __do_global_dtors_aux ()
(gdb) cont
Continuing.
--count
--count
Breakpoint 1, 0x8003ded9 in abort ()
(gdb)
(gdb) break exit
Breakpoint 3 at 0x800196c4
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/play/junk/gcc/a.out
++count
++count
Base
--count
Breakpoint 3, 0x800196c4 in exit ()
(gdb) where
#0 0x800196c4 in exit ()
#1 0x8048634 in .text ()
(gdb) cont
Continuing.
Breakpoint 2, 0x8048658 in __do_global_dtors_aux ()
(gdb) where
#0 0x8048658 in __do_global_dtors_aux ()
#1 0x804ab91 in _fini ()
#2 0x800196d6 in exit ()
(gdb) cont
Continuing.
--count
--count
Breakpoint 3, 0x800196c4 in exit ()
(gdb) where
#0 0x800196c4 in exit ()
During symbol reading, DIE @ 0x3ae "this", type modifier 'const' ignored.
During symbol reading,
DIE @ 0x6a3 "__vtbl_ptr_type", type modifier 'const' ignored.
During symbol reading, DIE @ 0x76b "base_ref", type modifier 'const' ignored.
#1 0x8048877 in D::~D () at /tmp/p.C:30
#2 0x80487ad in global destructors keyed to bail () at /tmp/p.C:47
#3 0x8048677 in __do_global_dtors_aux ()
#4 0x804ab91 in _fini ()
#5 0x800196d6 in exit ()
(gdb) cont
Continuing.
Breakpoint 1, 0x8003ded9 in abort ()
(gdb)
I rebuilt crtstuff with your new global_dtors (after adding a missing
semicolon) and it seemed to make no different for the OpenServer case.
This could well be the ticket on Unixware 2, though...
RJL
More information about the Gcc
mailing list