malloc.c:3096: sYSMALLOc: Assertion 错误

来源:互联网 发布:数据库编程培训 编辑:程序博客网 时间:2024/06/03 15:07

 

malloc.c:3096: sYSMALLOc: Assertion (old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0) failed. Aborted

 

昨天调试程序一起来就报一个这样的错误, gdb一调试发现是一个new的地方,不知所措,网上也没有好的说法,源文件既有.c又有.cpp,最后修改Makefile解决,但还是不知为什么,记下来,以后再遇到找到根本原因再续写完。

 

 

 

0 0