After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 749463 - libgoffice-0.10 crashes in quad math functions
libgoffice-0.10 crashes in quad math functions
Status: RESOLVED FIXED
Product: libgoffice
Classification: Other
Component: General
0.10.x
Other Mac OS
: Normal major
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2015-05-16 08:25 UTC by Misty De Meo
Modified: 2015-05-17 23:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Misty De Meo 2015-05-16 08:25:12 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.
Comment 1 Morten Welinder 2015-05-17 11:52:55 UTC
I'd like to see more information about that crash.

I don't see why "const" should cause misaligned access.
Comment 2 Morten Welinder 2015-05-17 22:49:56 UTC
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.
Comment 3 Morten Welinder 2015-05-17 23:31:59 UTC
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.
Comment 4 Misty De Meo 2015-05-17 23:54:22 UTC
Thank you - this fix works, and I've applied the patch to the goffice package in the Homebrew package manager for Mac OS X.