GHCI Crashes on self referential local variable
f :: Int -> Int
f x =
let p = x*x
in
let p = p*x
in p
Causes a segfault of GHCI on Windows XP Service Pack 2, and unbounded memory consumption on Linux. There is no output when the crash occurs, after invoking the function (for example f 7) it just immediately drops back to a command prompt in Windows. I would expect some sort of error message to be printed, perhaps <loop>, and then return gracefully to the GHCI prompt.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.10.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |