-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cling] Forcefully clean up TemplateIdAnnotation
s
#16150
Conversation
Upstream Clang keeps TemplateIdAnnotations around "if they might still be in the token stream." See upstream commit for more details: llvm/llvm-project@6163aa9 (included in Clang 11, in ROOT since the upgrade to LLVM 13) This reasoning doesn't apply when we fully reset the Parser state in ParserStateRAII's destructor, and we expect the swapped out vector of TemplateIdAnnotations to be empty in order to not leak. Fixes root-project#16121
@smuzaffar, could we test that PR on cmssw? |
sure, cmssw tests are running via cms-sw#207 now |
Test Results 13 files 13 suites 2d 18h 21m 13s ⏱️ Results for commit 9f6c0b3. |
cmssw tests look good |
Thanks Shahzad! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@dpiparo this could be a candidate for backporting. Probably not to 6.30, which is already in production, but we may still have a window to fix this memory leak before 6.32 gets fully approved for data taking next year... |
Discussed with Danilo: We will not backport this to 6.32 because there is a risk of breaking stuff. It fixes a memory leak, but it is bounded as confirmed by Dev's tests, and was only found one and half years after it's introduction during the upgrade to LLVM 13. |
Upstream Clang keeps
TemplateIdAnnotation
s around "if they might still be in the token stream." See upstream commit for more details: llvm/llvm-project@6163aa9 (included in Clang 11, in ROOT since the upgrade to LLVM 13)This reasoning doesn't apply when we fully reset the
Parser
state inParserStateRAII
's destructor, and we expect the swapped out vector ofTemplateIdAnnotation
s to be empty in order to not leak.Fixes #16121