I don't know if this is relevant, but a while back I found a nasty bug in the GHC run time. It's present in at least versions 7.4.1 through 7.6.3. It causes seg faults on some foreign calls on 32 bit Intel (i686) architecture Linux when SELinux is present. I first noticed it in a gtk2hs program that worked fine when compiled under previous versions of GHC, but began crashing under newer versions of Fedora i686 (but not x86_64):


There are patches available that fix it in GHC 7.6.3. Petersen included the fix when he packaged GHC for Fedora 20.

-- Garrett Mitchener

On Sat, Apr 19, 2014 at 7:14 PM, koral <koral@mailoo.org> wrote:

You'll find in attachment to this mail a simple code (and the associated Makefile) to reproduce the segmentation fault.
It is based on the demo code from the webkitgtk3 package. The program crashes when trying to load any secured (HTTPS) webpage, while it works fine for non-secured ones.

I believe I have followed all the guidelines about how to write a multi-threaded GTK program, which are:
 * the main GTK loop must be run either in the main thread, or in a distinct bounded thread (= use forkOS, not forkIO);
 * all GTK calls from foreign threads must be done through postGUISync/postGUIAsync;
 * all GTK callbacks must NOT use postGUISync, as they are actually executed by the main GTK loop.

Either I missed something about those guidelines, or there is a bug in webkitgtk3.
Could you please assist ?

Kind regards.


Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
Gtk2hs-users mailing list