Intel® Inspector User Guide for Linux* OS

ID 767796
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Missing Allocation

Occurs when an invalid pointer is passed to a deallocation function. The invalid address may point to a previously released heap block.

ID

Code Location

Description

1

Deallocation site

If present, represents the location and associated call stack from which the memory block referenced by the address was previously deallocated.

The previous deallocation makes all subsequent deallocation attempts invalid.

2

Invalid deallocation site

Represents the location and associated call stack attempting the deallocation.

C Example

char* pStr = (char*) malloc(20);
free(pStr);
free(pStr); 

Fortran Example

integer, target :: b(100)
integer, pointer :: pmiddle
pmiddle => b(4)
DEALLOCATE( pmiddle )

Possible Correction Strategies

If

Do This

A double deallocation occurs.

Remove the extraneous deallocation.

An invalid deallocation occurs.

Fix the pointer value passed to the deallocator.