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

dumpwriterelf: increase buffer to fit a RHEL8 arm64 page. #91865

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

tmds
Copy link
Member

@tmds tmds commented Sep 11, 2023

Fixes #91864.

@mikem8361 ptal.

@ghost ghost added the community-contribution Indicates that the PR has been added by a community member label Sep 11, 2023
@ghost
Copy link

ghost commented Sep 11, 2023

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

Issue Details

Fixes #91864.

@mikem8361 ptal.

Author: tmds
Assignees: -
Labels:

area-Diagnostics-coreclr

Milestone: -

@mikem8361
Copy link
Member

We need to change the MacOS dump writer's m_tempBuffer in dumpwritermacho.h to 64K also for arm64/M1. I think M1 has a 64K PAGE_SIZE.

@mikem8361
Copy link
Member

Another way to fix this is to change the size of the SpecialDiagInfo block to 4K always instead of PAGE_SIZE here. Adding a SPECIAL_DIAGINFO_SIZE define to specialdiaginfo.h is probably a good idea if you make this change.

This fixes out-of-bounds access when trying to write the
diagnostics info on platforms where the PAGE_SIZE is larger
than the DumpWriter's 16KiB m_tempBuffer.
@tmds tmds force-pushed the increase_buffer_size branch from 34104cd to 7d3b041 Compare September 12, 2023 10:48
@tmds
Copy link
Member Author

tmds commented Sep 12, 2023

Another way to fix this is to change the size of the SpecialDiagInfo block to 4K always instead of PAGE_SIZE here. Adding a SPECIAL_DIAGINFO_SIZE define to specialdiaginfo.h is probably a good idea if you make this change.

I've adopted this suggestion, and validated it works on RHEL 8 arm64.

@mikem8361 mikem8361 merged commit e3e9758 into dotnet:main Sep 12, 2023
@mikem8361
Copy link
Member

/backport to release/8.0

@github-actions
Copy link
Contributor

Started backporting to release/8.0: https://github.com/dotnet/runtime/actions/runs/6163089000

@ghost ghost locked as resolved and limited conversation to collaborators Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Diagnostics-coreclr community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

createdump segfaults on RHEL8 arm64 with .NET 8
3 participants