Skip to content
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

Various createdump fixes and cleanup #97253

Merged
merged 5 commits into from
Jan 26, 2024
Merged

Conversation

mikem8361
Copy link
Member

  • Separate memory and module regions.
    Move std::string m_fileName out of MemoryRegion into ModuleRegion that is derived from MemoryRegion.
    Reduces createdump memory usage.

  • Fix arm32 sign extension issues. Cleanup: make void* address parameters uint64_t.

  • Don't add "(deleted)" files to the module list on Linux.
    Issue: Createdump will incorrectly try to classify memfd entries as files #90547

Move std::string m_fileName out of MemoryRegion into ModuleRegion that is derived from MemoryRegion.

Reduces createdump memory usage.
@ghost
Copy link

ghost commented Jan 20, 2024

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

Issue Details
  • Separate memory and module regions.
    Move std::string m_fileName out of MemoryRegion into ModuleRegion that is derived from MemoryRegion.
    Reduces createdump memory usage.

  • Fix arm32 sign extension issues. Cleanup: make void* address parameters uint64_t.

  • Don't add "(deleted)" files to the module list on Linux.
    Issue: Createdump will incorrectly try to classify memfd entries as files #90547

Author: mikem8361
Assignees: mikem8361
Labels:

area-Diagnostics-coreclr

Milestone: -

src/coreclr/debug/createdump/crashinfounix.cpp Outdated Show resolved Hide resolved
const MemoryRegion* region = SearchMemoryRegions(m_moduleMappings, search);
if (region != nullptr) {
return region->Flags();
assert(start == CONVERT_FROM_SIGN_EXTENDED(start));
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this will ever fire. ULONG_PTR is unsigned __int64

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, on 64 bit arch is is int64, but on arm32 ULONG_PTR is int32_t/ULONG or 32bits so if start wasn't properly masked and signed extended (> 4G) it should fire. I may not be thinking about this right though.

Copy link
Member Author

Choose a reason for hiding this comment

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

FYI, this macro came from the diagnostics repo.

@mikem8361 mikem8361 requested a review from hoyosjs January 26, 2024 18:14
@hoyosjs hoyosjs merged commit e8d76fb into dotnet:main Jan 26, 2024
110 checks passed
@mikem8361 mikem8361 deleted the moduleregion branch January 26, 2024 21:49
@github-actions github-actions bot locked and limited conversation to collaborators Feb 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants