Hi there,
I hope this is not a too general question. I have a reasonable large program and recently when I run it I get the following errors:
*** malloc[566]: error for object 0x1f2cb0: Incorrect checksum for freed object - object was probably modified after being freed; break at szone_error
Program received signal EXC_BAD_ACCESS, Could not access memory.
0x900042a8 in free_list_remove_ptr ()
Now i have no idea how to trace this back to its source. I am using gcc 3.1 on Mac OS X. I have tried doing a backtrace in gdb but the thing that is points to is clearing a valarray which i have had no problem with previously.
I have similar error bothering me. Somewhere when I run code it will give me this following memory error. Couldnt find the proper reason to solve it.
*** malloc[566]: error for object 0x1f2cb0: Incorrect checksum for freed object - object was probably modified after being freed; break at szone_error
Program received signal EXC_BAD_ACCESS, Could not access memory.
I have similar error bothering me. Somewhere when I run code it will give me this following memory error. Couldnt find the proper reason to solve it.
*** malloc[566]: error for object 0x1f2cb0: Incorrect checksum for freed object - object was probably modified after being freed; break at szone_error
When you corrupt memory, anything can happen, including having your program "work".
Unlike other computer languages, C and C++ do not guarantee how your program will behave when you make mistakes like this -- it may work today and crash tomorrow.
Couldnt find the proper reason to solve it.
The reason it happens is you have mismanaged the heap functions (malloc and free) and corrupted the heap. Needless to say, you need to debug your code.
Regards,
Paul McKenzie
Last edited by Paul McKenzie; July 19th, 2012 at 04:32 AM.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.