This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: asprintf() issue


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]