User Guide

  • 2020
  • 05/04/2020
  • Public Content
Contents

Uninitialized Memory Access

Occurs when a read of an uninitialized memory location is reported.
Problem type: Uninitialized memory access
ID
Code Location
Description
1
Allocation site
If present, represents the location and associated call stack from which the memory block containing the offending address was allocated.
2
Read
Represents the instruction and associated call stack responsible for the uninitialized access.
If no allocation is associated with this problem, the memory address might be in uninitialized stack space.
The offset, if shown in the
Code Locations
pane, represents the byte offset into the allocated buffer where the
Uninitialized memory access
occurred.
Heap example:
char* pStr = (char*) malloc(20); char c = pStr[0]; // the contents of pStr were not initialized
Stack example (set
Analyze stack accesses
to Yes when you configure the analysis):
void func() {    int a;    int b = a * 4; // read of uninitialized variable a }
Heap example:
integer, allocatable :: a(:) integer :: b allocate( a(10) ) b = a(1) * 4
Stack example (set
Analyze stack accesses
to Yes when you configure the analysis):
integer :: a, b b = a * 4
Buffers created by system calls linking processes to shared memory are flagged as allocated memory, which means the
Intel Inspector
does not report an
Uninitialized memory access
on these buffers.
Possible Correction Strategies
Initialize the offending memory prior to use.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804