Ivan Gotovchits <iv*************@auriga.ruwrote:
pycraze wrote:
i am working on NetBSD 3.0.2 with gcc version 3.3.3 .
While debugging with gdb, i am getting a segmentation fault with
accept system call and gdb is showing following traceback.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1229071456 (LWP 8798)]
0x00766402 in __kernel_vsyscall ()
(gdb) bt
#0 0x00766402 in __kernel_vsyscall ()
#1 0x00df4d88 in accept () from /lib/libpthread.so.0
#2 0x08057799 in run_server () at server.c:150
#3 0x08057f82 in main (argc=1, argv=0xbfbf5064) at main.c:160
Could anyone please suggest us what could have caused this
segmentation fault.
I think that you use not a thread-safe library.
You don't need threads to get a segmentation fault (and there's
nothing here to indicate that the OP uses threads at all), it's
enough to have either memory corruption in your program or call
some library functions with wrong arguments (e.g. in another
thread somebody got a segmentation fault because he was passing
a NULL pointer to fclose()).
Please, provide more info.
That's definitely required to make any reasonable statements
beyond listing the "usual suspects".
Regards, Jens
--
\ Jens Thoms Toerring ___
jt@toerring.de
\__________________________
http://toerring.de