User Guide

  • 2021.2
  • 03/26/2021
  • Public Content
Contents

Uninitialized Partial Memory Access

Occurs when a read instruction references a block (2-bytes or more) of memory where part of the block is uninitialized.
Problem type: Uninitialized partial 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 partial uninitialized access.
If no allocation or deallocation is associated with this problem, the memory address might be in stack space.
The offset, if shown in the
Code Locations
pane, represents the byte offset into the allocated buffer where the
Uninitialized partial memory access
occurred.
C Example
struct person {     unsigned char age;     char firstInitial;     char middleInitial;     char lastInitial; }; struct person *p1, *p2; p1 = (struct person*) malloc(sizeof(struct person)); p2 = (struct person*) malloc(sizeof(struct person)); p1->firstInitial = 'c'; p1->lastInitial = 'o'; *p2 = *p1; // will result in partial uninitialized read
Fortran Example
type node character data1 character data2 end type node ! Variables type(node) :: a, b a%data1 = "a" b = a
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 partial memory access
on these buffers.
Possible Correction Strategies
Determine the correct initialization for the memory being accessed.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.