SUSE / libpulp

libpulp enables live patching in user space applications.
GNU Lesser General Public License v2.1
55 stars 11 forks source link

Fix dl_find_base_addr not finding base address of target process #114

Closed giulianobelinassi closed 2 years ago

giulianobelinassi commented 2 years ago

dl_find_base_addr fails to find the correct load bias of target process. The target process has a load bias of 0 and its dlpi_name is set to empty string, which can be quite problematic depending of how we implement the dl_iterate function.

We fix the problem by copying what load_symbol_from_mem does. Also create a new testcase to cover this issue.

Fixes #113

Signed-off-by: Giuliano Belinassi gbelinassi@suse.de