forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move away from exposing internal EventPipe wait handle to EventPipeEv…
…entDispatcher. (dotnet#68320) * Move away from exposing internal EventPipe wait handle to EventPipeEventDispatcher. Fix for issue, dotnet#68032. EventPipe exposed and internal wait handle to EventPipeEventDispatcher. The wait handle is not a managed WaitableObject, but maps to runtime specific event types: CLREventStatic * on CoreCLR mono_w32event_create on Mono Overtime it appears that the underlying WaitHandle changed on none Windows platforms, so calls like: EventWaitHandle.Set Assumes that IntPtr used is a WaitableObject and on Mono this will cause a crash, but on CoreCLR, it will just be casted over to a WaitableObject and use it, so based on memory layout this could cause issue, but looking at the implementation, it appears it will always assume EventWaitHandle is signaled so won't touch any of the memory (but not signal the event). There have been an ambition in DispatchEventsToEventListeners to move this abstraction down into native code, get away from using a handle returned from EventPipeInternal.GetWaitHandle as a EventWaitHandle. This PR eliminate EventPipeInternal.GetWaitHandle and adds a SignalSession and WaitForSessionSignal icall's (Mono), qcall's (CoreCLR) and fix the issue caused by exposing the handle to managed code.
- Loading branch information
1 parent
cfa18c9
commit e67e4da
Showing
14 changed files
with
162 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.