http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54186

--- Comment #4 from Ionut Popescu <poyo_vl at yahoo dot com> 2012-08-06 
19:38:37 UTC ---
I'm sorry for posting it wrong.

First, I can't use other compiler (a newer one), it not depends on me...

Second, I figured out where is the problem: realloc()!

The problem is that when I don't have enough space (512 B blocks) I realloc()
for more space, both of my pointers. 

Even if the pointers get the same value as before or new values, it crashes on
free, free on the realloc() resulted pointer!

I also wrote my own "realloc" function, that calls just malloc(), memcpy() and
free() to avoid original realloc() but strange, it also crashes on free()-ing
resulted pointers.

I'm sorry and thank you for your time, please close this.

Ionut

Reply via email to