Skip to content

Conversation

@lateralusX
Copy link
Member

If streaming thread was aborted with an error it will disable the session. This is not the normal scenario, since most tools will explicit ask to close session, but if there is a network connectivity causing failures to write to stream, session will first be disabled and then it will write NULL into freed memory, causing heap corruption.

Fix makes sure we reset streaming_thread before we eventually disable session, making sure it won't write into freed memory.

If streaming thread was aborted with an error it will disable the session.
This is not the normal scenario, since most tools will explicit ask to
close session, but if there is a network connectivity causing failures
to write to stream, session will first be disabled and then it will write
NULL into freed memory, causing heap corruption.

Fix makes sure we reset streaming_thread before we eventually disable
session, making sure it won't write into freed memory.
@ghost ghost added the area-Tracing-coreclr label Jun 8, 2021
@lateralusX
Copy link
Member Author

//CC @josalem

Copy link
Contributor

@josalem josalem left a comment

Choose a reason for hiding this comment

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

Good catch!

@lateralusX lateralusX merged commit c9fc354 into dotnet:main Jun 9, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jul 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants