[RFA/cache.c] large fread fails on NetApp share...
Nick Clifton
nickc@redhat.com
Wed Apr 30 09:16:00 GMT 2008
Hi Joel,
> 2008-04-29 Joel Brobecker <brobecker@adacore.com>
>
> * cache.c (cache_bread_1): Renames cache_bread.
> (cache_bread): New function.
A reasonable idea, but I think that there is a bug:
> + chunk_nread = cache_bread_1 (abfd, buf + nread, chunk_size);
> + nread += chunk_nread;
> +
> + if (chunk_nread < chunk_size)
> + break;
> + }
> +
> + return nread;
If cache_bread_1() returns -1 for a read after the first chunk then
cache_bread() will return one less byte than was actually read. Hardly
world shattering I agree, but it would nice to see this corner case
handled correctly.
Cheers
Nick
More information about the Binutils
mailing list