DJ Delorie wrote:
Bizzare, the problem isn't the hash loop, it's the error handler at
the end! It never uses [30] for the main loop, only if you give it a
number between 0xfffb and 0x - and in the case where it
would use [30], it's supposed to abort anyway.
I couldn't figure out why
> I was just wondering whether now would be a good time to mention
Probably not, gcc being in stage 4 and all...
On 03/03/2011 23:00, Mike Stump wrote:
> On Mar 3, 2011, at 2:26 PM, Michael Snyder wrote:
>> DJ Delorie wrote:
As written, the function will access element [30] of a 30-element array.
>>> Um, no?
>> Y-uh-huh!
>
> fight fight fight... :-) There can be only one.
I was just wondering wheth
Mike Stump wrote:
On Mar 3, 2011, at 2:26 PM, Michael Snyder wrote:
DJ Delorie wrote:
As written, the function will access element [30] of a 30-element array.
Um, no?
Y-uh-huh!
fight fight fight... :-) There can be only one.
Oh, did I forget the smiley? ;-)
On Mar 3, 2011, at 2:26 PM, Michael Snyder wrote:
> DJ Delorie wrote:
>>> As written, the function will access element [30] of a 30-element array.
>> Um, no?
>
> Y-uh-huh!
fight fight fight... :-) There can be only one.
Bizzare, the problem isn't the hash loop, it's the error handler at
the end! It never uses [30] for the main loop, only if you give it a
number between 0xfffb and 0x - and in the case where it
would use [30], it's supposed to abort anyway.
I couldn't figure out why your patch worked
DJ Delorie wrote:
As written, the function will access element [30] of a 30-element array.
Um, no?
unsigned int mid = low + (high - low) / 2;
This can never give mid == high unless low == high, which won't happen
in that loop.
The math wants to search everything from (including) low to
DJ Delorie wrote:
As written, the function will access element [30] of a 30-element array.
Um, no?
Y-uh-huh!
unsigned int mid = low + (high - low) / 2;
This can never give mid == high unless low == high, which won't happen
in that loop.
The math wants to search everything from (incl
> As written, the function will access element [30] of a 30-element array.
Um, no?
unsigned int mid = low + (high - low) / 2;
This can never give mid == high unless low == high, which won't happen
in that loop.
The math wants to search everything from (including) low to
(excluding) high.
As written, the function will access element [30] of a 30-element array.
OK?
2011-03-03 Michael Snyder
* hashtab.c (higher_prime_index): Prevent array overrun.
Index: hashtab.c
===
RCS file: /cvs/src/src/libiberty/hasht
10 matches
Mail list logo