2

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 running 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!

1 Answer 1

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.