Stack overflow machine dependent?
Arjen van Weelden
A.vanWeelden at cs.ru.nl
Tue Dec 14 07:41:55 EST 2004
Simon Marlow wrote:
> On 14 December 2004 10:46, Arjen van Weelden wrote:
>>I compiled a Haskell 98 program using ghc 6.2 -O and ran the
>>executable, using main +RTS -H256m -s, on two similar computers:
>>PC 1: Athlon 1400, 512MB, Windows XP Prof SP2 (successful termination)
>>PC 2: Athlon XP 1800+, 512MB, Windows XP Prof SP2 (stack overflow)
>>The program runs successful within 1MB of stack on PC 1, but it exits
>>with a stack overflow error on PC 2.
>>Has anyone else observed such behaviour using the same binary, and
>>similar computers? I'm curious of what might trigger the stack
>>overflow. The program itself is partially generated and large, so
>>I'll omit it for the time being.
> Is the program completely self-contained and deterministic? i.e. does
> it read any files in the filesystem, check the time, or do anything that
> might give different results on the two machines?
This is exactly what makes the problem strange! Yes, it is completely
self-contained and deterministic. I forgot to mentions this, sorry.
The program looks like this:
main :: IO ()
main = putStr (f 100 0).
Where f is a referential transparent function that doesn't do IO or
More information about the Glasgow-haskell-users