Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Expose OSThreadId and TimeStamp on EventWrittenEventArgs #19002

Merged
merged 13 commits into from
Aug 1, 2018
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix contract violation in SimpleComCallableWrapper::BuildRefCountLogM…
…essage.
  • Loading branch information
brianrob committed Jul 18, 2018
commit ec265ed1babace3eb9834b74fb2e87a2c90eabee
30 changes: 18 additions & 12 deletions src/vm/comcallablewrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,18 +958,24 @@ void SimpleComCallWrapper::BuildRefCountLogMessage(LPCWSTR wszOperation, StackSS

if (ETW_EVENT_ENABLED(MICROSOFT_WINDOWS_DOTNETRUNTIME_PRIVATE_PROVIDER_Context, CCWRefCountChange))
{
SString className;
className.SetUTF8(pszClassName);
SString nameSpace;
nameSpace.SetUTF8(pszNamespace);

FireEtwCCWRefCountChange(
handle,
(Object *)obj,
this,
dwEstimatedRefCount,
NULL, // domain value is not interesting in CoreCLR
className.GetUnicode(), nameSpace.GetUnicode(), wszOperation, GetClrInstanceId());
EX_TRY
Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT Jul 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has something changed that now allows the functions in here to throw? Has this function always been capable of throwing an exception, just never had a catch around it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was caused by a previous change of mine: #17989. The uses of SString can throw.

{
SString className;
className.SetUTF8(pszClassName);
SString nameSpace;
nameSpace.SetUTF8(pszNamespace);

FireEtwCCWRefCountChange(
handle,
(Object *)obj,
this,
dwEstimatedRefCount,
NULL, // domain value is not interesting in CoreCLR
className.GetUnicode(), nameSpace.GetUnicode(), wszOperation, GetClrInstanceId());
}
EX_CATCH
{ }
EX_END_CATCH(SwallowAllExceptions);
}

if (g_pConfig->ShouldLogCCWRefCountChange(pszClassName, pszNamespace))
Expand Down