All heaps that store certain types of metadata. When you do malloc or free, the heap often performs some functions of storing books on the heap. If he discovers something completely unexpected in the metadata, he usually crashes.
Normal heap operations are unlikely to cause such problems, so your program is likely to become the cause. Because your program has access to all of the memory in the process, including heap metadata, your program might accidentally overwrite some metadata.
The likely reason is to write outside the allocated buffer. This entry is likely to be resolved and is likely to corrupt the heap metadata. When this is detected by the heap, your program usually terminates.
doron source share