This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] validate binary before use


On Thu, 04 Apr 2013 04:03:43 +0200, Aleksandar Ristovski wrote:
> Actually, as I think about this more, we can not use section from
> possibly unrelated bfd to read build-id in native debugging case. At
> a minimum, we can not store such build-id as abfd may not even
> relate to what's in target's memory.

Why?

If the target shared library does not match then GDB will read some random
memory.  The target shared library may not even have any build-id.

As the build-id has 160 bits there is 1:2^160 probability of a false positive,
that is safe enough.


> The chunk of code that is in svr4_relocate_section_addresses in the
you probably mean              solib_map_sections

> latest version of the patch needs to go back to svr4_validate, and
> not store build-id.


I do not understand this whole mail, it would be best to provide a countercase
where the current patchset does not behave correctly.


Thanks,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]