< GCC Debugging < g++

Runtime Errors

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

  • 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();
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.