Skip to content

cDAC: ICorDebugThread::GetActiveFrame returns 0x8007000B (ERROR_BAD_FORMAT) during managed debugging on Windows x64 #129557

@steveisok

Description

@steveisok

With cDAC enabled (DOTNET_ENABLE_CDAC=1), ICorDebug stack inspection fails on Windows x64. When a debugger services a breakpoint callback and walks the stack, ICorDebugThread::GetActiveFrame returns HRESULT 0x8007000B (HRESULT_FROM_WIN32(ERROR_BAD_FORMAT)), which surfaces to managed callers as BadImageFormatException. The debuggee process is then torn down (exit code -2146232797 / 0x8007000B).

Without cDAC the identical scenario succeeds — this is cDAC-specific.

Repro / signal

  • Runtime: 11.0.0-preview.6.26311.113, Windows x64
  • Env: DOTNET_ENABLE_CDAC=1
  • A breakpoint is hit; on the callback thread the stackwalk path (GetActiveFrame → frame enumeration) returns 0x8007000B.
BadImageFormatException: An attempt was made to load a program with an incorrect format. (0x8007000B)
   at Marshal.ThrowExceptionForHR(...)
   at ICorDebugThread.GetActiveFrame(...)

Impact

Reproduces across ~15 independent managed-debugging scenarios (Edit-and-Continue apply-and-continue, dynamic/delegate value inspection). The same runtime build passes all of these scenarios with cDAC disabled; enabling cDAC fails them.

Expected

cDAC GetActiveFrame/stackwalk returns the active frame with S_OK, matching the legacy DAC behavior.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions