KindDragon / vld

Visual Leak Detector for Visual C++ 2008-2015
https://kinddragon.github.io/vld/
GNU Lesser General Public License v2.1
1.01k stars 314 forks source link

No source:line in generated reports #43

Open pps83 opened 6 years ago

pps83 commented 6 years ago

I installed latest vld and tried to use it in my code (which is compiled with in debug, always without "omit framepointer") No dlls are used, only single binary. FYI, dbghelp does get me source/line numbers for backtraces in my app, I use it in my code. E.g. pdb file is there and it works. In this test run with vld.h this code wasn't used, dbghelp was loaded by vld from its own install dir. So, I tried then to modify vld.ini to use StackWalkMethod = safe and it's been epic run, my app still didn't even reach entry point in 15 hours:

image

This is what fast version outputs:

WARNING: Visual Leak Detector detected memory leaks!
---------- Block 134 at 0x05840B28: 56 bytes ----------
  Leak Hash: 0x01DFF513, Count: 1, Total 56 bytes
  Call Stack (TID 16944):
    minkernel\crts\ucrt\src\appcrt\heap\malloc.cpp (21): ucrtbased.dll!malloc()
    App.UnitTest.exe!0x0221C570()
    App.UnitTest.exe!0x0221BBDB()
    App.UnitTest.exe!0x0221B650()
    App.UnitTest.exe!0x0239D9C2()
    App.UnitTest.exe!0x0239A90A()
    App.UnitTest.exe!0x00521036()
    minkernel\crts\ucrt\src\appcrt\startup\initterm.cpp (22): ucrtbased.dll!_initterm()
    App.UnitTest.exe!0x026C1C1E()

I didn't have patience to wait to complete safe version, don't know if it would produce anything useful

Saftur commented 6 years ago

I found a solution to this. Go into 'Project Settings->Linker->Debugging->Generate Debug Info' and change that setting to "Generate Debug Information optimized for sharing and publishing (/DEBUG:FULL)"

martijnls commented 5 years ago

I have changed the setting "Project Settings->Linker->Debugging->Generate Debug Info' and change that setting to "Generate Debug Information optimized for sharing and publishing (/DEBUG:FULL)"

I still do not see the line numbers. Is there some other setting which needs to be made?