Analyzers
Support for Analyzers (Intel VTune™ Profiler, Intel Advisor, Intel Inspector)
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Intel Inspector: Uninitialized memory access for range loop

Dilshodzho_P_Intel
164 Views

Hi all,

I use following Software:

* Microsoft Windows 
* Intel® Parallel Studio XE Composer Edition for C++ Windows* 2016
* Intel Inspector Xe 2016

Intel Inspector detects uninitialized memory access error in function calls, which operate with range [first,last). If these codes are replaced with for loop, then everything is OK. Some snippets of defective codes:

std::all_of((uint8_t*)vector_type.data(),

                           (uint8_t*)(vector_type.data() + vector_type.size()),

                           [](uint8_t a) { return 0 == a; })

and

std::vector<uint8_t>(&var_name[2],

                            &var_name[var_name.size() - 60])

var_name.size if bigger than 100.

 

Can anyone explain me the reason of this error, pls?

 

WBR,

Dilshod

0 Kudos
2 Replies
James_T_Intel
Moderator
164 Views

Moved to the correct forum.

Kirill_R_Intel
Employee
164 Views

I've submitted Inspector bug for the issue, looks like false positive.

Reply