Uh oh!
There was an error while loading. Please reload this page.
Add test to make sure we release the ICorProfilerCallback interfaces - #41855
Merged
Conversation
ghost
commented
Sep 4, 2020
Tagging subscribers to this area: @tommcdon |
davmason
commented
Sep 14, 2020
ContributorAuthor
sdmaclea
suggested changes
Sep 14, 2020
sdmaclea
left a comment
Contributor
There was a problem hiding this comment.
- Terminate the wait loop on test complete
- Return result!=100 when test fails.
Uh oh!
There was an error while loading. Please reload this page.
josalem
reviewed
Sep 14, 2020
josalem
left a comment
Contributor
There was a problem hiding this comment.
I'm happy to see a test to catch this scenario 👍
Uh oh!
There was an error while loading. Please reload this page.
sywhang
reviewed
Sep 14, 2020
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
We don't actually release any ICorProfilerCallback* on shutdown, we only do on detach
Uh oh!
There was an error while loading. Please reload this page.
noahfalk
approved these changes
Sep 14, 2020
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or 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
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A recurring issue is that we add a new ICorProfilerCallback* interface and then forget to add the code to ~EEToProfInterfaceImpl to release it. See #41791 and #10756 for examples.
This test verifies that its destructor is called after detaching. As far as I can reason there isn't a good way to directly assert that all ICorProfilerCallback* interfaces are released, but in order to test new APIs we would have to change the base Profiler test class to inherit from that interface. So, unless we check in code without tests this will provide coverage.