Opened 5 years ago

Closed 5 years ago

#7628 closed feature request (fixed)

Improve error message when mixing 32bit and 64bit images

Reported by: morabbin Owned by: igloo
Priority: normal Milestone:
Component: Compiler Version: 7.6.1
Keywords: Cc:
Operating System: MacOS X Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


Since we know when the user has mixed 32 and 64 bit images, let's say so in the error message. Before:

Loading object (static) dist/build/HOC_cbits.o ... ghc: dist/build/HOC_cbits.o: Bad magic. Expected: feedfacf, got: feedface.

ghc: panic! (the 'impossible' happened)
  (GHC version 7.6.1 for x86_64-apple-darwin):
        loadObj "dist/build/HOC_cbits.o": failed

Please report this as a GHC bug:


Loading object (static) dist/build/HOC_cbits.o ... ghc-stage2: Could not load image dist/build/HOC_cbits.o: bad magic!
  Expected feedfacf (64bit), got feedface (32bit).

ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 7.7.20130124 for x86_64-apple-darwin):
        loadObj "dist/build/HOC_cbits.o": failed

Patch to come.

Attachments (1)

0001-Patch-for-7628-improve-error-message-when-mixing-32-.patch (1.4 KB) - added by morabbin 5 years ago.
Patch for #7628

Download all attachments as: .zip

Change History (5)

comment:1 Changed 5 years ago by morabbin

Status: newpatch

comment:2 Changed 5 years ago by simonpj

difficulty: Unknown
Owner: set to igloo

Assigning to Ian for patch review

comment:3 Changed 5 years ago by andy.adamsmoran@…

commit 12e3d3f4690d76b57ca70cdfdbad049fabd79bde

Author: Andy Adams-Moran <>
Date:   Fri Jan 25 11:11:01 2013 -0800

    Patch for #7628: improve error message when mixing 32 and 64 bit images (on Mac OS X)

 rts/Linker.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

comment:4 Changed 5 years ago by igloo

Resolution: fixed
Status: patchclosed

Applied, thanks

Note: See TracTickets for help on using tickets.