Template Haskell Crash
Simon Peyton-Jones
simonpj at microsoft.com
Thu Jan 9 10:37:00 EST 2003
Three problems here
1. Your program is ill-staged. Running the splice requires executing
'foo',
so 'foo' must be in another module.
2. GHC should report that as a staging error, but wasn't.
3. But even then it should not have crashed. Its should have reported
a linking error when trying to run the splice.
I've fixed (2) and (3)
Simon
| -----Original Message-----
| From: Wolfgang Thaller [mailto:wolfgang.thaller at gmx.net]
| Sent: 27 December 2002 12:32
| To: glasgow-haskell-bugs at haskell.org
| Subject: Template Haskell Crash
|
| Compiling the following program causes GHC to segfault with the HEAD
on
| both Mac OS X and Red Hat Linux/x86:
|
| module THCrash where
|
| import Language.Haskell.THSyntax
|
| foo = [| 1 + 2 |]
|
| $(sequence [val (pvar "bar") (normal foo) []])
|
|
| Running the compiler with +RTS -DS (sanity checking) yields the
| following error messages:
|
| On Mac OS X:
| ghc-5.05: internal error: checkStackFrame: weird activation record
| found on stack (0x134fdd8).
| On Linux, a segfault happens at Sanity.c line 85, in
| checkClosureShallow.
|
|
| Cheers,
|
| Wolfgang
|
| _______________________________________________
| Glasgow-haskell-bugs mailing list
| Glasgow-haskell-bugs at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
More information about the Glasgow-haskell-bugs
mailing list