elf: handle NULL lookaside

This code uses the hashtable directly to avoid the overhead of calling
the path which creates ProcessInfo entries. So we need to also handle
the chance the lookaside is NULL.
This commit is contained in:
Christian Hergert
2022-09-05 20:51:58 -07:00
parent c03c964ec2
commit 1ef9fc1e30

View File

@ -554,8 +554,10 @@ sysprof_elf_symbol_resolver_resolve_full (SysprofElfSymbolResolver *self,
if (!(pi = g_hash_table_lookup (self->processes, GINT_TO_POINTER (pid))))
return FALSE;
map = sysprof_map_lookaside_lookup (pi->lookaside, address);
if G_UNLIKELY (map == NULL)
if (pi->lookaside == NULL)
return FALSE;
if (!(map = sysprof_map_lookaside_lookup (pi->lookaside, address)))
return FALSE;
address -= map->start;