Illegal instruction in GHC 6.5 generated code.

Simon Marlow simonmarhaskell at gmail.com
Fri Jun 23 07:10:19 EDT 2006


Caio Marcelo wrote:
> (If this is the wrong list for this, please tell me. I tried
> Glasgow-Haskell-Bugs, but message got hold in moderation)
> 
> Hello,
> 
> Using GHC 6.5 from darcs repo ("pulled" in 19/Jun), the following
> snippet of code seems to cause illegal instruction error on the
> generated code. The error disappears if I use the Dummy instance on
> top of Refeable. The code is from my bindings to Judy library,
> revision 10752 in subversion.
> http://svn.openfoundry.org/pugs/third-party/HsJudy/
> http://svn.openfoundry.org/pugs/third-party/judy/            #
> original C lib code
> 
> To test it you'll need to compile (./configure; make # but not
> necessarily install) the original library in
> third-party/judy/Judy-1.0.3. Back in HsJudy, change the Makefile to
> static link option.
> 
> HsJudy$ make testmap
> HsJudy$ ./testmap
> 
> Sorry, I tried to come up with an simpler instance of the problem but
> didn't found one. The program depend on WordPtr which isn't available
> in GHC 6.4.2, so I couldn't test it in stable version. It was tested
> on my amd64, linux 2.6.16 and in audreyt's machine (OSX I think).

I tried to reproduce this without success.  I grabbed judy and HsJudy as 
above using SVN, with -r 10752.

Running testmap on x86_64 using last night's GHC build gives me:

~/scratch/HsJudy > ./testmap
# Map tests:
elems:           (NEW on 0x00002ae76b178010) ok
simple:          (NEW on 0x00002ae76b178100) ok
delete:          (NEW on 0x00002ae76b178160) ok
overwrite:       (NEW on 0x00002ae76b178220) ok
member:          (NEW on 0x00002ae76b1782b0) ok
elems:           (NEW on 0x00002ae76b178358) ok
keys:            (NEW on 0x00002ae76b178448) ok
int-key map:     (NEW on 0x00002ae76b1785b0) ok

What did I do wrong?

I did have to modify the Makefile a bit to tell it where to find Judy.h, 
since I don't have Judy installed here.

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list