libtool
[Top][All Lists]
Advanced

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

Re: ltdl.c thinks it's psychic (another SEGFAULT bug).


From: Olly Betts
Subject: Re: ltdl.c thinks it's psychic (another SEGFAULT bug).
Date: Wed, 7 Nov 2001 09:21:02 +0000
User-agent: Mutt/1.2.5i

On Wed, Nov 07, 2001 at 12:09:23AM -0600, address@hidden wrote:
> So, if we replace malloc, we then need a table of pointers and their
> size. Worth it?

I've not looked at ltdl.c recently, but it could probably just overallocate
by sizeof(size_t), and store the allocated size at the start.  The pointer
returned by malloc has sizeof(size_t) added to it, and realloc can then know
the allocated length from: *((size_t *)src - 1)

Cheers,
Olly



reply via email to

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