Skip to content

Commit 5f9352d

Browse files
Copilotmangod9
andauthored
Fix stackoverflowtester to skip ARM32 in TestStackOverflowLargeFrameMainThread (#126525)
main PR <!-- Link to PR if any that fixed this in the main branch. --> # Description `TestStackOverflowLargeFrameMainThread` was missing `Architecture.Arm` in its Unix skip guard, causing it to run on ARM32 where it reliably fails. On ARM32, large-frame methods (65KB/frame) cause the JIT to probe stack pages without moving SP, so the guard page fault lands >8KB from SP — outside the runtime's 2-page detection window in `signal.cpp`. This produces SIGSEGV (exit `0x8B`/139) instead of the expected SIGABRT (exit `0x86`/134). `TestStackOverflowLargeFrameSecondaryThread` already correctly included `Architecture.Arm` in its skip. This change makes the main-thread version consistent: ```csharp // Before if (((RuntimeInformation.ProcessArchitecture == Architecture.Arm64) || ... || (RuntimeInformation.ProcessArchitecture == Architecture.LoongArch64)) && ...) // After if (((RuntimeInformation.ProcessArchitecture == Architecture.Arm64) || ... || (RuntimeInformation.ProcessArchitecture == Architecture.LoongArch64) || (RuntimeInformation.ProcessArchitecture == Architecture.Arm)) && ...) ``` # Customer Impact No customer impact — this is a test-only fix. The underlying ARM32 stack overflow detection limitation (tracked in #110173) remains; this just prevents a spurious CI failure. # Regression Not a regression in product behavior. The test skip was simply omitted from `TestStackOverflowLargeFrameMainThread` while it was correctly applied to the secondary-thread variant. # Testing The fix aligns the skip condition with the already-correct `TestStackOverflowLargeFrameSecondaryThread`. No behavior change on non-ARM32 platforms. # Risk Minimal. Test-only change that adds an early-return on ARM32 Unix, matching existing patterns in the same file. # Package authoring no longer needed in .NET 9 IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version. Keep in mind that we still need package authoring in .NET 8 and older versions. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mangod9 <61718172+mangod9@users.noreply.github.com>
1 parent 19d0c6e commit 5f9352d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/tests/baseservices/exceptions/stackoverflow/stackoverflowtester.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,15 @@ public static void TestStackOverflowSmallFrameMainThread()
124124
public static void TestStackOverflowLargeFrameMainThread()
125125
{
126126
if (((RuntimeInformation.ProcessArchitecture == Architecture.Arm64) || (RuntimeInformation.ProcessArchitecture == Architecture.X64) || (RuntimeInformation.ProcessArchitecture == Architecture.RiscV64) ||
127-
(RuntimeInformation.ProcessArchitecture == Architecture.LoongArch64)) &&
127+
(RuntimeInformation.ProcessArchitecture == Architecture.LoongArch64) || (RuntimeInformation.ProcessArchitecture == Architecture.Arm)) &&
128128
((Environment.OSVersion.Platform == PlatformID.Unix) || (Environment.OSVersion.Platform == PlatformID.MacOSX)))
129129
{
130-
// Disabled on Unix ARM64, X64, RISCV64, and LoongArch64.
130+
// Disabled on Unix RISCV64 and LoongArch64, similar to ARM64.
131131
// LoongArch64 hit this issue on Alpine. TODO: implement stack probing using helpers.
132-
// ARM64 and X64 disabled due to https://github.com/dotnet/runtime/issues/13519
132+
// Disabled on Unix ARM64 due to https://github.com/dotnet/runtime/issues/13519
133133
// The current stack probing doesn't move the stack pointer and so the runtime sometimes cannot
134134
// recognize the underlying sigsegv as stack overflow when it probes too far from SP.
135+
// Disabled on Unix X64/Arm due to https://github.com/dotnet/runtime/issues/110173 which needs investigation.
135136
return;
136137
}
137138

0 commit comments

Comments
 (0)