public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug stdio/18990] New: fopencookie broken w.r.t seek within buffered range
@ 2015-09-22  9:36 luoqi.chen at gmail dot com
  2015-10-01 12:40 ` [Bug stdio/18990] " fweimer at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: luoqi.chen at gmail dot com @ 2015-09-22  9:36 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18990

            Bug ID: 18990
           Summary: fopencookie broken w.r.t seek within buffered range
           Product: glibc
           Version: 2.24
            Status: NEW
          Severity: critical
          Priority: P2
         Component: stdio
          Assignee: unassigned at sourceware dot org
          Reporter: luoqi.chen at gmail dot com
  Target Milestone: ---

The culprit is the _IO_cookie_seekoff() method, which invalidates the
fp->_offset before performing an actual seek. After fp->_offset is invalidated,
there's no way for the underlying seek algorithm (_IO_new_file_seekoff) to
determine if any part of the buffered data is reusable. This destruction of
buffered data effectively renders fopencookie() useless, except for the
simplest sequential access scenario.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-10-26 23:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-22  9:36 [Bug stdio/18990] New: fopencookie broken w.r.t seek within buffered range luoqi.chen at gmail dot com
2015-10-01 12:40 ` [Bug stdio/18990] " fweimer at redhat dot com
2015-10-08  3:22 ` luoqi.chen at gmail dot com
2015-10-08  9:02 ` fweimer at redhat dot com
2015-10-08 19:11 ` luoqi.chen at gmail dot com
2015-10-26 23:25 ` luoqi.chen at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).