#5453: Floating a non-exhaustive case can cause seg-faults
---------------------------------+------------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.2.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by simonpj@…):
commit bd6f5de7bb41f868522c6db2ad2793477840297e
{{{
Author: Simon Peyton Jones <[email protected]>
Date: Mon Sep 5 08:21:23 2011 +0100
Fix two bugs in caes-floating (fixes Trac #5453)
The problem is documented in the ticket. The patch
does two things
1. Make exprOkForSpeculation return False for a non-exhaustive case
2. In SetLevels.lvlExpr, look at the *result* scrutinee, not the
*input* scrutinee, when testing for evaluated-ness
compiler/coreSyn/CoreUtils.lhs | 42 ++++++++++-
compiler/simplCore/FloatOut.lhs | 5 +-
compiler/simplCore/SetLevels.lhs | 157
+++++++++++++++++++++++++-------------
3 files changed, 150 insertions(+), 54 deletions(-)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5453#comment:1>
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