Skip to content

Commit

Permalink
Fix createdump 'stack smashing detected' error on arm64 (#108208)
Browse files Browse the repository at this point in the history
The changes from PR #91865 were reverted by PR #95433.

This change restores the fix from PR #91865 by changing the size back to SpecialDiagInfoSize
but uses the 4 parameter MemoryRegion constructor that doesn't assert the address/size is on
a PAGE_SIZE alignment (PR #95433).

Issue: #108023

Co-authored-by: Mike McLaughlin <[email protected]>
Co-authored-by: Jeff Schwartz <[email protected]>
  • Loading branch information
3 people authored Sep 25, 2024
1 parent 2c4266c commit bad31df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/coreclr/debug/createdump/crashinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ CrashInfo::GatherCrashInfo(DumpType dumpType)
{
return false;
}
// Add the special (fake) memory region for the special diagnostics info
MemoryRegion special(PF_R, SpecialDiagInfoAddress, SpecialDiagInfoAddress + PAGE_SIZE);
// Add the special (fake) memory region for the special diagnostics info. Use constructor that doesn't assert PAGE_SIZE alignment.
MemoryRegion special(PF_R, SpecialDiagInfoAddress, SpecialDiagInfoAddress + SpecialDiagInfoSize, /* offset */ 0);
m_memoryRegions.insert(special);
#ifdef __APPLE__
InitializeOtherMappings();
Expand Down

0 comments on commit bad31df

Please sign in to comment.