segmentation violation after exit()??

Hi all,

Currently, my program is running fine, except when it exits I
get a segmentation violation. I use gdb to look at the core dump, but
not too much information there.

Accidentally sent the unfinished post…

Here is the details from gdb.

Program terminated with signal 11, segmentation violation.
Reading symbols from /x86/lib/libc.so.2…done.
#0 0xb03a0da8 in ?? ()
(gdb) bt
#0 0xb03a0da8 in ?? ()
#1 0xb031b5cc in exit () from /x86/lib/libc.so.2
(gdb)

Anyone could give me some ideas on how to trace where the problem is?
Thanks and appreciate any help.


“kc” <kc@netnobound.com> wrote in message news:abokck$8kt$1@inn.qnx.com

Hi all,

Currently, my program is running fine, except when it exits I
get a segmentation violation. I use gdb to look at the core dump, but
not too much information there.

Can you give more details or perhaps post some code? Quite often that sort
of thing can happen with some sort of stack corruption. Do you have an
atexit handler? If you are allocating any stack variables, particularily
arrays, check the bounds of them. This might even be a job for the debug
malloc lib.

Kris

“kc” <kc@netnobound.com> wrote in message news:abokji$98a$1@inn.qnx.com

Accidentally sent the unfinished post…

Here is the details from gdb.

Program terminated with signal 11, segmentation violation.
Reading symbols from /x86/lib/libc.so.2…done.
#0 0xb03a0da8 in ?? ()
(gdb) bt
#0 0xb03a0da8 in ?? ()
#1 0xb031b5cc in exit () from /x86/lib/libc.so.2
(gdb)

Anyone could give me some ideas on how to trace where the problem is?
Thanks and appreciate any help.


“kc” <> kc@netnobound.com> > wrote in message news:abokck$8kt$> 1@inn.qnx.com> …
Hi all,

Currently, my program is running fine, except when it exits I
get a segmentation violation. I use gdb to look at the core dump, but
not too much information there.

kc <kc@netnobound.com> wrote:

Hi all,

Currently, my program is running fine, except when it exits I
get a segmentation violation. I use gdb to look at the core dump, but
not too much information there.

Do you have any destructors for global objects? They would run after
main exits.


cburgess@qnx.com

On 14 May 2002 06:46:54 GMT, Colin Burgess <cburgess@qnx.com> wrote:

kc <> kc@netnobound.com> > wrote:
Hi all,

Currently, my program is running fine, except when it exits I
get a segmentation violation. I use gdb to look at the core dump, but
not too much information there.

Do you have any destructors for global objects? They would run after
main exits.


cburgess@qnx.com

This may be totally irrelevant, but with QNX4, one would sometimes
get a message when exiting relating to NULL reference.
(*** NULL assignment detected)
Possibly QNX6 library is doing something similar?