Re: Problems with the Poll.patch

From: Welcor (welcor@dune.net)
Date: 03/24/02


From: "Kevin Dethlefs" <Demortes@MSN.COM>
> I had run the process through GDB, and it claims segmentation fault. How
> do I fix this?

Segmentation fault means you are referencing memory outside the
memory the program has been assigned. Possible causes:
- dereferencing a NULL pointer,
- xscanf() used without converting to a pointer
  (scanf("%d", c) vs. scanf("%d", &c))
- array overrun (ie. i>array size) or underrun (ie. i<0) when
  dealing with an array. Note that the C compiler doesn't check
  for neither, so a program may compile with no errors, but
  completely thrash the stack by overrunning an array and crash
  on runtime.

Have you tried putting debugging log()'s in, as per my other reply ?

> Program terminated with signal SIGSEGV, Segmentation fault.
> The program no longer exists.
>
Next time start up gdb, and then set a breakpoint at the beginning
of the function. Then run the mud, and step through the code from
where it breaks.

After all, you're not giving us much to work with here.

Welcor

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT