lua-users home
lua-l archive

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

Roberto Ierusalimschy <> writes:

>> 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.

Generating an invalid pointer is an ANSI C violation: you may only
calculate pointers from the start of an array to just behind it.

All the rest may segfault if it wants to.

David Kastrup