-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix a few memory issues found with ASan #6843
Conversation
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.
Do you plan on contributing the CAPS changes upstream? I checked https://github.com/moddevices/caps-lv2 and it appears the destructor still isn't virtual there.
@DomClark I guess next I should revert those changes in this PR and then later update the CAPS submodule if/when it gets merged upstream? |
I think it's fine to keep the changes here. It doesn't looks like we've updated CAPS in a long time, and doing so is probably a somewhat larger task that shouldn't be a prerequisite for this fix. We've made a number of changes to our vendored copy of CAPS anyway, so it's not as if there isn't precedent for fixing things here. |
We have an open PR with the upstream fork here: #4027. I think it's worthwhile to send any patches there. Technically, they should probably go to Tim Goetze. I'm not sure how often moddevices sends their code to him. He's pretty picky about patches, quoting:
If we decide not to, that's OK too... the patches will just get lost once we upgrade and we'll have to backtrack a little. |
@tresf I contacted Tim Goetze in early September and we agreed upon a solution to the memory leak, but he hasn't released a new version of CAPS yet. I don't know when/if he plans to. |
I used an AddressSanitizer build to find and fix some memory issues:
I'm sure there are more memory-related errors I could find and fix with ASan, but this is enough for now.