Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix dump generation segfault in DAC
Issue: #58525
  • Loading branch information
Mike McLaughlin authored and github-actions committed Sep 2, 2021
commit 04b4f4c8f54d3f7dfd5fa244d702f3b46c4daf98
3 changes: 2 additions & 1 deletion src/coreclr/vm/excep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11533,8 +11533,9 @@ VOID ThrowBadFormatWorker(UINT resID, LPCWSTR imageName DEBUGARG(__in_z const ch
msgStr += W(")");
}
#endif

ThrowHR(COR_E_BADIMAGEFORMAT, msgStr);
#else // DACCESS_COMPILE
ThrowHR(COR_E_BADIMAGEFORMAT);
#endif // #ifndef DACCESS_COMPILE
}

Expand Down
4 changes: 4 additions & 0 deletions src/coreclr/vm/exceptmacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,12 @@ template <typename T>
NOINLINE
VOID ThrowBadFormatWorkerT(UINT resID, T * pImgObj DEBUGARG(__in_z const char *cond))
{
#ifdef DACCESS_COMPILE
ThrowBadFormatWorker(resID, nullptr DEBUGARG(cond));
#else
LPCWSTR tmpStr = GetPathForErrorMessagesT(pImgObj);
ThrowBadFormatWorker(resID, tmpStr DEBUGARG(cond));
#endif
}


Expand Down