#5111: linux-powerpc : segfault in stage2 compiler
-------------------------+--------------------------------------------------
    Reporter:  erikd     |        Owner:                       
        Type:  bug       |       Status:  new                  
    Priority:  normal    |    Milestone:                       
   Component:  Compiler  |      Version:  7.1                  
    Keywords:            |     Testcase:                       
   Blockedby:            |   Difficulty:                       
          Os:  Linux     |     Blocking:                       
Architecture:  powerpc   |      Failure:  Installing GHC failed
-------------------------+--------------------------------------------------

Comment(by erikd):

 By adding Debug.Trace statements I've tracked this down to function
 `runAnnotation` in the file `compiler/typecheck/TcSplice.lhs`.
 Specifically this code:

 {{{
     -- Run the appropriately wrapped expression to get the value of
     -- the annotation and its dictionaries. The return value is of
     -- type AnnotationWrapper by construction, so this conversion is
     -- safe
     flip runMetaAW zonked_wrapped_expr' $ \annotation_wrapper ->
          case annotation_wrapper of
             AnnotationWrapper value | let serialized = toSerialized
 serializeWithData value ->
                 -- Got the value and dictionaries: build the serialized
 value and
                 -- call it a day. We ensure that we seq the entire
 serialized value
                 -- in order that any errors in the user-written code for
 the
                 -- annotation are exposed at this point.  This is also why
 we are
                 -- doing all this stuff inside the context of runMeta: it
 has the
                 -- facilities to deal with user error in a meta-level
 expression
              do De
                 seqSerialized serialized `seq` Annotation {
                     ann_target = target,
                     ann_value = serialized
                 }


 }}}

 Tracing a bit further it seems that the segfault occurs when `value` from
 the `AnnotationWrapper` is passed to the `toSerialized` function, and then
 `typeOf` is called on it.

 The most obvious explanation is that something got corrupted long before
 we even hit this code.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5111#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

Reply via email to