This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] Fix ftell with fdopen for all cases and fopen with a+ mode (#16532)


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

Attachment: pgpskTJdJgbcj.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]