title: force coredump on glib free error
body: <p>I get the following error when I run my program and it won't happen under gdb. How can I force glibc or ubuntu to dump core on abort? I tried "ulimit -c unlimited". But, this is not a seg fault and no luck. Also, I have too many memory errors in valgrind fixing all of them will take a lot of time.</p>
  
  <p>Also, setting MALLOC_CHECK_ to 0 is not forcing program to exit. But, that's not a option for me.</p>
  
  <p><strong>* glibc detected <em></strong> ./main: free(): invalid next size (fast): 0x0000000000ae0560 *</em>*</p>
  
  <p><strong>Edit</strong>
  Anyway I found what is exactly causing this glibc corruption in valgrind. Just keeping it open to see if it's possible.</p>