转载自:https://groups.google.com/forum/#!topic/comp.unix.solaris/dPBKDdRDZ1M
常见的情况:
- 内存越界访问
- 重复释放同一块内存
- 重复分配同一块内存
- 使用被释放掉的内存
The top causes for this:
- Writing outside the limits of an allocated block. (Failing to provide space for the trailing null in a string or using calculated subscripts).
- free()ing the same block more than once.
- Failing to check the return value from realloc() to see if the data was actually reallocated.
- Attempting to free() using a pointer that was not provided by malloc().
- Using a free()ed data area.
网友评论