Ticket #3279 (closed merge: fixed)
Segmentation fault in reactive program
| Reported by: | Baughn | Owned by: | igloo |
|---|---|---|---|
| Priority: | high | Milestone: | 6.10.4 |
| Component: | Runtime System | Version: | 6.11 |
| Keywords: | Cc: | int-e@… | |
| Operating System: | Unknown/Multiple | Architecture: | x86_64 (amd64) |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
Trying to debug reactive, I triggered what appears to be a GHC bug. To clarify:
- Replacing "foo unamb bar unamb baz" with foldl1 unamb [foo,bar,baz] in one particular function causes a segmentation fault at runtime, in all possible permutations of -threaded/nonthreaded and GHC 6.10.3/6.11. Further, a number of different changes do the same, quite unpredictably.
The hackage version of reactive does not exhibit this bug. I've attached a quite minimal patch to it that causes this, as well as a test program to trigger it.
I've been trying to debug this myself, with very little success. No level of core-lint or debug checks causes this code to trigger assertions instead of outright segfaults.
Incidentally, lazysmallcheck-0.3, a dependency of reactive, does not compile against 6.11 due to a name change in the Data.Generics interface. I've uploaded a fixed version to http://brage.info/~svein/lsc.tar.gz.

