stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Closed: (STDCXX-428) [Linux] huge empty file created after an ungetwc() followed by fwide()
Date Fri, 25 May 2007 23:10:16 GMT

     [ https://issues.apache.org/jira/browse/STDCXX-428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Martin Sebor closed STDCXX-428.
-------------------------------

    Resolution: Invalid

-------- Original Message --------
Subject: [Bug 241309] huge empty file created after an ungetwc() followed by fwide()
Date: Fri, 25 May 2007 02:37:03 -0400
From: bugzilla@redhat.com
To: sebor@roguewave.com

Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.

Summary: huge empty file created after an ungetwc() followed by fwide()


https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=241309


jakub@redhat.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |drepper@redhat.com




------- Additional Comments From jakub@redhat.com  2007-05-25 02:37 EST -------
This testcase violates ISO C99, 7.19.2(5):
"wide character input/output functions shall not be applied to a byte-oriented
stream."
puts is a byte output function, therefore the stream after puts is byte-oriented.
ungetwc is wide input/output function and thus must not be used until you
reorient the stream.

> [Linux] huge empty file created after an ungetwc() followed by fwide()
> ----------------------------------------------------------------------
>
>                 Key: STDCXX-428
>                 URL: https://issues.apache.org/jira/browse/STDCXX-428
>             Project: C++ Standard Library
>          Issue Type: Bug
>            Reporter: Martin Sebor
>         Attachments: strace.out
>
>
> From https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=241309:
> -------- Original Message --------
> Subject: [Bug 241309] New: huge empty file created after an ungetwc() followed by fwide()
> Date: Thu, 24 May 2007 19:50:56 -0400
> From: bugzilla@redhat.com
> To: sebor@roguewave.com
> Please do not reply directly to this email. All additional
> comments should be made in the comments box of this bug report.
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=241309
>            Summary: huge empty file created after an ungetwc() followed by fwide()
>            Product: Red Hat Enterprise Linux
>            Version: 4.4
>           Platform: All
>         OS/Version: Linux
>             Status: NEW
>           Severity: medium
>           Priority: medium
>          Component: glibc
>         AssignedTo: jakub@redhat.com
>         ReportedBy: sebor@roguewave.com
>          QAContact: bbrock@redhat.com
> We're seeing the following unusual behavior of the program below on Red Hat
> Advanced Server 4, Update 4:
> $ cat t.c && gcc t.c && rm -f foo.out && ./a.out > foo.out
&& ls -l foo.out &&
> du -k foo.out
> #include <stdio.h>
> #include <wchar.h>
> int main ()
> {
>     puts ("");
>     ungetwc ('A', stdout);
>     fwide (stdout, 0);
>     return 0;
> }
> -rw-r--r--  1 sebor devel 182888783729 May 24 16:44 foo.out
> 16      foo.out
> The output of strace on the program is in the attached file.
> Here's info on libc:
> $ ldd a.out && /lib64/tls/libc.so.6
>         libc.so.6 => /lib64/tls/libc.so.6 (0x000000381b500000)
>         /lib64/ld-linux-x86-64.so.2 (0x000000381b100000)
> GNU C Library stable release version 2.3.4, by Roland McGrath et al.
> Copyright (C) 2005 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
> Compiled by GNU CC version 3.4.6 20060404 (Red Hat 3.4.6-2).
> Compiled on a Linux 2.4.20 system on 2006-07-04.
> Available extensions:
>         GNU libio by Per Bothner
>         crypt add-on version 2.1 by Michael Glad and others
>         Native POSIX Threads Library by Ulrich Drepper et al
>         RT using linux kernel aio
>         The C stubs add-on version 2.1.2.
>         GNU Libidn by Simon Josefsson
>         BIND-8.2.3-T5B
>         NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
> Thread-local storage support included.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/libc/bugs.html>.
> ------- Additional Comments From sebor@roguewave.com  2007-05-24 19:50 EST -------
> Created an attachment (id=155405)
>  --> (https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=155405&action=view)
> Output of strace ./a.out >/dev/null 2>/dev/pts/1
> -- 
> Configure bugmail: https://bugzilla.redhat.com/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message