-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Has anybody used enable-float lately? #287
Comments
Me neither, but you are correct.
Which build? fluidsynth 1.1.6 with autotools or 1.1.8 with cmake?
Nothing relevant that I'm currently aware of. The synth has changed a little, but it seems you dont even get there. Will try a float build myself and do some tests within the next days. In the meantime, here's the diff. Keep looking for |
I've been building FluidSynth with enable-floats quite often over the last few weeks and didn't notice any problems. Are you really using the 1.1.8 release, or the current master (which also reports as 1.1.8 I think?). |
Thanks for quick responses.
1.1.8 + double OK / 1.1.8 + float NOK / 1.1.6 + float from old sourceforge tarball build with autotools OK @mawe42 I did already check for some suspicious code in git but did not find some. So this is the situation as I see it: |
Maybe start with trying 1.1.6 + cmake + floats. Or have you tried that already? |
|
@schnitzeltony Pls make sure you insert a blank line between the quote and your comment. It drives me crazy otherwise. |
I rebuilt my image completely and the issue is gone! So everybody I caused wasting time on this: Sorry & Thanks a lot! |
Dont be sorry, I actually just fixed a buffer overrun in a13cb63. At least I hope so, because even after reverting the fix, the segfault is gone O_o |
The embarrassing part: After I wrote my recent 'Everything is fine - sorry' comment, I found out that I did not have floats activated properly: For some reason I had 'enable-float' instead of 'enable-floats' in my build. After fixing this I saw segfaults again, my ears turned red and I was wondering how to explain this here... And now the fun part: After including the patch you just created it works - and I get an idea what happened: fluid_synth_nwrite_float is called by worker thread. It overwrites the variables I was using magically in the 'background'. |
Hi,
First what happened:
I have the following setup on RaspberryPi3: qtractor -> fluidsynth-dssi (slightly reworked: configurable to make use of synth.cpu-cores) -> fluidsynth. A few weeks ago I updated fluidsynth 1.1.6 -> 1.1.8. With this update the build system was changed from autotools to cmake. I did not notice that the default is different for enable-float:
After discovering this, I changed to enable-float and run now into very strange errors:
In the setup phase fluidsynth-dssi allocates memory by calloc (see https://github.com/schnitzeltony/fluidsynth-dssi/blob/030273ab3b9c167a5b237bdabb8c59f93f1e68f7/src/fluidsynth-dssi.c#L343). This works fine when using double for fluidsysnth but when using float, it seems to return NULL. I say 'seems' because I debugged and stepped into calloc: After doing allocation, calloc returns with memset which should return memory pointer because it is feeded with plausible values. Stepping into memset was not helpful because it uses asm code.
From my experience these kind of 'impossible' errors happen in case of buffer overflow.
To get more information I switched back to fluidsynth 1.1.6 using autotools / floats: Works fine again.
What I don't understand: Until the position the error happens there are not many calls into fluidsynth (see the lines before calloc):
So what has changed between 1.1.6 and 1.1.8 causing this? Suggestions welcome...
The text was updated successfully, but these errors were encountered: