| Previous | Next |
| ERROR_BAD_STACK | ERROR_INVALID_PORT_ATTRIBUTES |
ERROR_INVALID_UNWIND_TARGET
The unwind target is not valid
ERROR_INVALID_UNWIND_TARGET indicates that exception processing was directed toward a frame, instruction, or context that the unwinder cannot accept. The target may be outside the active stack, inconsistent with unwind metadata, or corrupted.
Common causes
- Damaged exception-registration or context data.
- Incorrect setjmp/longjmp, fiber, coroutine, or custom stack handling.
- Hand-written assembly or JIT code with incomplete unwind metadata.
- Memory corruption changing saved frame state.
Diagnosis
Capture the exception record, target instruction pointer, stack bounds, active frame chain, and module unwind data. Compare debug and optimized builds, because optimization changes frame layout and can expose missing metadata.
Handling
Continuing execution is unsafe. Terminate the affected process after saving a dump. Fix the origin of the invalid target rather than adding a catch-all handler around the failure.
Testing
Exercise exceptions across every generated-code, plugin, and language-runtime boundary on all supported architectures.
References
Looking for a different code? Search another status or error code.