For experimental purposes, I want to disable all the heap corruptions checks of glibc. In particular, I want to disable this check in the _int_free function:
        /* Check that the top of the bin is not the record we are going to
           add (i.e., double free).  */
        if (__builtin_expect (old == p, 0))
          malloc_printerr ("double free or corruption (fasttop)");
and the following check in the unlink_chunk function:
unlink_chunk()
[...]
  if (__builtin_expect (fd->bk != p || bk->fd != p, 0))
    malloc_printerr ("corrupted double-linked list");
According to this answer,  MALLOC_CHECK_=0  disables the runtimes checks. However, when I run MALLOC_CHECK_=0 ./broken_program, I still get the error message:
MALLOC_CHECK_=0 ./broken_program
double free or corruption (out)
What possibilities do I have to disable this unlink protection without recompiling the glibc?
 
    