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: Julius Plenz <julius at plenz dot com>
- To: Carlos O'Donell <carlos at redhat dot com>, =?utf-8?B?T25kxZllaiBCw61sa2E=?= <neleai at seznam dot cz>, Andreas Schwab <schwab at suse dot de>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 14 May 2013 13:59:13 +0200
- Subject: Re: [PATCH] [BZ #15381] Initialize wide struct info.
Hi,
* Andreas Schwab <schwab@suse.de>:
> > Are you opposed to initializing _wide_data to NULL?
>
> I would prefer -1 so that broken uses crash predictably. :-)
Since undefined behaviour can be anything you like, both initializing
with NULL and with -1 is equally "valid".
However I agree with Andreas that initializing with -1 would expose
the user's bug reliably (as it did in the case of mutt), whereas NULL
would hide this, possibly leading to confusion.
Julius
[not on the list, please CC me in replies]