-
Notifications
You must be signed in to change notification settings - Fork 260
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
Invalid generators were not removed from zone list #810
Conversation
fluid_list_remove() should receive the beginning of a list, so it can adjust the predecessor of the element to be removed. Otherwise the element would remain in the list, which in this case led to a use-after-free afterwards.
@veritas501 You may give it a test. |
Okay. It seems that the old bug has been fixed. I'm still testing if there are more bugs. @derselbst |
I must admit I don't understand why this fixes the bug. |
No, |
Ah, of course! Hm... then I have a hard time understanding the purpose of |
The purpose of
The core logic around it already exists since "Initial Revision", so I'm a bit cautious to touch it. It would probably be a good idea to write a bunch of test cases, before changing it. |
Looking into |
I don't see how the global zone relocation code will ever have run. As far as I understand it, the following check will always be false, because fluidsynth/src/sfloader/fluid_sffile.c Line 1517 in b8fb6c8
And looking back through the history of this code, I arrive at the initial commit which has the same behaviour. So I guess we could either remove the relocation code altogether, or fix try to fix it. |
Yes, I also had the feeling it has to do with moving around zones. I also don't see how
I arrived at iiwusynth: https://cvs.savannah.nongnu.org/viewvc/iiwusynth/iiwusynth/src/iiwu_defsfont.c?revision=1.1&view=markup We could ask Peter, I'm sure he will remeber what he did 19 years ago :D
I think we should fix it. Ideally by creating test cases. But this will take time. I would prefer to merge this and release 2.1.8 afterwards (even if it's not perfectly correct). |
Yes, or like that :-) That should do it, at least until we cleanup this code properly. |
Great! Then I will complete this tomorrow, to give @veritas501 the chance to report back. |
fluid_list_remove() should receive the beginning of a list, so it can adjust the predecessor of the element to be removed. Otherwise the element would remain in the list, which in this case led to a use-after-free afterwards.
fluid_list_remove()
should receive the beginning of a list, so it can adjust the predecessor of the element to be removed. Otherwise, the element would remain in the list, which in this case led to a use-after-free afterwards.Resolves #808