This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] validate binary before use
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Aleksandar Ristovski <aristovski at qnx dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 6 Apr 2013 17:41:05 +0200
- Subject: Re: [patch] validate binary before use
On Thu, 04 Apr 2013 15:03:05 +0200, Aleksandar Ristovski wrote:
> The problem is, we could 'remember' build-id that is garbage.
[...]
On Fri, 05 Apr 2013 15:06:36 +0200, Aleksandar Ristovski wrote:
> It is stored in the latest patch, in build-id.
OK, true with the new patch.
The problem is there is:
xfree (so->build_id);
in free_so() but it should be in free_so_symbols instead. free_so_symbols is
called also from reload_shared_libraries_1 where so_list->abfd can change.
Then obviously one should also set so->build_id = NULL there.
I was thinking making the BUILD_ID data private so solib-svr4.c but that is
currently not possible, lm_info is private for solib-svr4.c but that has
lifetime of so_list, not the lifetime of so_list->abfd.
Thanks,
Jan