User Guide

  • 2020
  • 09/09/2020
  • Public Content
Contents

Invalid Deallocation

Occurs when an application calls a deallocation function with an address that does not correspond to dynamically allocated memory.
Problem type: Invalid deallocation
ID
Code location
Description
1
Invalid deallocation site
Represents the location from which the invalid call to a deallocation function was made.
int x = 1; int *p = &x; VirtualFree(p, 1, MEM_DECOMMIT);
void *p = VirtualAlloc(NULL,1,MEM_COMMIT,PAGE_READWRITE); VirtualFree(p,1,MEM_DECOMMIT); VirtualFree(p,1,MEM_DECOMMIT);
void *p = mmap(NULL, 8, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); munmap(p, 8); munmap(p, 8);
Possible Correction Strategies
If
Do This
This code location should free memory.
Change the code to pass in dynamically allocated memory.
This code location does not need to free memory.
Remove the call to the deallocation function.

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