Skip to content

Commit 23409b8

Browse files
kotlarmilosCopilot
andcommitted
Return E_UNEXPECTED instead of S_FALSE from GetInterpreterCallDvarOffset
Caller uses IfFailRet which treats S_FALSE as success. With the IsInterpreted() gating in place, neither S_FALSE return path is reachable on the happy path, so propagate them as real errors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8afd1eb commit 23409b8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/coreclr/debug/di/module.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5139,7 +5139,7 @@ HRESULT CordbNativeCode::GetInterpreterCallDvarOffset(ULONG32 ILoffset, ULONG32
51395139
memcpy(&interpOpcode, nativeBuffer, sizeof(int32_t));
51405140
int interpSlots = GetInterpreterCallOpcodeLengthInSlots(interpOpcode);
51415141
if (interpSlots <= 0)
5142-
return S_FALSE; // Not an interpreter call.
5142+
return E_UNEXPECTED;
51435143

51445144
ULONG32 expectedPostCall = pMap->nativeStartOffset + interpSlots * (ULONG32)sizeof(int32_t);
51455145
if (expectedPostCall != postCallNativeOffset)
@@ -5151,7 +5151,7 @@ HRESULT CordbNativeCode::GetInterpreterCallDvarOffset(ULONG32 ILoffset, ULONG32
51515151
return S_OK;
51525152
}
51535153

5154-
return S_FALSE;
5154+
return E_UNEXPECTED;
51555155
}
51565156
#endif // FEATURE_INTERPRETER
51575157

0 commit comments

Comments
 (0)