Skip to content

Commit 4e344df

Browse files
committed
[MERGE #5919 @pleath] Handle non-null-terminated function name in ETW
Merge pull request #5919 from pleath:etwfuncname
2 parents 9997a53 + 9315cc6 commit 4e344df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Runtime/Base/EtwTrace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ size_t EtwTrace::GetSimpleJitFunctionName(
382382
const size_t suffixCharLength = _countof(_u("Simple")) - 1;
383383

384384
const char16 *const functionName = GetFunctionName(body);
385-
const size_t functionNameCharLength = wcslen(functionName);
385+
const size_t functionNameCharLength = body->GetDisplayNameLength();
386386
const size_t requiredCharCapacity = functionNameCharLength + suffixCharLength + 1;
387387
if(requiredCharCapacity > nameCharCapacity || name == NULL)
388388
{

0 commit comments

Comments
 (0)