santoshn / softboundcets-34

SoftBoundCETS for LLVM+Clang version 34
BSD 3-Clause "New" or "Revised" License
56 stars 17 forks source link

Free pointer list not being checked #6

Closed edmcman closed 10 years ago

edmcman commented 10 years ago
fuzz@ubufuzz64:~$ cat free.c
#include <stdlib.h>

int main() {
  void *x = malloc(20);
  free(x);
  free(x);
}
fuzz@ubufuzz64:~$ clang -fsoftboundcets free.c -o free -L/home/fuzz/softboundcets-34/softboundcets-lib/ -lm -lrt
fuzz@ubufuzz64:~$ ./free 2>&1 | head
*** glibc detected *** ./free: double free or corruption (fasttop): 0x000000000060d030 ***
santoshn commented 10 years ago

Thanks for reporting the bug. I just enabled double free checking in the latest commit. I had disabled it because some C runtimes already handle double frees.