Sun Studio 12:使用 dbx 调试程序

未对齐释放 (maf) 错误

问题:尝试释放未对齐的堆块。

可能的原因:将未正确对齐的指针传递给了 free()realloc();更改了 malloc 返回的指针。

示例:

char *ptr = (char *)malloc(4);
ptr++;
free(ptr);                    /* Misaligned free */