
Hi, Am I confused or does nhc98 assume that all pointers are < 2^31? On m68k malloc is giving me stuff above 0xc0000000 and I get a segfault the first time mutator.c:460 if(GET_TAG(nodeptr) & VAP_TAG && !CINFO_NEED(GET_CINFO(nodeptr))) { is reached. Thanks Ian

Am I confused or does nhc98 assume that all pointers are < 2^31?
It would seem that you are right. The top bit 0x10000000 is the ZAP_BIT, used to indicate a black-hole (a value already under evaluation, useful for detecting infinite loops).
On m68k malloc is giving me stuff above 0xc0000000 and I get a segfault the first time mutator.c:460 if(GET_TAG(nodeptr) & VAP_TAG && !CINFO_NEED(GET_CINFO(nodeptr))) { is reached.
Yes, by a horrendous series of CPP macros, GET_CINFO(p) -> EXT_CINFO(*p) -> EXT_FINFO(*p) -> EXT_HADDRESS(*p) -> ~ZAP_BIT & *p the address is being masked. Regards, Malcolm

On Wed, Nov 24, 2004 at 05:35:26PM +0000, Malcolm Wallace wrote:
Am I confused or does nhc98 assume that all pointers are < 2^31?
It would seem that you are right. The top bit 0x10000000 is the ZAP_BIT, used to indicate a black-hole (a value already under evaluation, useful for detecting infinite loops).
Hmm, I had a look at changing this to use offsets from the heap start address, but it looks to me like the same functions need to work on both the heap stuff and the structures linked in from the .hc files. I'm afraid I'm going to have to give up on this, for now at least. Ian
participants (2)
-
Ian Lynagh
-
Malcolm Wallace