DynamoRIO / DynamoRIO/drmemory
"REACHABLE LEAK" has no stacktrace on version "1.11.0", but ok in version "1.8.16710" on both win7 and unbuntu 16.04
- Dominant language
- C
- Stars
- 2.7k
- Forks
- 290
- PR merge metrics
- No merged PRs in 30d
Description
Reproduce:
I encountered this problem when try to locate leaks on windows, bellow test is executed on ubuntu 16.04, the problem seems exist on recent versions.
Test program:
```
//main.c
void* a;
void main(int argc , char *argv[])
{
a = malloc(12345);
void* b = malloc(2769);
}
build with:
gcc main.c -o out.elf
```
run options:
drmemory -brief -light -count_leaks -show_reachable -- out.elf
1. Bad one (installed from apt-get):
```
~~Dr.M~~ Dr. Memory version 1.11.0
~~Dr.M~~
~~Dr.M~~ Error #1: REACHABLE LEAK 1425 bytes
~~Dr.M~~
~~Dr.M~~
.... all without stacktrace
~~Dr.M~~
~~Dr.M~~ Error #17: REACHABLE LEAK 12345 bytes -> *program leak*
~~Dr.M~~
~~Dr.M~~
~~Dr.M~~ Error #18: REACHABLE LEAK 2769 bytes *program leak*
~~Dr.M~~
~~Dr.M~~
~~Dr.M~~ ERRORS FOUND:
~~Dr.M~~ 0 unique, 0 total unaddressable access(es)
~~Dr.M~~ 0 unique, 0 total invalid heap argument(s)
~~Dr.M~~ 0 unique, 0 total warning(s)
~~Dr.M~~ 0 unique, 0 total, 0 byte(s) of leak(s)
~~Dr.M~~ 0 unique, 0 total, 0 byte(s) of possible leak(s)
~~Dr.M~~ 18 unique, 23 total, 28365 byte(s) of still-reachable allocation(s)
```
Good one (I manually build from source by checkout a git tag):
```
~~Dr.M~~ Dr. Memory version 1.8.16710
~~Dr.M~~
~~Dr.M~~ Error #1: REACHABLE LEAK 12345 bytes
~~Dr.M~~ # 0 replace_malloc [/home/lqp/code/drmemory/common/alloc_replace.c:2537]
~~Dr.M~~ # 1 main [/main.c:19]
~~Dr.M~~
~~Dr.M~~ Error #2: REACHABLE LEAK 2769 bytes
~~Dr.M~~ # 0 replace_malloc [/home/lqp/code/drmemory/common/alloc_replace.c:2537]
~~Dr.M~~ # 1 main [/main.c:20]
~~Dr.M~~
~~Dr.M~~ ERRORS FOUND:
~~Dr.M~~ 0 unique, 0 total unaddressable access(es)
~~Dr.M~~ 0 unique, 0 total invalid heap argument(s)
~~Dr.M~~ 0 unique, 0 total warning(s)
~~Dr.M~~ 0 unique, 0 total, 0 byte(s) of leak(s)
~~Dr.M~~ 0 unique, 0 total, 0 byte(s) of possible leak(s)
~~Dr.M~~ 2 unique, 2 total, 15114 byte(s) of still-reachable allocation(s)
```
Hope this bug will be fix soon, cause reachable leaks is some times very useful when program is continually eating memories, but release all them at exit. so, it's not deemed a leak, and it can be found through "reachable leaks" with the stack trace. Thanks!!!
Contributor guide
Assessment
This issue has not been assessed yet.