[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Segmentation Fault & All possible solutions Please.



shyamk@eth.net wrote:
  >Dear members,
  >   Here is something I have not been really been able to understand .. SEGME
      >NTATION
  >FAULT .
  > Please tell m:
  >1)What exactly is segmentation fault ?
  >2)When does it occur ?
  >3)How Do you Solve it ?
 
It means that a program has tried to address memory that does not belong
to it.

It is likely to occur if the program uses an uninitialised pointer.  There
can be many causes, all of which come down to programmer error.

You solve it first by using the debugger to find the pointer which is
at fault and second by carefully writing your programs so that they
never try to access invalid pointers.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "For whosoever shall call upon the name of the Lord 
      shall be saved."         Romans 10:13 




Reply to: