#4348: bounds error on sparc when compiling haddock
-------------------------+--------------------------------------------------
    Reporter:  maeder    |        Owner:  tibbe              
        Type:  bug       |       Status:  infoneeded         
    Priority:  highest   |    Milestone:  7.0.1              
   Component:  Compiler  |      Version:  7.1                
    Keywords:            |     Testcase:                     
   Blockedby:            |   Difficulty:                     
          Os:  Solaris   |     Blocking:                     
Architecture:  sparc     |      Failure:  Building GHC failed
-------------------------+--------------------------------------------------

Comment(by tibbe):

 I believe I have a fix (see attached). It removes the problem in my tree,
 but given the build issues I've been having I'd like someone to verify. To
 test, just apply the patch to the base library, rebuild and run Ian's
 short example program (`q.hs`).

 The bug is somewhere inside `System.Event.Array.ensureCapacity'`. I'm not
 sure exactly what's going on, but lots of printf-debugging later I have
 concluded that the `firstPowerOf2`, as used inside `ensureCapacity'`
 someone produces the wrong result, causing a too small array to get
 allocated. I cannot reproduce this on my x86 machine.

 The attached patch has a better implementation of the `firstPowerOf2`
 function.

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