[Yhc] Re: make tests
Tom Shackell
shackell at cs.york.ac.uk
Sun Mar 12 07:26:56 EST 2006
Hi,
The patch I've pushed should hopefully fix this and also strengthen the
sanity checking somewhat :-)
Tom
Tom Shackell wrote:
> Hi Michal,
>
> Yes I found exactly the same bug yesterday evening when I was rewriting
> the sanity checker (it now scans the heap linearly). The problem is
> simple, cinfo_alloc contained:
>
> if (obj){
> zcon = (Node*)heap_alloc(wordsof(Node));
> MAKE_NODE(zcon, cinfo, N_NORMAL);
> obj->node = zcon;
> obj->info = (Info*)cinfo;
> }
>
> which allocates a zero arity constructor node for the constructor (I
> just copy pased the code from finfo_alloc to allocate a CAF node).
> However, I forgot that not all constructors are zero arity and so not
> all need a zero arity node. So the code should read:
>
> if (obj){
> if (cinfo->size == 0){
> zcon = (Node*)heap_alloc(wordsof(Node));
> MAKE_NODE(zcon, cinfo, N_NORMAL);
> obj->node = zcon;
> }
> obj->info = (Info*)cinfo;
> }
>
> I'll submit a patch shortly :-)
>
> Thanks very much for your efforts, it really has made my life easier :-)
>
>
> Tom
More information about the Yhc
mailing list