This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] [BZ #15381] Initialize wide struct info.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 13 May 2013 09:59:41 -0400
- Subject: Re: [PATCH] [BZ #15381] Initialize wide struct info.
- References: <20130502173226 dot GA10414 at domone dot kolej dot mff dot cuni dot cz> <51831DCA dot 5060702 at redhat dot com> <20130513134604 dot GA10547 at domone dot kolej dot mff dot cuni dot cz>
On 05/13/2013 09:46 AM, OndÅej BÃlka wrote:
> On Thu, May 02, 2013 at 10:15:38PM -0400, Carlos O'Donell wrote:
>> On 05/02/2013 01:32 PM, OndÅej BÃlka wrote:
>>> Hi,
>>> For byte-oriented streams a wide data field takes undefined value.
>>> This patch initializes it to NULL for more deterministic behaviour.
>>>
>>> OK for 2.18?
>>>
>>> * libio/genops.c (_IO_no_init): Initialize wide struct info.
>>>
>>> ---
>>> libio/genops.c | 1 +
>>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/libio/genops.c b/libio/genops.c
>>> index 390d8d2..18039aa 100644
>>> --- a/libio/genops.c
>>> +++ b/libio/genops.c
>>> @@ -643,6 +643,7 @@ _IO_no_init (fp, flags, orientation, wd, jmp)
>>> {
>>> _IO_old_init (fp, flags);
>>> fp->_mode = orientation;
>>> + fp->_wide_data = NULL;
>>> #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
>>> if (orientation >= 0)
>>> {
>>>
>>
>> Is fp->_wide_data ever used uninitialized?
>>
>
> Yes, this caused mutt to crash. See
> https://bugzilla.novell.com/show_bug.cgi?id=813498
Thanks for confirming.
The original patch fixes the issue with mutt.
Does your new patch with the change in _IO_no_init
fix the mutt failure also?
If you can confirm that it fixes the mutt failure then
I'm happy for you to checkin the change since it does
make the situation more deterministic.
Cheers,
Carlso.