Archive for the ‘C & C++’ Category

Compiling on SuSE 10+ (glibc detected invalid pointer during free)

Tuesday, May 15th, 2007

I was trying compile code on SuSE 10.1 and get following error:

*** glibc detected *** free(): invalid pointer: 0×081c80f0 ***

The solution to move forward is to disable a new feature of GLIBC to verify pointers before free the memory. There is an environment variable MALLOC_CHECK_ that has following recognizable values:

0 — Do not generate an error message, and do not kill the program
1 — Generate an error message, but do not kill the program
2 — Do not generate an error message, but kill the program
3 — Generate an error message and kill the program

[Source]