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

createdump segfaults on RHEL8 arm64 with .NET 8 #91864

Closed
tmds opened this issue Sep 11, 2023 · 2 comments · Fixed by #91865
Closed

createdump segfaults on RHEL8 arm64 with .NET 8 #91864

tmds opened this issue Sep 11, 2023 · 2 comments · Fixed by #91865

Comments

@tmds
Copy link
Member

tmds commented Sep 11, 2023

With .NET 8, createdump gives a segfault on RHEL8 arm64.

Attaching the debugger shows that DumpWriter is trying to write a 64kB block here:

if (!WriteDiagInfo(size)) {

using the 16kB m_tempBuffer allocated here:

BYTE m_tempBuffer[0x4000];

This leads to stack corruption.

arm64 on RHEL8 has an atypical page size of 64kB pages.

When I update m_tempBuffer to have a 64kB size, createdump works.

cc @mikem8361 @omajid

@ghost ghost added the untriaged New issue has not been triaged by the area owner 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

With .NET 8, createdump gives a segfault on RHEL8 arm64.

Attaching the debugger shows that DumpWriter is trying to write a 64kB block here:

if (!WriteDiagInfo(size)) {

using the 16kB m_tempBuffer allocated here:

BYTE m_tempBuffer[0x4000];

This leads to stack corruption.

arm64 on RHEL8 has an atypical page size of 64kB pages.

When I update m_tempBuffer to have a 64kB size, createdump works.

cc @mikem8361 @omajid

Author: tmds
Assignees: -
Labels:

area-Diagnostics-coreclr

Milestone: -

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Sep 11, 2023
@tmds
Copy link
Member Author

tmds commented Sep 11, 2023

When I update m_tempBuffer to have a 64kB size, createdump works.

I've created a PR with this change: #91865

@mikem8361 mikem8361 self-assigned this Sep 11, 2023
@mikem8361 mikem8361 removed the untriaged New issue has not been triaged by the area owner label Sep 11, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Sep 12, 2023
@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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants