lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> > Umm, I wouldn't classify this as a bug. The bounds checking tool
> > simply doesn't analyze the code deeply enough (no offense
> > intended, this is a tough problem). The lastfree pointer is never
> > used if the loop exits, because the table is rehashed in turn. So
> > this never causes any problems in reality.
> > 
> > I don't think this is an ANSI C violation either, because the
> > (now) invalid pointer is never used in a subsequent comparison.
> 
> Yes, this is not a bug at all. I forgot that the decremented value
> was not being used.

Correcting again my diagnosis, this situation happens with all tables,
not only with those using dummynode. The last successful call to
getfreepos can always leave t->lastfree == t->node, so that in the
next call lastfree will be decremented out of the array (but not used).

-- Roberto