* Fix failure to cleanup wide stream buffers in preparation for BZ#16734 fix
@ 2015-07-12 19:22 Paul Pluzhnikov
2015-07-15 11:19 ` Siddhesh Poyarekar
0 siblings, 1 reply; 3+ messages in thread
From: Paul Pluzhnikov @ 2015-07-12 19:22 UTC (permalink / raw)
To: GLIBC Devel; +Cc: Paul Pluzhnikov
[-- Attachment #1: Type: text/plain, Size: 696 bytes --]
Greetings,
In preparation for BZ#16734 fix, I've build libc with (not intended to commit):
diff --git a/libio/libioP.h b/libio/libioP.h
index d8604ca..d1699de 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -719,7 +719,7 @@ extern _IO_off64_t _IO_seekpos_unlocked (_IO_FILE
*, _IO_off64_t, int)
# endif
#endif
-#if _G_HAVE_MMAP
+#if _G_HAVE_MMAP && 0
# include <unistd.h>
# include <fcntl.h>
... etc.
This results in mtrace test failure:
FAIL: misc/tst-error1-mem
Attached patch fixes the test failure.
Thanks,
--
Paul Pluzhnikov
2015-07-12 Paul Pluzhnikov <ppluzhnikov@google.com>
[BZ #16734]
* libio/genops.c (_IO_unbuffer_all): Free wide buffer as well.
[-- Attachment #2: pr16734-20150712-patch.txt --]
[-- Type: text/plain, Size: 360 bytes --]
diff --git a/libio/genops.c b/libio/genops.c
index 0f5e800..e13b3d1 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -977,6 +977,9 @@ _IO_unbuffer_all (void)
_IO_SETBUF (fp, NULL, 0);
+ if (fp->_mode > 0)
+ _IO_wsetb (fp, NULL, NULL, 0);
+
#ifdef _IO_MTSAFE_IO
if (cnt < MAXTRIES && fp->_lock != NULL)
_IO_lock_unlock (*fp->_lock);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fix failure to cleanup wide stream buffers in preparation for BZ#16734 fix
2015-07-12 19:22 Fix failure to cleanup wide stream buffers in preparation for BZ#16734 fix Paul Pluzhnikov
@ 2015-07-15 11:19 ` Siddhesh Poyarekar
2015-08-08 23:31 ` Paul Pluzhnikov
0 siblings, 1 reply; 3+ messages in thread
From: Siddhesh Poyarekar @ 2015-07-15 11:19 UTC (permalink / raw)
To: Paul Pluzhnikov; +Cc: GLIBC Devel, Paul Pluzhnikov
On Sun, Jul 12, 2015 at 12:22:03PM -0700, Paul Pluzhnikov wrote:
> 2015-07-12 Paul Pluzhnikov <ppluzhnikov@google.com>
>
> [BZ #16734]
> * libio/genops.c (_IO_unbuffer_all): Free wide buffer as well.
Looks good to me.
thanks,
Siddhesh
> diff --git a/libio/genops.c b/libio/genops.c
> index 0f5e800..e13b3d1 100644
> --- a/libio/genops.c
> +++ b/libio/genops.c
> @@ -977,6 +977,9 @@ _IO_unbuffer_all (void)
>
> _IO_SETBUF (fp, NULL, 0);
>
> + if (fp->_mode > 0)
> + _IO_wsetb (fp, NULL, NULL, 0);
> +
> #ifdef _IO_MTSAFE_IO
> if (cnt < MAXTRIES && fp->_lock != NULL)
> _IO_lock_unlock (*fp->_lock);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Fix failure to cleanup wide stream buffers in preparation for BZ#16734 fix
2015-07-15 11:19 ` Siddhesh Poyarekar
@ 2015-08-08 23:31 ` Paul Pluzhnikov
0 siblings, 0 replies; 3+ messages in thread
From: Paul Pluzhnikov @ 2015-08-08 23:31 UTC (permalink / raw)
To: Siddhesh Poyarekar; +Cc: GLIBC Devel
On Wed, Jul 15, 2015 at 4:18 AM, Siddhesh Poyarekar <siddhesh@redhat.com> wrote:
> On Sun, Jul 12, 2015 at 12:22:03PM -0700, Paul Pluzhnikov wrote:
>> 2015-07-12 Paul Pluzhnikov <ppluzhnikov@google.com>
>>
>> [BZ #16734]
>> * libio/genops.c (_IO_unbuffer_all): Free wide buffer as well.
>
> Looks good to me.
Thanks. Committed as a601b74d31ca086de38441d316a3dee24c866305.
--
Paul Pluzhnikov
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-08 23:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-12 19:22 Fix failure to cleanup wide stream buffers in preparation for BZ#16734 fix Paul Pluzhnikov
2015-07-15 11:19 ` Siddhesh Poyarekar
2015-08-08 23:31 ` Paul Pluzhnikov
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).