Skip to content

Instantly share code, notes, and snippets.

@nabijaczleweli
Created April 27, 2016 15:15
Show Gist options
  • Save nabijaczleweli/9c090af93035668bf8383a96326a8411 to your computer and use it in GitHub Desktop.
Save nabijaczleweli/9c090af93035668bf8383a96326a8411 to your computer and use it in GitHub Desktop.
Empty main leaks
p:\C++\SFML\BarbersAndRebarbs\old>cat a.cpp
int main() {}
p:\C++\SFML\BarbersAndRebarbs\old>g++ -std=c++14 a.cpp
p:\C++\SFML\BarbersAndRebarbs\old>bin64\drmemory.exe a.exe
~~Dr.M~~ Dr. Memory version 1.10.1
~~Dr.M~~ (Uninitialized read checking is not yet supported for 64-bit)
~~Dr.M~~ Running "a.exe"
~~Dr.M~~
~~Dr.M~~ NO 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 GDI usage error(s)
~~Dr.M~~ 0 unique, 0 total handle leak(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~~ ERRORS IGNORED:
~~Dr.M~~ 1 potential leak(s) (suspected false positives)
~~Dr.M~~ (details: D:\Users\nabijaczleweli\AppData\Roaming\Dr. Memory\DrMemory-a.exe.4004.000\potential_errors.txt)
~~Dr.M~~ 3 unique, 3 total, 38 byte(s) of still-reachable allocation(s)
~~Dr.M~~ (re-run with "-show_reachable" for details)
~~Dr.M~~ Details: D:\Users\nabijaczleweli\AppData\Roaming\Dr. Memory\DrMemory-a.exe.4004.000\results.txt
p:\C++\SFML\BarbersAndRebarbs\old>cat "D:\Users\nabijaczleweli\AppData\Roaming\Dr. Memory\DrMemory-a.exe.4004.000\results.txt"
Dr. Memory version 1.10.1 build 3 built on Apr 10 2016 18:05:55
Dr. Memory results for pid 4004: "a.exe"
Application cmdline: "a.exe"
Recorded 115 suppression(s) from default p:\C++\SFML\BarbersAndRebarbs\old\bin64\suppress-default.txt
===========================================================================
FINAL SUMMARY:
DUPLICATE ERROR COUNTS:
SUPPRESSIONS USED:
NO ERRORS FOUND:
0 unique, 0 total unaddressable access(es)
0 unique, 0 total invalid heap argument(s)
0 unique, 0 total GDI usage error(s)
0 unique, 0 total handle leak(s)
0 unique, 0 total warning(s)
0 unique, 0 total, 0 byte(s) of leak(s)
0 unique, 0 total, 0 byte(s) of possible leak(s)
ERRORS IGNORED:
1 potential leak(s) (suspected false positives)
(details: D:\Users\nabijaczleweli\AppData\Roaming\Dr. Memory\DrMemory-a.exe.4004.000\potential_errors.txt)
3 unique, 3 total, 38 byte(s) of still-reachable allocation(s)
(re-run with "-show_reachable" for details)
Details: D:\Users\nabijaczleweli\AppData\Roaming\Dr. Memory\DrMemory-a.exe.4004.000\results.txt
p:\C++\SFML\BarbersAndRebarbs\old>cat "D:\Users\nabijaczleweli\AppData\Roaming\Dr. Memory\DrMemory-a.exe.4004.000\potential_errors.txt"
Dr. Memory version 1.10.1 build 3 built on Apr 10 2016 18:05:55
Dr. Memory errors that are likely to be false positives, for pid 4004: "a.exe"
These errors matched the blacklist 'C:\WINDOWS*.d??' for 4 frames.
Run with -lib_blacklist_frames 0 to treat these as regular errors.
If these are all false positives and your focus is unaddressable errors, consider running with -light to skip all uninitialized reads and leaks for higher performance.
Potential Error #1: POSSIBLE LEAK 23 direct bytes 0x00000000014801e0-0x00000000014801f7 + 0 indirect bytes
# 0 replace_malloc [d:\drmemory_package\common\alloc_replace.c:2576]
# 1 msvcrt.dll!getptd_noexit
# 2 msvcrt.dll!_LocaleUpdate::_LocaleUpdate
# 3 msvcrt.dll!setmbcp_nolock
# 4 msvcrt.dll!_setargv
# 5 msvcrt.dll!malloc_crt
# 6 msvcrt.dll!_setargv
# 7 msvcrt.dll!_getmainargs
# 8 pre_cpp_init [C:/repo/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:162]
# 9 msvcrt.dll!initterm
#10 __tmainCRTStartup [C:/repo/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:270]
#11 .l_start [C:/repo/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/crt/crtexe.c:212]
DUPLICATE POTENTIAL ERROR COUNTS:
NO POTENTIAL ERRORS FOUND:
0 unique, 0 total potential unaddressable access(es)
0 unique, 0 total potential invalid heap argument(s)
0 unique, 0 total potential GDI usage error(s)
0 unique, 0 total potential handle leak(s)
0 unique, 0 total potential warning(s)
0 unique, 0 total, 0 byte(s) of potential leak(s)
1 unique, 1 total, 23 byte(s) of potential possible leak(s)
Details: D:\Users\nabijaczleweli\AppData\Roaming\Dr. Memory\DrMemory-a.exe.4004.000\potential_errors.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment