segmentation violation after exit()??

bridged with qdn.public.qnxrtp.porting
Post Reply
kc

segmentation violation after exit()??

Post by kc » Mon May 13, 2002 3:15 pm

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

Re: segmentation violation after exit()??

Post by kc » Mon May 13, 2002 3:19 pm

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.

Kris Warkentin

Re: segmentation violation after exit()??

Post by Kris Warkentin » Mon May 13, 2002 3:35 pm

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.


Colin Burgess

Re: segmentation violation after exit()??

Post by Colin Burgess » Tue May 14, 2002 6:46 am

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

Alex Cellarius

Re: segmentation violation after exit()??

Post by Alex Cellarius » Tue May 14, 2002 7:26 pm

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?

Post Reply

Return to “qdn.public.qnxrtp.porting”