#5441: unsafeCoerce'ing function to GHC.Prim.Any causes segfault
---------------------------------+------------------------------------------
Reporter: ulfn | Owner: simonmar
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.2.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: x86 | Failure: Runtime crash
---------------------------------+------------------------------------------
Comment(by simonpj@…):
commit 1466b0ca760a18afbcab9c4128f6a05d220a5968
{{{
Author: Simon Peyton Jones <[email protected]>
Date: Fri Sep 9 10:04:55 2011 +0100
Obey the exprArity invariants! Fixes Trac #5441
We were giving arity 2 to a function whose type was
Int -> Any
That contradicts the exprArity invariant
(see Note [exprArity invariant] in CoreArity), and
in turn led to function whose actually code-generated arity
was different that advertised in the interface file.
Result: seg-fault city.
compiler/coreSyn/CoreArity.lhs | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5441#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs