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

Detect Leaks points problem in the the middle of call stack - how to set up suppression file?

Andrzej_S_
New Contributor I
368 Views

Hi everyone,

I have following problem - I run Intel Inxpector XE2011 Detect Leaks, I get several Memory Leak (Allocation site), when I want to dynamically load DLL file. Intel Inspector points to the function in the module, that only calls WINAPI ::LoadLibrary and is innocent (I call it MyInnocent), but not to one that is in fact leaking (I call it guilty function/module).

As an example, I see it as following:

In Problems window I see:

P23 : Memory leak : MyInnocentSrc.cpp : MyInnocentSrc.exe leak_size :

In Code Location I see:

X26 : Allocation Site : MyInnocentSrc.cpp :line_number : MyInnocentFunction : MyInnocentSrc.exe

But when I get inside it (View Source) I can see in the Call Stack:

 

==== Beginning of the call stack ====

GuiltyModule.dll!GuiltyFunction - GuiltyModule.dll!line number

(... some other stack frames)

kernal32.dll!LoadLibraryA - kernel32.cpp:350

MyInnocentSrc.exe!MyInnocentFunction - MyInnocentSrc.cpp :line_number

(... some other stack frames)

==== End of the call stack ====

 

Now, I want to set up suppression file not to see these leaks, because guilty module is legacy and we don't want to invest any more into maintaning it. However, when I set up suppression data to point to guilty module, I can still see the problem, what is most probably connected with the fact, thatIntel Inspector shows all the data in Problem Window and Code Location pointing to MyInnocentSrc, that is NOT a problem. When I set up suppression data to point to MyInnocentSrc, everything is cleared, however I don't want to do that, as I am afraid of possible leaks from this module in the future, that I will miss.

Does anyone know, how to set suppresion file, so it will have data connected with the guilty module, but will clear the memory leak problem in the rapport I have now?

I will add, that MyInnocentSrc is the last module in stack trace, that has symbol files.

All the best,

Andrzej

0 Kudos
1 Solution
Andrzej_S_
New Contributor I
368 Views

Hello everyone,

thank you for your answers, but maybe I was not clear enough. What I would like to ask about is the specific way of working of suppression rule, not how to create suppression rules, because I know how to do that. I have suppression file for IntelInspector 2011, that works and serves almost all my needs for 60 and more suppression rules. The problem came now, with the last discovered problem. Let me rephrase it:

I have a C++ module with a function that loads DLL using windows LoadLibrary function. Let's call this module "MyInnocentSrc" and function "MyInnocentFunction". During loading of this function I get some "Memory Leak" problems, that in the "Summary" tab points me to MyInnocentSrc and MyInnocentFunction, but when I double-click on it, it takes me to the Sources tab, that in the Call Stack shows clearly, that the Root Cause of the problem is not MyInnocentFunction, but dozen more call frames further another dynamically loaded DLL. And I know that this DLL may be leaking (let's call it GuiltyModule). However I don't want to fix it, as it is legacy stuff - I want to suppress it. However, when I point suppression to GuiltyModule, the problem is still being reported.

EDIT:

I found solution. This page helped me: https://software.intel.com/en-us/articles/creating-and-managing-suppressions-in-intel-inspector-xe-2013

The case is not how to create the suppression file, but what is the difference between Best Stack Frame, Top Stack Frame and Any Stack Frame. I was using Best Stack Frame match, but needed Top Stack Frame. That's it.

Thanks for help!

View solution in original post

0 Kudos
3 Replies
Kevin_O_Intel1
Employee
368 Views
0 Kudos
Peter_W_Intel
Employee
368 Views

@ Andrzej

Using editable suppression file is feasible, another way is to create a suppression file via GUI. Please reference this - see Figures to know operation on GUI, I 'm sorry this is a Chinese version.

0 Kudos
Andrzej_S_
New Contributor I
369 Views

Hello everyone,

thank you for your answers, but maybe I was not clear enough. What I would like to ask about is the specific way of working of suppression rule, not how to create suppression rules, because I know how to do that. I have suppression file for IntelInspector 2011, that works and serves almost all my needs for 60 and more suppression rules. The problem came now, with the last discovered problem. Let me rephrase it:

I have a C++ module with a function that loads DLL using windows LoadLibrary function. Let's call this module "MyInnocentSrc" and function "MyInnocentFunction". During loading of this function I get some "Memory Leak" problems, that in the "Summary" tab points me to MyInnocentSrc and MyInnocentFunction, but when I double-click on it, it takes me to the Sources tab, that in the Call Stack shows clearly, that the Root Cause of the problem is not MyInnocentFunction, but dozen more call frames further another dynamically loaded DLL. And I know that this DLL may be leaking (let's call it GuiltyModule). However I don't want to fix it, as it is legacy stuff - I want to suppress it. However, when I point suppression to GuiltyModule, the problem is still being reported.

EDIT:

I found solution. This page helped me: https://software.intel.com/en-us/articles/creating-and-managing-suppressions-in-intel-inspector-xe-2013

The case is not how to create the suppression file, but what is the difference between Best Stack Frame, Top Stack Frame and Any Stack Frame. I was using Best Stack Frame match, but needed Top Stack Frame. That's it.

Thanks for help!

0 Kudos
Reply