summaryrefslogtreecommitdiff
path: root/src/vm
diff options
context:
space:
mode:
authorJosé Rivero <jorive@microsoft.com>2019-06-26 09:45:47 -0700
committerGitHub <noreply@github.com>2019-06-26 09:45:47 -0700
commite23ea61503b2d7b724a7976201dd9e44001622ed (patch)
treef57adf93f51c0996e7d0d0acf0856c2156b776d4 /src/vm
parentff02091612aa42f79e5d3adbd608b36da9f47fdb (diff)
downloadcoreclr-e23ea61503b2d7b724a7976201dd9e44001622ed.tar.gz
coreclr-e23ea61503b2d7b724a7976201dd9e44001622ed.tar.bz2
coreclr-e23ea61503b2d7b724a7976201dd9e44001622ed.zip
Fix disabling wrong session on EventPipe::Shutdown (#25409)
- It's safe to call EventPipe::Disable during shutdown (eventpipe being disabled)
Diffstat (limited to 'src/vm')
-rw-r--r--src/vm/eventpipe.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vm/eventpipe.cpp b/src/vm/eventpipe.cpp
index 92d2875c04..670c38692d 100644
--- a/src/vm/eventpipe.cpp
+++ b/src/vm/eventpipe.cpp
@@ -143,7 +143,7 @@ void EventPipe::Shutdown()
{
EventPipeSession *pSession = s_pSessions[i].Load();
if (pSession)
- Disable(static_cast<EventPipeSessionID>(1ULL << i));
+ Disable(reinterpret_cast<EventPipeSessionID>(pSession));
}
// dotnet/coreclr: issue 24850: EventPipe shutdown race conditions
@@ -327,7 +327,7 @@ void EventPipe::DisableInternal(EventPipeSessionID id, EventPipeProviderCallback
}
CONTRACTL_END;
- if (!Enabled() || !IsSessionIdInCollection(id))
+ if (!IsSessionIdInCollection(id))
return;
// If the session was not found, then there is nothing else to do.