bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: malloc, etc. bugs in GNU tar 1.13.25


From: Paul Eggert
Subject: Re: malloc, etc. bugs in GNU tar 1.13.25
Date: Wed, 2 Oct 2002 21:57:05 -0700 (PDT)

> From: Bruce Lilly <address@hidden>
> Date: Tue, 27 Aug 2002 17:20:12 -0400
> 
> The malloc, etc. functions in the lib subdirectory
> of GNU tar 1.13.25 are broken.  In particular, the
> allocation functions are supposed to return a block
> of memory suitably aligned for storage of any type
> (see The Open Group's Single UNIX Specification).
> They do not, and that's a problem which causes the
> getdents() function in Doug Gwyn's dirent library
> to fail.

Sorry, I don't see the bug.  For example, here's the malloc function
that you mention:

   char *
   rpl_malloc (size_t n)
   {
     if (n == 0)
       n = 1;
     return malloc (n);
   }

If the underlying malloc returns a suitably-aligned block, then
rpl_malloc will do so too.

Also, GNU tar doesn't invoke getdents, so I don't see why that's
relevant.




reply via email to

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