Product: Fedora https://bugzilla.redhat.com/show_bug.cgi?id=907515
Bug ID: 907515 Summary: ghc 7.4.1 and 7.4.2 compile a correct gtk2hs program such that it crashes with a segmentation fault Product: Fedora Version: 18 Component: ghc Severity: unspecified Priority: unspecified Reporter: garrett.mitchener@gmail.com
Description of problem:
I wrote a Haskell program using gtk2hs. It works fine on Fedora 17 under ghc 7.0.4. However it crashes with a segmentation fault when compiled on Fedora 18 or rawhide(19). The crash occurs the first time an action added to the gtk loop with timeoutAddFull runs.
I wrote a minimal test case that triggers the problem and posted it here:
http://hackage.haskell.org/trac/ghc/ticket/7629
It seems to be a compiler or run-time-system bug in ghc 7.4.1 and 7.4.2 or possibly gtk2hs, because the binary built on F18 or rawhide crashes when run on F17, and the binary built on F17 runs without a problem on F18.
Furthermore, if I disable selinux on the kernel command line at boot time, the crash vanishes in F18 and rawhide. I don't know why-- the crash doesn't trigger any selinux error messages, just a segmentation fault.
Jens Petersen reported to me that the crash does not occur on 64 bit test machines on Fedora 18, but he confirmed that it does occur on 32 bit test machines.
I've run into pointer alignment problems with ghc before, where alignment pragmas in C modules are somehow broken when the C module is linked with a ghc program, so that may be the case here?
Version-Release number of selected component (if applicable): ghc 7.4.1 and 7.4.2.
How reproducible:
Every time
Steps to Reproduce:
Compile and run the test program posted in the haskell.org trac bug report
http://hackage.haskell.org/trac/ghc/ticket/7629
I'm also posting the bug here in case someone else runs into it.