bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Malloc patches, round 1 (reseting round count)


From: Marcus Brinkmann
Subject: Re: Malloc patches, round 1 (reseting round count)
Date: Sun, 9 Sep 2001 19:32:34 +0200
User-agent: Mutt/1.3.20i

On Wed, Aug 01, 2001 at 02:39:53AM -0400, Igor Khavkine wrote:
> I've looked through the comments to my eariler posts, and I've
> made appropriate changes. Even the formatting. :-)

Hi,

I had started to work in the patches, but it is a lot of work :-/
The reason is that I had to change all of the changes I looked at so far,
there were just too many little buglets.

Here is an idea of the bugs I found:

* Wrong check if asprintf() fails (same I noticed in the 3rd patch, too).
* Not freeing the allocated resources when bailing out (like, iouser when
  netfs_make_protid fails).
* Setting err to errno after making other library calls (which don't give
  any guarantee about stability of errno).

I did not look at all patches, I just started incorporating and found all of
these several times (IIRC).  I checked in my changes to libnetfs as far as I
came.  You might want to go over your patches one more time.  

This is what I incorporated so far:

libnetfs/
2001-08-31  Marcus Brinkmann  <marcus@gnu.org>

        * file-get-translator.c (netfs_S_file_get_translator): If
        asprintf() fails, set ERR to errno.
        * dir-lookup.c (netfs_S_dir_lookup): Catch if asprintf() fails and
        return ENOMEM.  If netfs_make_protid() fails, set ERROR to errno,
        not ENOMEM.  Do this before freeing USER.
        * dir-mkfile.c (netfs_S_dir_mkfile): If netfs_make_protid() fails,
        set ERROR to errno and free USER.
        * file-exec.c (netfs_S_file_exec): Likewise.
        Reported by Igor Khavkine <i_khavki@alcor.concordia.ca>.

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]