Skip to content
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

Allocate memory during instantiation, fixing segfaults in a few plugins #18

Merged
merged 1 commit into from
Apr 8, 2022

Conversation

cbix
Copy link
Contributor

@cbix cbix commented Apr 7, 2022

This fixes #8 and fixes #13 + segfaults when testing with lv2lint by moving memory allocation in affected plugins from activation to instantiation.

allpass, comb and delay should also not set the buffer size based on the max_delay control, which is now left as a dummy port. I guess the idea was to let users set the max buffer size as a means of manual memory optimization, but can cause issues (again, malloc during activation) and LV2 hosts usually don't let users set parameters upon instantiation.

Also would be great to eventually have another stable release tagged, we're currently packaging this for Arch Linux with this patch applied :)

Thanks!

allpass, comb and delay should also not set the buffer size based on the
max_delay control, which is now deprecated.
@swh swh merged commit 3d75ab8 into swh:master Apr 8, 2022
@cbix cbix deleted the fix/activation-malloc branch April 8, 2022 08:00
@swh
Copy link
Owner

swh commented Apr 8, 2022

Great, thank you very much!

I will look into making a release soon.

@cbix
Copy link
Contributor Author

cbix commented Jun 25, 2022

I will look into making a release soon.

@swh that would be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

double free corruption in revdelay-swh.lv2 cleanup functions assume that activate() has been called
2 participants