8000 linux: separate mappings list from modules list by schopin-mozilla · Pull Request #212 · rust-minidump/minidump-writer · GitHub
[go: up one dir, main page]

Skip to content

linux: separate mappings list from modules list - #212

Merged
schopin-mozilla merged 2 commits into
rust-minidump:mainfrom
schopin-mozilla:module-refactor
Aug 31, 2026
Merged

schopin-mozilla merged 2 commits into
rust-minidump:mainfrom
schopin-mozilla:module-refactor

Conversation

@schopin-mozilla
Copy link
Copy Markdown
Collaborator

While both things are related to each other, and for now we're using the
former to generate the latter, they are essentially two different sets
of data, meant to answer two different questions. Since the endgoal of
this patch series is to use a different data source for the module
info, the first step is to actually make it its own entity.

My design goal for this is to only construct ModuleInfo objects once we
know they're correct (or as correct as they are), which is why we moved
the user-supplied mapping processing right within the process, and it
all goes through an intermediate struct. There's a couple of advantages
to this: we have all module-related logic stored in a single place,
including arbitration between user-provided and process-derived data,
and if you get a ModuleInfo object you know it's the same data that will
get written out.

An unplanned benefit of this is that mappings don't need to know about
bias anymore, which is nice since it's an ELF notion, not a generic
mapping one.

The final result should be the same as before, except for one case:
conflicts between process-derived and user-provided data is now
explicitly handled, with the latter given priority.

Additionally, errors during SONAME extractions are now reported in the
soft error stream rather than completely ignored. It's a bit tangential,
but was entangled too much with the rest to be split out into its own
commit.

(description lifted from the first and most meaty commit, the second one being just some cleanup.)
(split off #195)

@schopin-mozilla
Copy link
Copy Markdown
Collaborator Author

Ping @marti4d for review. Sorry, it's a bit massive :/

Comment thread src/linux/minidump_writer/mappings.rs Resolved
Comment thread src/linux/module_list.rs Resolved
Comment thread src/linux/module_list.rs Resolved
Comment thread src/linux/module_list.rs Resolved
@gabrielesvelto gabrielesvelto left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I meant to have approved this with nits so you can merge when they're addressed

While both things are related to each other, and for now we're using the
former to generate the latter, they are essentially two different sets
of data, meant to answer two different questions. Since the endgoal of
this patch series is to use a *different* data source for the module
info, the first step is to actually make it its own entity.

My design goal for this is to only construct ModuleInfo objects once we
know they're correct (or as correct as they are), which is why we moved
the user-supplied mapping processing right within the process, and it
all goes through an intermediate struct. There's a couple of advantages
to this: we have all module-related logic stored in a single place,
including arbitration between user-provided and process-derived data,
and if you get a ModuleInfo object you know it's the same data that will
get written out.

An unplanned benefit of this is that mappings don't need to know about
bias anymore, which is nice since it's an ELF notion, not a generic
mapping one.

The final result should be the same as before, except for one case:
conflicts between process-derived and user-provided data is now
explicitly handled, with the latter given priority.

Additionally, errors during SONAME extractions are now reported in the
soft error stream rather than completely ignored. It's a bit tangential,
but was entangled too much with the rest to be split out into its own
commit.
We don't need to remember the "true" range for mapping anymore, because
it never changes!
@schopin-mozilla
schopin-mozilla merged commit 42b36b2 into rust-minidump:main Aug 31, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0