From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Lipe To: law@cygnus.com Cc: "H.J. Lu" , acs@acm.org, egcs@cygnus.com, jason@cygnus.com Subject: Re: 1008 segfaults in genattr Date: Fri, 21 Nov 1997 21:50:00 -0000 Message-id: <19971121234907.48822@dgii.com> References: <1586.880174157@cygnus.com> X-SW-Source: 1997-11/msg00707.html > 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