This is the mail archive of the glibc-bugs@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]

[Bug stdio/16398] ftell stuck on file opened w+ for writing wide characters


http://sourceware.org/bugzilla/show_bug.cgi?id=16398

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  df675f9933c5d5461cea9224ed43beddef1a7b3a (commit)
       via  68159946307adfc95a6e99d1c4af5c3de0c030f9 (commit)
      from  ae2f53e1eb3cd454d833ce9cb3bc78d791a0cb3e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=df675f9933c5d5461cea9224ed43beddef1a7b3a

commit df675f9933c5d5461cea9224ed43beddef1a7b3a
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Wed Feb 5 12:49:00 2014 +0530

    Fix infinite loop in ftell when writing wide char data (BZ #16398)

    ftell tries to avoid flushing the buffer when it is in write mode by
    converting the wide char data and placing it into the binary buffer.
    If the output buffer space is full and there is data to write, the
    code reverts to flushing the buffer.  This breaks when there is space
    in the buffer but it is not enough to convert the next character in
    the wide data buffer, due to which __codecvt_do_out returns a
    __codecvt_partial status.  In this case, ftell keeps running in an
    infinite loop.

    The fix here is to detect the __codecvt_partial status in addition to
    checking if the buffer is full.  I have also added a test case that
    demonstrates the infinite loop.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=68159946307adfc95a6e99d1c4af5c3de0c030f9

commit 68159946307adfc95a6e99d1c4af5c3de0c030f9
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Wed Feb 5 12:22:58 2014 +0530

    Update contrib.texi

    This may not be a complete list of new contributors added to the list,
    so I'd love it if more people look at contributions and suggest
    additions.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                      |    6 ++
 libio/Makefile                 |    2 +-
 libio/tst-ftell-partial-wide.c |  107 ++++++++++++++++++++++++++++++++++++++++
 libio/wfileops.c               |   11 +++--
 manual/contrib.texi            |   19 ++++++--
 5 files changed, 136 insertions(+), 9 deletions(-)
 create mode 100644 libio/tst-ftell-partial-wide.c

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


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