Skip to content

[Minidump] Update Minidump file builder to continue when the Module's section cannot be found #152009

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

barsolo2000
Copy link
Contributor

@barsolo2000 barsolo2000 commented Aug 4, 2025

Instead of returning an error when:

  • it can't obtain section information from a module.
  • there are other issues calculating the size.

when we encounter such an error we log the error and continue with the other modules.
tested with lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py

module_name.c_str(), E.message().c_str());
}
});
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can just continue; in the guard clause

m_data.AppendData(&successful_modules_count,
sizeof(llvm::support::ulittle32_t));

for (size_t i = 0; i < modules_count; ++i) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This won't work,

Imagine you have 7 modules, and the 6th fails, You will attempt to read the 6th once twice. So what you want to do is extract all the modules into a vector, then write it.

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