[Bug stdio/34281] fseek on pbackfail'ed wide stream triggers abort

fweimer at redhat dot com via Glibc-bugs <[email protected]> Wed, 17 Jun 2026 15:58:04 +0000
Newsgroups gmane.comp.lib.glibc.bugs
Message-ID <[email protected]/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=34281

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
I think for wide streams (and text streams more generally), applications are
expected to use fsetpos, not fseek.

I thought we had some complicate code which winds forward to get a meaningful
byte-based fseek on wide streams, though. Maybe this needs to be replicated at
the point of the abort. I'm not completely sure if this can be made to work
completely correctly because an application may ungetwc a character that
triggers a change in shift state.

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