GNOME Bugzilla – Bug 749463
libgoffice-0.10 crashes in quad math functions
Last modified: 2015-05-17 23:54:22 UTC
When attempting to use goffice-0.10's quad math functions on Mac OS X, it crashes with a bus error (misaligned address). This was tested on Mac OS X 10.10.3, with goffice built using Apple clang 6.1.0, and was triggered in this case by launching Gnumeric. Macports applies a patch which fixes this problem by removing `const` from several declarations: https://trac.macports.org/browser/trunk/dports/gnome/goffice/files/patch-goffice-math-go-quad.diff This issue seems to be clang-specific; I'm unable to reproduce it when building goffice using GCC. Steps to reproduce: 1) Build goffice-0.10 on Mac OS X using Apple clang. 2) Build Gnumeric against this goffice. 3) Launch Gnumeric. Actual result: Gnumeric crashes. Expected result: Gnumeric launches as normal.
I'd like to see more information about that crash. I don't see why "const" should cause misaligned access.
Nevermind. You might see a bus error, but the bit about misalign access is wrong. We're being naughty and changing stuff we declared const during init. We evidently are not going to get away with that. I'll have to come up with some other solution.
This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution. I have applied a fix that I believe should work everywhere while still retaining the "const" in the outward API. Confirmation that this approach works for you is welcome.
Thank you - this fix works, and I've applied the patch to the goffice package in the Homebrew package manager for Mac OS X.