DynamoRIO / DynamoRIO/drmemory
make "0 byte leak" messages clearer
- Dominant language
- C
- Stars
- 2.7k
- Forks
- 290
- PR merge metrics
- No merged PRs in 30d
Description
People may be confused and not realize there's still a malloc header being
leaked for requests of 0 bytes where the allocator still creates something
or for things like new [0]. Perhaps "(+ malloc headers)" or sthg.
```
~~Dr.M~~
~~Dr.M~~ Error #1: LEAK 0 bytes
~~Dr.M~~ # 0 replace_operator_new_array [/work/drmemory_package/common/alloc_replace.c:2928]
~~Dr.M~~ # 1 UndoArray<>::UndoArray [undoarray.h:121]
~~Dr.M~~ # 2 SimpleTests [main.cpp:89]
~~Dr.M~~ # 3 main [main.cpp:24]
~~Dr.M~~
~~Dr.M~~ Error #2: LEAK 0 bytes
~~Dr.M~~ # 0 replace_operator_new_array [/work/drmemory_package/common/alloc_replace.c:2928]
~~Dr.M~~ # 1 UndoArray<>::operator= [undoarray.h:45]
~~Dr.M~~ # 2 SimpleTests [main.cpp:106]
~~Dr.M~~ # 3 main [main.cpp:24]
~~Dr.M~~
~~Dr.M~~ Error #3: LEAK 0 bytes
~~Dr.M~~ # 0 replace_operator_new_array [/work/drmemory_package/common/alloc_replace.c:2928]
~~Dr.M~~ # 1 UndoArray<>::UndoArray [undoarray.h:121]
~~Dr.M~~ # 2 StudentTests [main.cpp:165]
~~Dr.M~~ # 3 main [main.cpp:26]
~~Dr.M~~
~~Dr.M~~ Error #4: LEAK 0 bytes
~~Dr.M~~ # 0 replace_operator_new_array [/work/drmemory_package/common/alloc_replace.c:2928]
~~Dr.M~~ # 1 UndoArray<>::operator= [undoarray.h:45]
~~Dr.M~~ # 2 StudentTests [main.cpp:191]
~~Dr.M~~ # 3 main [main.cpp:26]
~~Dr.M~~
~~Dr.M~~ NO ERRORS FOUND:
~~Dr.M~~ 0 unique, 0 total unaddressable access(es)
~~Dr.M~~ 0 unique, 0 total uninitialized access(es)
~~Dr.M~~ 0 unique, 0 total invalid heap argument(s)
~~Dr.M~~ 0 unique, 0 total warning(s)
~~Dr.M~~ 4 unique, 22 total, 0 byte(s) of leak(s)
~~Dr.M~~ 0 unique, 0 total, 0 byte(s) of possible leak(s)
~~Dr.M~~ Details: /home/nullptr/DrMemory-Linux-1.11.0-2/drmemory/logs/DrMemory-main.23218.000/results.txt
```
Contributor guide
Assessment
This issue has not been assessed yet.