GCC Debugging/g++/Other

From Wikibooks, open books for an open world
Jump to: navigation, search

Runtime Errors[edit]

*** glibc detected *** ./PROGRAM_NAME: free(): invalid pointer: ADDRESS ***[edit]

  • produced with GCC 4.4.3?
  • May also produce a "segmentation fault" error
  • May cause program execution to break well before the true faulty area of code
  • Check for function declarations and definitions that do not match
  • Check for missing or invalid return types in function definitions
// function declaration below has no return type in its' definition
foo checkfoo(); 
// instead it should be
void checkfoo();