public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rsa at us dot ibm dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sources.redhat.com Subject: [Bug libc/2337] libio in wide mode deallocates user supplied buffer Date: Fri, 06 Oct 2006 06:00:00 -0000 [thread overview] Message-ID: <20061006060026.26847.qmail@sourceware.org> (raw) In-Reply-To: <20060214170527.2337.Petr.Salinger@seznam.cz> ------- Additional Comments From rsa at us dot ibm dot com 2006-10-06 06:00 ------- Created an attachment (id=1351) --> (http://sourceware.org/bugzilla/attachment.cgi?id=1351&action=view) libio patch to prevent spurious deallocation of user supplied buffer. Directing wide-character IO to use the user supplied buffer proved to be problematic because the wide character operations make use of the non-wide character buffer for write operations. The least intrusive solution was to clean up the IO file finish path. The wide character jump vtable is initialized such that wide-character IO uses the default (non-wide) _IO_file_finish() function (probably an oversight) which invokes _IO_default_finish(). This ends up checking and clearing the non-wide user buffer spuriously in _IO_new_fclose(). I created a wide-character oriented file finish function _IO_wfile_finish() which calls the already existing _IO_wdefault_finish() function and I added it to the wide IO jump table as the default IO file finish function. This solved the problem and wide character IO now finishes in a manner consistent with the IO orientation. I've only tested this on PowerPC thus far. -- http://sourceware.org/bugzilla/show_bug.cgi?id=2337 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
next prev parent reply other threads:[~2006-10-06 6:00 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-02-14 17:05 [Bug libc/2337] New: " Petr dot Salinger at seznam dot cz 2006-02-14 17:07 ` [Bug libc/2337] " Petr dot Salinger at seznam dot cz 2006-03-02 14:07 ` Petr dot Salinger at seznam dot cz 2006-05-03 11:30 ` Petr dot Salinger at seznam dot cz 2006-10-04 16:46 ` rsa at us dot ibm dot com 2006-10-04 19:55 ` rsa at us dot ibm dot com 2006-10-06 6:00 ` rsa at us dot ibm dot com [this message] 2006-10-06 17:10 ` rsa at us dot ibm dot com 2006-12-13 23:18 ` drepper at redhat dot com 2007-01-12 17:26 ` cvs-commit at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20061006060026.26847.qmail@sourceware.org \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sources.redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).