Stardict loads the cache files using mmap and then casts the resulting char * to guint32 * which breaks the alignment. If it sigbuses depends on the installed dictionaries, with those listed in bug #258485 it does. The attached patch which makes it use the align-safe get_uint32 function and skips loading cache files on startup. This makes it slightly slower(well, not really measureable) but that's better than sigbussing, right? Maybe upstream can rewrite the cache-loading functions to load the data aligned, but it looks like that would be a lot of rewriting...
Created attachment 187999 [details, diff] stardict-sigbus.patch
Thank you for report Friedrich. Was this reported upstream?
I've emailed upstream about this, today. I'd rather just wait a few days (since it's a workaround), and see what they have to say before bumping, and including the patch. There would be no point in requesting other architectures, but SPARC to stable it, because the patch adds tests for the pre-processor, which only applies to ARM/SPARC. That said, this is currently blocking bug #288555, which is needed for GCC-4.4.x stabilization. Depending on their answer, we can remove (for now?) the keyword from the affected versions (>=3.0.1).
I've heard nothing back from upstream. Not sure what would be better: 1. Marking this specific version as -sparc (as far as I know 2.x works). If I got the dependencies right, it wouldn't be needed to remove the keywords from the dictionaries. Or, 2. Applying the patch (workaround), and bumping the ebuild. Any thoughts, Raúl?
Created attachment 222719 [details, diff] stardict-fix-bus-sig-on-sparc.patch Got this patch from one of its developers. Will test as soon as time permits.
Created attachment 223233 [details, diff] stardict-3.0.1-fix-bus-sig-on-sparc.diff Here's an updated patch which applies cleanly against 3.0.1, and makes the cache code work on SPARC (other architectures might benefit from this, as well).
(In reply to comment #6) > Created an attachment (id=223233) [details] > stardict-3.0.1-fix-bus-sig-on-sparc.diff > > Here's an updated patch which applies cleanly against 3.0.1, and makes the > cache code work on SPARC (other architectures might benefit from this, as > well). > applied in -r3