From 12a519cbf544bc0891348a7d3b0be1dc936935d2 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Thu, 12 Feb 2026 21:27:21 -0800 Subject: [PATCH] Skip special formatting for stackoverflow exceptions in trivial cases Skip special formatting for stackoverflow exceptions if it would make the output more verbose (more lines). --- src/coreclr/vm/eepolicy.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/coreclr/vm/eepolicy.cpp b/src/coreclr/vm/eepolicy.cpp index f839a962e2ebe9..5d1fe1aabf99dd 100644 --- a/src/coreclr/vm/eepolicy.cpp +++ b/src/coreclr/vm/eepolicy.cpp @@ -287,6 +287,12 @@ class CallStackLogger } } + // Skip special formatting if it would make the output more verbose (add more lines) + if (largestCommonRepeat * largestCommonLength < 4) + { + largestCommonLength = 0; + } + for (int i = 0; i < largestCommonStartOffset; i++) { PrintFrame(i, pWordAt);