[SymDB] DEBUG-4760 Fix "Not enough space for all closure methods"#8101
Merged
dudikeleti merged 1 commit intomasterfrom Jan 23, 2026
Merged
[SymDB] DEBUG-4760 Fix "Not enough space for all closure methods"#8101dudikeleti merged 1 commit intomasterfrom
dudikeleti merged 1 commit intomasterfrom
Conversation
tylfin
approved these changes
Jan 23, 2026
BenchmarksBenchmark execution time: 2026-01-23 17:54:29 Comparing candidate commit 51f3fb1 in PR branch Found 10 performance improvements and 7 performance regressions! Performance is the same for 152 metrics, 23 unstable metrics. scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net6.0
scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody netcoreapp3.1
scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0
scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0
scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net6.0
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
scenario:Benchmarks.Trace.DbCommandBenchmark.ExecuteNonQuery net6.0
scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472
scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
Fixed an issue where we could drop compiler-generated closure methods and emit "Not enough space for all closure methods".
Reason for change
Dropping closure methods reduces accuracy (missing closures in symbol data) and produces noisy warnings for valid user code. The fix keeps the path efficient while ensuring correctness.
Implementation details
Improve heuristic for the rented array:
estimatedCapacity = methods.Count * 2 + nestedTypes.Length * 4, with a small minimum and int.MaxValue clamp.If the heuristic is still too small, grow the pooled buffer on demand (×2).
Test coverage
Added SymbolExtractorTest.DoesNotDropClosureMethodsWhenThereAreMany to assert we extract all closure scopes for a sample with ManyClosures.ClosureCount lambdas.