[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#262782: [Bug-tar] free(valloc()): invalid pointer
From: |
GOTO Masanori |
Subject: |
Re: Bug#262782: [Bug-tar] free(valloc()): invalid pointer |
Date: |
Tue, 10 Aug 2004 09:29:25 +0900 |
User-agent: |
Wanderlust/2.9.9 (Unchained Melody) SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (UnebigoryĆmae) APEL/10.3 Emacs/21.2 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI) |
At Mon, 02 Aug 2004 22:02:12 -0700,
Paul Eggert wrote:
> Justin Pryzby <address@hidden> writes:
>
> > Please see Debian bug #248897 at [1] and its sibling at [2]. tar uses
> > valloc() to get aligned memory, and later free()s it. However, the
> > pointer returned by glibc valloc() is not necessarily free()able.
>
> Thanks for reporting this. I see that the underlying problem is a bug
> in Debian glibc (Debian bug 262782, which you just filed). It's
> clearly a bug, as the glibc manual says:
>
> With the GNU library, you can use `free' to free the blocks that
> `memalign', `posix_memalign', and `valloc' return.
>
> <http://www.gnu.org/software/libc/manual/html_node/Aligned-Memory-Blocks.html#Aligned%20Memory%20Blocks>
>
> That being said, tar should work around the Debian bug, as similar
> problems apparently occur on a few other platforms. I installed the
> following patch into the tar CVS main branch.
Thanks Paul. Yes, it's debian specific problem - it should be fixed
in the next version. BTW, I have not checked well, but it seems
_MALLOC_CHECK bug, not valloc() itself...
Regards,
-- gotom