summaryrefslogtreecommitdiff
path: root/src/vm
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2019-05-08 14:45:42 -0700
committerGitHub <noreply@github.com>2019-05-08 14:45:42 -0700
commit75cde8dc8854c2f488094c2e33002c8871d4a592 (patch)
tree95a392757eb8842e7b5e7da7f6dae567a5ec8c78 /src/vm
parentc64a137c499b58925c9a5b34b2ec55647604841f (diff)
downloadcoreclr-75cde8dc8854c2f488094c2e33002c8871d4a592.tar.gz
coreclr-75cde8dc8854c2f488094c2e33002c8871d4a592.tar.bz2
coreclr-75cde8dc8854c2f488094c2e33002c8871d4a592.zip
Send UTF16 dump file name (#24475)
Diffstat (limited to 'src/vm')
-rw-r--r--src/vm/diagnosticprotocolhelper.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/vm/diagnosticprotocolhelper.cpp b/src/vm/diagnosticprotocolhelper.cpp
index c7b07c87f8..2813a7d138 100644
--- a/src/vm/diagnosticprotocolhelper.cpp
+++ b/src/vm/diagnosticprotocolhelper.cpp
@@ -44,25 +44,33 @@ void DiagnosticProtocolHelper::GenerateCoreDump(IpcStream* pStream)
if (fSuccess)
{
// The protocol buffer is defined as:
- // string - dumpName (array<char> where the last char must = 0) or (length = 0)
+ // string - dumpName (UTF16)
// int - dumpType
// int - diagnostics
// returns
// ulong - status
- LPCSTR dumpName;
+ LPCWSTR pwszDumpName;
INT dumpType;
INT diagnostics;
uint8_t *pBufferCursor = buffer;
uint32_t bufferLen = nNumberOfBytesRead;
- if (TryParseString(pBufferCursor, bufferLen, dumpName) &&
+ if (TryParseString(pBufferCursor, bufferLen, pwszDumpName) &&
TryParse(pBufferCursor, bufferLen, dumpType) &&
TryParse(pBufferCursor, bufferLen, diagnostics))
{
- if (!PAL_GenerateCoreDump(dumpName, dumpType, diagnostics))
+ MAKE_UTF8PTR_FROMWIDE_NOTHROW(szDumpName, pwszDumpName);
+ if (szDumpName != nullptr)
{
- hr = E_FAIL;
+ if (!PAL_GenerateCoreDump(szDumpName, dumpType, diagnostics))
+ {
+ hr = E_FAIL;
+ }
+ }
+ else
+ {
+ hr = E_OUTOFMEMORY;
}
}
else