NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Query about xmalloc.c (cp is used after free())
On Wed, Jun 02, 2010 at 11:38:17AM +0530, jags.linux wrote:
> in the above code at 377 xfree(cp) is done and at 381 cp is used to
> copy to the result.
>
> Is this OK?
Partly. It relies on properties of xfree/imalloc (not to destroy the content
yet), which is ~ok for a realloc implementation. However, it is not thread
safe, and that needs fixing (together with a bunch of other threading issues
in ld.elf_so).
Martin
Home |
Main Index |
Thread Index |
Old Index