[PATCH v2] Fix ftell with fdopen for all cases and fopen with a+ mode (#16532)
Siddhesh Poyarekar
siddhesh@redhat.com
Wed Feb 19 07:20:00 GMT 2014
On Wed, Feb 19, 2014 at 12:50:53AM -0500, Rich Felker wrote:
> I looked briefly at the patch and I don't see anything particularly
> wrong about it; at least it doesn't seem to make anything worse and
> looks like it fixes the particular issue. But I suspect you might end
> up removing or at least rewriting/moving this logic in fixing #16605.
You're right. I guess writes to the FILE pointer object should be
forbidden in ftell altogether, since it does not serve any purpose.
In fact, I think I'll just rip out the fseek/ftell overload through
the *seekoff functions and instead write a separate function for it,
so that it's much simpler. Also, bug 16605 as you reported did in
fact get exposed due to my ftell optimization. I thought you were
talking about a read/write after seek when the FILE handle is active,
but your last comment in the bug report suggests that it is not
allowed. So I'll close 16605 as a duplicate of 16532 since the
underlying reason for the regression is the same (my ftell
optimization) and then work on this patch as 16532.
Siddhesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140219/e8605534/attachment.sig>
More information about the Libc-alpha
mailing list