Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle sessionId as ulong instead of long in EventPipeSession.cs. (#4345
) Session id is a uint64 in runtime as well as specified as a uint64 in IPC protocol, https://github.com/dotnet/diagnostics/blob/main/documentation/design-docs/ipc-protocol.md#returns-as-an-ipc-message-payload. EventPipeSession.cs however handled it as a long instead of an ulong, currently that doesn't affect release builds since it doesn't do much with the id except passing it back to stop the session, but in debug builds there is an assert that validates that session id > 0. On Android physical devices it is not uncommon to get code and memory allocated at high addresses, including having the high order bit set and when that happens, EventPipeSession.cs will see a negative session id and assert on debug builds. Fix adjust session id as ulong inline with IPC protocol, it also makes sure keyword serialized when starting a session is handled according to IPC specification, but only when serialized into the payload, it will still be typed as long inside EventPipeProvider since it is a public property.
- Loading branch information