[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patches] Fix *asprintf() to be compatible with *BSD and sanity
- To: Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
- Subject: Re: [patches] Fix *asprintf() to be compatible with *BSD and sanity
- From: "Joseph S. Myers" <joseph@xxxxxxxxxxxxxxxx>
- Date: Fri, 8 May 2009 11:12:08 +0000 (UTC)
On Thu, 7 May 2009, Mark Mitchell wrote:
> Joseph S. Myers wrote:
>
> >> Here is a, hopefully self explanatory, patch to fix *asprintf() to be
> >> compatible with *BSD and what any sane C programmers expects. Drepper
> >> NAKd it years ago...
>
> > So I'd suggest raising the issue with WG14, and unless they come up with
> > good reasons the BSD semantics are problematic then I'm inclined to put
> > this in EGLIBC as being a compatibility bug fix.
>
> The WG14 process is not fast. It might take months to get any kind of
> opinion.
If people are going to reply to a message on the reflector, it does not
take months for them to do so.
> To me, this change looks like pretty harmless -- it will add a few bytes
> to the library, but no instructions on the critical path (assuming that
> error returns are rare), and could help to avoid Heisenbugs. There's no
> API/ABI impact, so it seems like this is just a QoI issue.
>
> What's the harm in putting it in EGLIBC without WG14 sign-off?
The suggestion is not sign-off, it is assessing the views of WG14
reflector members. The DTR is silent on whether any change, and if so
what change, is made to *ptr in the case of error, and cases where
implementations differ are exactly the sort of case where WG14 can
usefully discuss which implementation semantics are best to standardise;
if they then decide to place no requirements in this area, storing NULL
would seem best, but they could also e.g. distinguish allocation failures
and other error conditions.
--
Joseph S. Myers
joseph@xxxxxxxxxxxxxxxx