Hey everyone,<br><div class="gmail_quote">
<br>
I&#39;m looking for help with a seg fault that takes out both my ghci and 
darcs as well as anything that uses haskeline. A bug on the haskeline 
trac hasn&#39;t gotten any response so I figured I might as well figure this
 out myself and get ghci up and running again.<br>
<br>
Using the test program below I get the same segmentation fault, so I run
 it using gdb and get the following,<br>
<br>
Program received signal SIGSEGV, Segmentation fault.<br>
0x000000000053fdce in base_ForeignziCziString_zdwa_info ()<br>
<br>
My knowledge of this is very limited from here on out so here is what I 
was able to get together.<br>
<br>
On the 20th call of base_ForeignziCziString_zdwa_info <br>
r14 is 0 so<br>
<br>
0x000000000053fdce &lt;+22&gt;:    movsbq (%r14),%rax<br>
<br>
produces the segfault.<br>
>From what I understand this is happening in the Foreign.C.String module 
but thats as much as I know. <br>
Anyone have advice on where to go next? <br>
<br>
System info:<br>
Distribution: gentoo amd64<br>
Ghc version: currently 6.12.1 (though the segfault happends on any of 
the ones with haskeline)<br>
Haskeline version: 0.6.2.2<br>
<br>
Here is the test program <br>
<br>
----------------------------------------------------------------------------------------------------<br>
module Main where<br>
<br>
import System.Console.Haskeline<br>
import System.Environment<br>
<br>
{--<br>
Testing the line-input functions and their interaction with ctrl-c 
signals.<br>
<br>
Usage:<br>
./Test          (line input)<br>
./Test chars    (character input)<br>
--}<br>
<br>
mySettings :: Settings IO<br>
mySettings = defaultSettings {historyFile = Just &quot;myhist&quot;}<br>
<br>
main :: IO ()<br>
main = do<br>
        args &lt;- getArgs<br>
        let inputFunc = case args of<br>
                [&quot;chars&quot;] -&gt; fmap (fmap (\c -&gt; [c])) . 
getInputChar<br>
                _ -&gt; getInputLine<br>
        runInputT mySettings $ withInterrupt $ loop inputFunc 0<br>
    where<br>
        loop inputFunc n = do<br>
            minput &lt;-  handleInterrupt (return (Just &quot;Caught 
interrupted&quot;))<br>
                        $ inputFunc (show n ++ &quot;:&quot;)<br>
            case minput of<br>
                Nothing -&gt; return ()<br>
                Just &quot;quit&quot; -&gt; return ()<br>
                Just &quot;q&quot; -&gt; return ()<br>
                Just s -&gt; do<br>
                            outputStrLn (&quot;line &quot; ++ show n ++ &quot;:&quot; ++ s)<br>
                            loop inputFunc (n+1)<br>
<br>
------------------------------------------------------------------------------------------------------------------------
 <br><br>Syfran<br>
</div>