-
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
Potential memory leak in clang triggered by findScope
#16121
Comments
In a similar issue: #14199, the problem was avoided by reducing the number of (indirect) calls to |
A smaller reproducer here. It seems the problem is triggered by TTree::Write
|
And a oneliner reproducer here:
|
findScope
.findScope
I ran the above code in a for loop to see if the leak is recurring. I increased the iteration count by a significant factor, but the leak remained constant and did not increase with the iteration count. So maybe we just need to add this to the suppression file? |
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
I think I agree with Valgrind's complaint here, I propose a fix in #16150. |
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
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
Check duplicate issues.
Description
As reported in https://root-forum.cern.ch/t/mem-leak-even-with-suppression-file/60330, we just simple executable:
CreateTreeTestv2.tar.gz, we get definitively lost report by valgrind:
Are those a real leak (they accumulate and could have been deleted), hoarding (they accumulate, are in use and can not be delete until the end) or one time (they are just not cleaned-up at the end?)
Reproducer
CreateTreeTestv2.tar.gz
ROOT version
Moving from 6.26/06 to 6.28/04 we’ve still a very large increase of mem leaks and it is still present in v6.32.02
Installation method
unknown
Operating system
Linux
Additional context
#13130
The text was updated successfully, but these errors were encountered: