This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] nto target: fix null pointer dereference
On Tue, Aug 12, 2008 at 05:25:40PM -0400, Aleksandar Ristovski wrote:
> in procfs_create_inferior we call solib_create_inferior_hook, which will end up trying to determine loader base by reading inferior's memory at DT_DEBUG pointer. In our case, before the executable actually started executing, it will successfully read 0s, because dynamic loader has not been invoked yet, and the pointer to r_debug structure is not initialized.
It should already detect that zero is invalid, since that's the same
value used initially; see e.g. calls to locate_base. Where's the read
come from?
--
Daniel Jacobowitz
CodeSourcery