Oracle® Solaris Studio 12.4: Debugging a Program With dbx

Exit Print View

Updated: January 2015
 
 

Debugging Segmentation Faults

If a program experiences a segmentation fault (SIGSEGV), it references a memory address outside of the memory available to it.

    The most frequent causes for a segmentation fault are:

  • An array index is outside the declared range.

  • The name of an array index is misspelled.

  • The calling routine has a REAL argument, which the called routine has as INTEGER.

  • An array index is miscalculated.

  • The calling routine has fewer arguments than required.

  • A pointer is used before it has been defined.