#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:6 igloo]:
> Thanks, I've applied the cast warning fixes.
>
> For the fat archive support, I've attached an untested patch which
merges bits of yours together, so there is less code duplication. Don't we
need something to stop it carrying on past the end of this arch's section,
though?
>
> Milestoning for 7.2.1, as this isn't blocking anything AFAIK.
Thank you for cleaning up the patch; I'll give it a try.
I don't think we need anything to prevent reading past the host
architecture's archive.
The header for each archive within the fat archive contains the length of
the archive in bytes. As long as we use that instead of just blindly
searching for end-of-file, we should be OK. If we run off the end, we
should fix the archive loader to read the archive length.
Also, the original patch would barf if it tried to read more than
nfat_arch fat_header blocks, so it wouldn't run past the headers into the
archives. I think your patch does the same.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4828#comment:7>
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