# Deallocation twice



## Wieldar (Jun 22, 2009)

Hi

LeakTracer and ccmalloc reports that there is a deallocation of the memory range which is already free in my app. How can i trace the first call of free() (or delete[] in my case)?
I guess, cmalloc's chains would help, but it doesn't write them (although it does for a small programms):

```
.--------------------------------------------------------------------------.
|================ ccmalloc-0.4.0 (C) 1997-2003 Armin Biere ================|
+--------------------------------------------------------------------------+
| executable       = test                                              |
| startup file     = .ccmalloc                                             |
| log file         = ccmalloc.log                                          |
| start time       = Mon Jun 22 13:37:42 2009                              |
| operating system = FreeBSD 7.2-RELEASE i386 on sharlin                   |
+--------------------------------------------------------------------------+
| only-count        = 0            keep-deallocated-data = 1               |
| check-interval    = 20           check-free-space      = 1               |
| check-start       = 0            file-info             = 1               |
| chain-length      = 10000        additional-line       = 1               |
| check-underwrites = 1            print-addresses       = 1               |
| check-overwrites  = 1            print-on-one-line     = 1               |
| sort-by-wasted    = 1            sort-by-size          = 1               |
| # only-log-chain  = 0            continue              = 0               |
| # dont-log-chain  = 0            statistics            = 0               |
| debug             = 0            library-chains        = 0               |
| load-dynlibs      = 0            align-8-byte          = 0               |
| only-wasting-alloc= 0                                                    |
`--------------------------------------------------------------------------'
*** can not free non valid data at 0x287cc000
*** (perhaps an `under'write occured)
```

FreeBSD 7.1 i386, gcc 4.2.1., using c++. LDFLAGS: -lpthread -lz


----------



## Wieldar (Jun 22, 2009)

Typo: FreeBSD 7.2


----------

