Skip to content

Commit bad31df

Browse files
github-actions[bot]Mike McLaughlinjeffschwMSFT
authored
Fix createdump 'stack smashing detected' error on arm64 (#108208)
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 <mikem@microsoft.com> Co-authored-by: Jeff Schwartz <jeffschw@microsoft.com>
1 parent 2c4266c commit bad31df

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/coreclr/debug/createdump/crashinfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ CrashInfo::GatherCrashInfo(DumpType dumpType)
199199
{
200200
return false;
201201
}
202-
// Add the special (fake) memory region for the special diagnostics info
203-
MemoryRegion special(PF_R, SpecialDiagInfoAddress, SpecialDiagInfoAddress + PAGE_SIZE);
202+
// Add the special (fake) memory region for the special diagnostics info. Use constructor that doesn't assert PAGE_SIZE alignment.
203+
MemoryRegion special(PF_R, SpecialDiagInfoAddress, SpecialDiagInfoAddress + SpecialDiagInfoSize, /* offset */ 0);
204204
m_memoryRegions.insert(special);
205205
#ifdef __APPLE__
206206
InitializeOtherMappings();

0 commit comments

Comments
 (0)