What does Windows error code 9 (ERROR_INVALID_BLOCK) mean?

 
Could be also:
ConstantTypeOS
KERN_MEMORY_FAILUREKern returnMac
ippStsNanArgIntel Ipp StatusAny
EBADFerrnoAny
IRQL_NOT_GREATER_OR_EQUALBugCheck CodeWindows
Previous Next
ERROR_NOT_ENOUGH_MEMORY ERROR_BAD_ENVIRONMENT

ERROR_INVALID_BLOCK

The supplied memory block is not valid

ERROR_INVALID_BLOCK indicates that a block passed to a memory-management operation cannot be recognized as a valid allocation. Common causes include freeing the wrong pointer, freeing an interior address, double-free, and mixing different allocators.

Debugging

  • Record the allocation and release stacks for the pointer.
  • Verify that allocation and deallocation use the same runtime and heap.
  • Check object ownership across DLL boundaries.
  • Use heap diagnostics to detect the first invalid write or free.

Resolution

Correct the allocation contract. Retrying the same free or heap operation can cause further corruption and should be avoided.

References


Looking for a different code? Search another status or error code.