honggyukim / heaptrace

a tool that collects and reports heap allocated memory
GNU General Public License v2.0
13 stars 3 forks source link

No report is printed for `sample.c` #17

Closed Bojun-Seo closed 1 year ago

Bojun-Seo commented 1 year ago

Expected result: Report printed for sample.c Since sample.c allocate memory with calloc but not deallocate it.

Actual result: No report is printed for sample.c

$ ./heaptrace samples/sample.out
[heaptrace] initialized for /proc/5016/maps (sample.out)
[heaptrace]   finalized for /proc/5016/maps (sample.out)
Bojun-Seo commented 1 year ago

The expected result is wrong. The expected result of sample.c execution is report nothing. Because sample.c allocate and deallocate memory properly. So, this is not an error.

I want simple leak generating sample, by the way. So I add sample_leak.c which doesn't deallocate memory after allocation. https://github.com/honggyukim/heaptrace/pull/19