[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: possible bug
- From: David Kastrup <dak@...>
- Date: Fri, 27 Mar 2009 16:47:08 +0100
Roberto Ierusalimschy <email@example.com> 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.