Skip to content

Read ELF build ids directly from the target process instead of mmap()ing libraries #71

@gabrielesvelto

Description

@gabrielesvelto

When populating the module list on Linux we extract the GNU build ID from each executable. To do so we first mmap() the entire file in the process writing the minidump and then extract the data from there. This has a couple of important drawbacks:

  • If the file on disk has been deleted we'll get an empty ID, something that we see often in Firefox crashes.
  • If the file on disk has been altered we'll get the wrong ID.
  • If the file is extremely large mmap() may fail on 32-bit hosts, we've also seen this happen in 32-bit builds of Firefox.

We could avoid all these issues by reading the ELF headers directly from the process we're dumping. goblin supports parsing an ELF file lazily, though one has to do it manually (see this example).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions