valgrind reports malloc assertion failure, memcheck doesn't report any errors
Callgrind reported an assertion violation in malloc although memcheck and a usual run reveals no errors:
stp: 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.
The run command is:
taskset -c 7 valgrind --main-stacksize=256768768 --tool=callgrind no-asserts-no-cbitp/stp ~/profiling-stp/python-samples-without-const-arr/*.smt
The program is built with -O2 -g option. Before runn开发者_如何学Going valgrind "ulimit -s unlimited" is called.
Is it possible to get a stack trace for the error reported by Callgrind? If not - ideas how to debug?
Thanks!
As this is assertion failure your program should crash with core dump. If it is not, enable core dump saving (ulimit -c unlimited) and open core dump in gdb.
精彩评论