Skip to content

Commit f2c9dc4

Browse files
tommcdonCopilot
andauthored
Fix async stack walk crash for continuations with null DiagnosticIP (#128496)
CordbAsyncStackWalk::PopulateFrame() crashes when encountering a continuation whose ResumeInfo.DiagnosticIP is NULL (e.g. the new ValueTaskContinuation introduced in #127973). GetNativeCodeInfoForAddr is called with a null address which fails. Fix: In PopulateFrame(), skip continuations with diagnosticIP == NULL the same way DiagnosticHidden frames are skipped (advance to Next). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent edfa0c6 commit f2c9dc4

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/coreclr/debug/di/rsstackwalk.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,15 @@ HRESULT CordbAsyncStackWalk::PopulateFrame()
915915
&nextContinuation,
916916
&state));
917917

918+
// Skip continuations with null DiagnosticIP. These are infrastructure
919+
// continuations (e.g. ValueTaskContinuation) that have no user code
920+
// associated with them and cannot be represented as a debug frame.
921+
if (diagnosticIP == 0)
922+
{
923+
m_continuationAddress = nextContinuation;
924+
continue;
925+
}
926+
918927
NativeCodeFunctionData codeData;
919928
VMPTR_Module pModule;
920929
mdMethodDef methodDef;

0 commit comments

Comments
 (0)