#4828: ghci fails to load fat binary archives on OS X
---------------------------------+------------------------------------------
    Reporter:  gwright           |        Owner:  igloo     
        Type:  bug               |       Status:  patch     
    Priority:  normal            |    Milestone:  7.2.1     
   Component:  Runtime System    |      Version:  7.0.1     
    Keywords:                    |     Testcase:            
   Blockedby:                    |   Difficulty:            
          Os:  MacOS X           |     Blocking:            
Architecture:  Unknown/Multiple  |      Failure:  GHCi crash
---------------------------------+------------------------------------------

Comment(by gwright):

 Replying to [comment:11 igloo]:
 > Replying to [comment:8 gwright]:
 > >
 > > I checked the loadArchive routine and it does get the length of an
 archive from the archive header, so we should never run past the end.
 >
 > Where does it do that?
 >
 > As far as I can see the
 > {{{
 >     while(1) {
 >         n = fread ( fileName, 1, 16, f );
 > [...]
 >     }
 > }}}
 > loop will keep reading off the end of the arch's segment.

 Hmm. I see where it finds the length, but you're right that it looks as if
 it keeps reading until the end of the file, rather than the end of the
 archive.  I'll add some debug statements so I can follow along.  If it
 really is reading past the end of the archive, I'll fix it.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4828#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to