Fix memory errors related to EventPipe setup with COMPlus_EventPipeConfig#44068
Conversation
|
Tagging subscribers to this area: @maryamariyan |
|
@alpencolt is this PR for |
|
@maryamariyan it's for all platforms |
|
Thanks, this may need to be backported to 5.0 - I will handle that once this PR is merged. |
There was a problem hiding this comment.
Walked through the lifetime of the strings, and this should fix the described issue.
@sywhang I think this is the only place where XplatEventLoggerConfiguration is used. Should we subsume the Parse logic directly into EventPipeProviderConfiguration to reduce duplication and ownership transfers?
|
// Auto-generated message 69e114c which was merged 12/7 removed the intermediate src/coreclr/src/ folder. This PR needs to be updated as it touches files in that directory which causes conflicts. To update your commits you can use this bash script: https://gist.github.com/ViktorHofer/6d24f62abdcddb518b4966ead5ef3783. Feel free to use the comment section of the gist to improve the script for others. |
…nfig - XplatEventLoggerConfiguration configuration owns strings passed to EventPipeProviderConfiguration pProviders, and configurations are freed before pProviders are copied to EventPipeSessionProvider - NewArrayHolder shoud be used for pProviders to fix memory leak (delete[] instead of delete)
e0adb01 to
57e8f84
Compare
|
Rebased on new master with removed src/coreclr/src/ dir |
|
@josalem Can this be merged? |
|
I believe so. We recently added a C implementation of EventPipe we are intending on switching to, so we might need to port this change to there as well. That doesn't need to be part of this PR though. CC @lateralusX |
|
Thanks! |
Bug shows itself in release builds with
Correct, passed in env variable:
Incorrect, processed inside
EventPipe::Enable:cc @alpencolt