Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5106 Discussions

Not detecting C++ memory leaks in mixed mode - Inspector XE 2015 Update 1

Julian_V_
Beginner
835 Views

Hello,

I have a C# console application that interfaces to a C++ codebase using a wrapper created by SWIG.

 I ran it through Inspector (on a Win7 64bit machine if it matters) and it did not detect any memory leaks even though I intentionally inserted a memory leak for validating the process.

After playing around with the settings for a long time, I realized that I should be using the "Mixed" Microsoft Runtime Environment. The next run of Inspector detected the leak... but none of of the subsequent run detect the leak! and I've tried everything I could think of! 

I've deleted all the results, recreated the executable, tried a different executable with the leak, switched to Auto and then back to Mixed... restarted the machine :)

Am I missing something obvious?

Please let me know if you'd like any other details to help me solve this mystery

thanks,

Julian.

0 Kudos
1 Reply
Julian_V_
Beginner
835 Views

Actually, I was able to eventually figure this out.

there was a "kernel resource leak" (critical section) in the wrapper that was leaking... which was what I initially assumed to be the leak I was in pursuit out.

once I fixed the "kernel resource leak", Intel Inspector was able to detect the leak that I was looking for.

I also had to use "Detect Memory Problems" rather than "Detect Leaks"

Hope this helps the next guy that comes along!

0 Kudos
Reply