This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: asprintf() issue
- From: Archie Cobbs <archie dot cobbs at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: libc-alpha at sourceware dot org, Michael Kerrisk-manpages <mtk dot manpages at gmail dot com>
- Date: Tue, 12 May 2015 10:00:20 -0500
- Subject: Re: asprintf() issue
- Authentication-results: sourceware.org; auth=none
- References: <CANSoFxt-cdc-+C4u-rTENMtY4X9RpRSuv+axDswSPxbDgag8_Q at mail dot gmail dot com> <55520F8F dot 9020308 at redhat dot com>
On Tue, May 12, 2015 at 9:34 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 05/12/2015 03:53 PM, Archie Cobbs wrote:
>> If memory allocation wasn't possible, or some other error
>> occurs, these functions will return -1, and the contents
>> of strp is undefined.
>>
>> Note the "strp is undefined" part. This is correct, because there is
>> apparently no explicit specification that says anything otherwise.
>
> The glibc manual strongly implies that *strp is not updated on error,
> and the code implements that.
>
> The quoted manual page looks wrong.
The man page people disagree with you - I already asked them:
http://www.spinics.net/lists/linux-man/msg09067.html
(That's how I got here.) They claim that the glibc manual does not
imply anything. Perhaps they were looking in the wrong place?
Here is the link they were looking at:
https://www.gnu.org/software/libc/manual/html_node/Dynamic-Output.html
That link clearly says nothing about *strp on failure.
Is there a different specification they are supposed to be
working from that you have in mind?
-Archie
--
Archie L. Cobbs