logo       

RE: Template Haskell Crash: msg#00013

lang.haskell.glasgow.bugs

Subject: RE: Template Haskell Crash

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@xxxxxxx]
| Sent: 27 December 2002 12:32
| To: glasgow-haskell-bugs@xxxxxxxxxxx
| 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@xxxxxxxxxxx
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise