I: [PATCH] asprintf error handling fix

Dmitry V. Levin ldv@alt-linux.org
Fri Dec 7 05:44:00 GMT 2001


On Thu, Dec 06, 2001 at 01:02:06AM -0800, Ulrich Drepper wrote:
> > - When _IO_vfprintf call fails, _IO_vasprintf returns error code without
> >   freeing memory allocated before (either in this function or during
> >   _IO_vfprintf execution).
> 
> OK, I've changed that.  Slightly different, though.

Your changes are also OK.
Thank you for fast response.

> > - When either malloc or _IO_vfprintf call fails, _IO_vasprintf returns
> >   error code without setting result_ptr to zero.
> 
> That's nonsense.  The code never did this and there is no reason to
> ever do this.

I didn't get your point - you are rejecting API extension just because it
wasn't here before? Well, a lot of features wasn't here before but will
appear in the future. Or maybe you did a feature freeze in glibc?

I'm arguing for this feature because it:
+ cannot harm or lead to negative effects;
+ costs nothing;
+ may help to make software a bit more reliable without additional
  programmer and audit efforts;
+ provides compatibility.

I see four pros and no contras so far.


Regards,
	Dmitry

+-------------------------------------------------------------------------+
Dmitry V. Levin     mailto://ldv@alt-linux.org
ALT Linux Team      http://www.altlinux.ru/
Fandra Project      http://www.fandra.org/
+-------------------------------------------------------------------------+
UNIX is user friendly. It's just very selective about who its friends are.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20011207/28d0049d/attachment.sig>


More information about the Libc-alpha mailing list