You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We generate a single address range for each DSO in the userspace
program. However, the method is a bit convoluted: we select the largest
"vm_end" value, and we use a start address computed from the start of
the executable VMA and its vm_pgoff. The result of this is that, if a
DSO file is mapped multiple times in different locations, we may produce
an address range that spans other DSO address ranges. This is exactly
what happened in osandov/drgn#574.
Simplify this by just using the start address of the lowest VMA (the one
which has vm_pgoff==0), and computing the end address by taking the file
size, or the start of the next DSO address range, whichever is lower.
This ensures there are no address range overlaps. It does not provide
drgn with any additional information about the file address mappings,
but as far as I can tell, that's just fine: drgn can't use multiple
address ranges, because it doesn't know which file offsets they
correspond to.
To ensure this behavior is used by both the "dump" and "pstack" modes,
implement factor out the DSO range generation code into a helper and use
it in both places.
Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
0 commit comments