-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
bug/ignore: potential memory leak #2493
Comments
Note: ripgrep doesn't appear to have any leakage issues on the same machine in the same testing environment. If this is just a problem with my usage of |
I think I need better evidence than a valgrind report to be honest. In the past, these sorts of things have been false positives. In particular, I don't believe valgrind distinguishes between "memory grows without bound" and "something was allocated but never freed." The latter is not actually a problem and it is not something I would consider a bug. So basically, if all you have is a valgrind report then that isn't really good enough for me absent other evidence. |
Maybe it is just a false-positive/ false detection. That's why the issue is titled "potential" memory leak. English is not my native language and I'm sorry if I missed some nuance there. What kind of tooling would you recommend for digging deeper? |
I don't think there is any tooling that can distinguish between the two classes of leaks I mentioned. The difference is semantic and in how the memory is used and whether it scales with the size of the input. So basically what has to happen is you need to trace the valgrind leaks back to a point in the source code and determine what kind of leak it is. Sometimes doing this is tricjy. IIRC certain memory allocators like jemalloc will trigger false positives, so it might be good to run valgrind under different allocators. |
Okay, thank you for the quick response. I'll try looking into it tomorrow and will close the issue for now. I will reopen it if anything specific can be identified. |
What version of ignore are you using?
0.4.20
and directlymaster
with stable rust (1.68.2
)Describe your bug.
ignore::walk::Walk
appears to be leaking memory duringwalk
by valgrinds analysis. I haven't been able to identify specifically where or if it's an invalid detection. It might also be related to thewalkdir
crate.What are the steps to reproduce the behavior?
Use the example code in any directory. Tested so far with both v0.4.20 and using the crate from
master
, see the full test and inspect the execution withvalgrind
.0.4.20
: CI run / repoExcerpt of relevant part of valgrind output:
The text was updated successfully, but these errors were encountered: