What does Windows error code 487 (ERROR_INVALID_ADDRESS) mean?

 
Previous Next
ERROR_DEVICE_HARDWARE_ERROR ERROR_USER_PROFILE_LOAD

ERROR_INVALID_ADDRESS

An invalid address was supplied or accessed

ERROR_INVALID_ADDRESS indicates that an operation referenced a memory address or mapped range that Windows could not accept. The underlying cause is often a caller bug, stale mapping, or invalid pointer arithmetic.

Typical causes

  • Passing an uninitialized, freed, or incorrectly cast pointer.
  • Using a view after its mapping was closed or resized.
  • Supplying an address that does not satisfy alignment or reservation rules.
  • Truncating a pointer or size when crossing 32-bit and 64-bit boundaries.

Diagnosis

Capture the failing address, requested size, process bitness, memory-protection state, and allocation origin. Enable Application Verifier, page heap, sanitizers where available, or debugger breakpoints around allocation and release.

Handling

Do not retry with the same address. Validate ranges with overflow-safe arithmetic and keep ownership explicit. If the address came from untrusted input or IPC, reject it at the boundary.

Security relevance

Invalid-address failures can expose use-after-free, buffer-overflow, or confused-deputy defects. Treat reproducible cases as security-sensitive until ruled out.

References


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