Analyzers
Support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
4679 Discussions

Mismatched allocation/deallocation

Jean-michel_Rouet
120 Views

Hi

with intel inspector I noticed that a very small code like this

#include <iostream>
void test(int l)
{
    char * s = new char[l];
    delete[] s;
}
 
int main(int argc, char *argv[])
{
    test(512);
    return 0
}

triggers a mismatched allocation/deallocation for the variable s;

 

This only occurs after stl headers are included (like the iostream here in this example)

Is it a bug of intel inspector ?

For background information, I'm using Visual Studio 2015, intel compiler 16 update 3, and Inspector XE 2016 Update 3 (in Parallel Studio).

Thanks for your feedbacks.

 

 

0 Kudos
0 Replies
Reply