On Tue, Jul 27, 2010 at 10:25:33AM -0700, Richard Henderson wrote:
> First, adjust load_symbols to accept a load_bias parameter. At the same
> time, read the entire section header table in one go, use pread instead
> f lseek+read for the symbol and string tables, and properly free
> allocated stru
On Wed, 28 Jul 2010, malc wrote:
> On Tue, 27 Jul 2010, Richard Henderson wrote:
>
> > On 07/27/2010 11:45 AM, malc wrote:
> > >> +syms = realloc(syms, nsyms * sizeof(*syms));
> > >
> > > Realloc can fail here.
> >
> > I don't believe it can. This (pre-existing) statement *reduces*
> > the
On Tue, 27 Jul 2010, Richard Henderson wrote:
> On 07/27/2010 11:45 AM, malc wrote:
> >> +syms = realloc(syms, nsyms * sizeof(*syms));
> >
> > Realloc can fail here.
>
> I don't believe it can. This (pre-existing) statement *reduces*
> the existing allocation of syms. I'd be surprised if a
On 07/27/2010 11:45 AM, malc wrote:
>> +syms = realloc(syms, nsyms * sizeof(*syms));
>
> Realloc can fail here.
I don't believe it can. This (pre-existing) statement *reduces*
the existing allocation of syms. I'd be surprised if any malloc
implementation fails on a size reduction.
That sai
On Tue, 27 Jul 2010, Richard Henderson wrote:
> First, adjust load_symbols to accept a load_bias parameter. At the same
> time, read the entire section header table in one go, use pread instead
> f lseek+read for the symbol and string tables, and properly free
> allocated structures on error exit
First, adjust load_symbols to accept a load_bias parameter. At the same
time, read the entire section header table in one go, use pread instead
f lseek+read for the symbol and string tables, and properly free
allocated structures on error exit paths.
Second, adjust load_elf_interp to compute load
First, adjust load_symbols to accept a load_bias parameter. At the same
time, read the entire section header table in one go, use pread instead
f lseek+read for the symbol and string tables, and properly free
allocated structures on error exit paths.
Second, adjust load_elf_interp to compute load