This applies to sidplayfp 1.2.0. Please disregard if it has already been fixed in the development version.
It looks to me as if InitConfig::clear() should initialize emulation_s.engine to NULL. Otherwise, there will be uninitialized data treated as a string during startup, which can cause the program to crash.
I originally reported this in the Debian package for sidplayfp [1] (which, apparently because of the compiler flags used, always crashes for me) but since I haven't heard anything from there in a while, and since it doesn't appear to be a Debian-specific bug, I'll report it here as well.
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744794
Thank you, applied in svn (r1549), pending for next release.
Thanks for the quick response! I'm not sure of the exact compiler flags Debian uses, so I haven't been able to reproduce the crash when building from the source myself. But I can at least see that with the fix, Valgrind no longer complains about uninitialized values.
It's probably some hardening flag that triggers a crash when reading outside the allocated memory area, I couldn't reproduce it myself too.
Anyway it's fixed in 1.2.1.