[project @ 2002-06-28 14:06:52 by simonpj]
authorsimonpj <unknown>
Fri, 28 Jun 2002 14:06:54 +0000 (14:06 +0000)
committersimonpj <unknown>
Fri, 28 Jun 2002 14:06:54 +0000 (14:06 +0000)
commit33ce2a14d1220bd3b9f00e8d461b8f9ef31ee411
tree10ae28eab5b61bb2ef1a19fcc92e34cb0266b1b1
parent9e9367d67db0f6c4834c1f706b10afffdfac86d4
[project @ 2002-06-28 14:06:52 by simonpj]
-----------------------------------
Fix the CAF info field of error Ids
-----------------------------------

A bizarre bug.   In MkId, we build the Id for various error-y
Ids (like pAT_ERROR_ID) that we grab out of thin air in various
places (like the desugarer).  They were marked as not referring
to any CAFs, but this was a lie!  In fact, they refer to 'untangle'
(see GHC.Err) and thence to a CAF.

Result: GC crash under very obscure circumstances.  (Rob's optimistic
evaluator tickled it.)

Solution: give them more conservative IdInfo.

Two other better solutions to think about:

* Don't grab them out of thin air; instead get them from
  an interface file.

* Treat them as always-live (requires mod to garbage collector)
  so they don't need to be mentioned in SRTs at all
ghc/compiler/basicTypes/IdInfo.lhs
ghc/compiler/basicTypes/MkId.lhs