Incompatibilty with memory leak detectors
Most memory leak detectors redefine "alloc", "realloc" and "free" (and others). In struct _LIBSSH2_SESSION, we have fields with these names. This breaks the syntax when using such a memory leak detector. Could you rename these fields (like "alloc_func")? Thanks
Leakage detector should have the ability to detect leakage without source code change, if the detector is too weak and relay on source code change, how can they detect leakage inside a pre-compiled library?
Thanks!
I agree with @tsengjun. We've tracked memory leaks for a long time already so I don't see why we need to change code. valgrind and memory sanitizers work fine already.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I understand that I didn't explain the whole issue. When working with Visual Studio on a solution with several dozens projects, if you need to track a memeory leak, you need to include your debugging code in all libs in order to understand where an not deallocated block comes from. That can be done in 30 seconds. If you need to do it for every single project but libssh2, it's very long and cannot be undone easily. So I understand you do not need this, but it would help your users in some situations and it's such a trivial change without any drawback ... that I hope you will accept it. Thanks a lot for your time
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any chance to make this trivial change? Thanks a lot
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Could anyone look at this? Thanks a lot
@marcstern I still don't fully understand why your leak detector needs to re-write alloc/free, etc. Feel free to submit a PR with your changes, but we're not likely to make these changes since it works as-is with most leak detectors.
As @willco007 said, if this is resolved by renaming a few internal symbols, I think we're ready to accept a PR for this.