"Hello World" program core dumps with GHC 4.08.1 on HPUX 10.2 0

Simon Marlow simonmar at microsoft.com
Thu Feb 8 11:23:29 EST 2001


> I'm not sure whether I'm doing something wrong, but I've just 
> downloaded the
> HPUX 4.08.1 binary distribution of GHC and have installed it 
> with GCC 2.95.2
> (downloaded from HPUX porting site) along side it. I'm 
> running these on HPUX
> 10.20.

I seem to recall having some trouble with 2.95.2 on HPUX.  I think the
port was buit with 2.7.2.1.

> It goes into the 'if' statement and hence the top element of 
> Sp becomes a
> pointer to __init_Prelude(). It then tries to call this by 
> reading Sp's top
> element and then goes to that address. This would be fine 
> except that what
> is really placed on Sp by the assignment is a pointer to the 
> function's PLT
> entry which has (function address, DLT pointer) pairs for 
> each function. The
> "goto" is just doing a simple vectored branch into the table 
> rather than
> using its entries to find the true address and jumping to that.

Hmm.  I also vaguely remember having some trouble along these lines too,
but I thought it was fixed in 4.08.1 (and I don't know much about HPUX
dynamic linking I'm afraid).

Your analysis looks right - indeed the code is supposed to be jumping
direct to the function, and the PLT entry is getting in the way.  Rather
than jump through the indirection, we're trying to get the real address
of the function on the stack.  

If you feel like investigating further, we'll be happy to incorporate
any patches you come up with - unfortunately we're a bit short on spare
brain cycles here at the moment, with all attention diverted to getting
a GHCi release out ASAP.

Cheers,
	Simon




More information about the Glasgow-haskell-bugs mailing list