Make base-type collection stack-safe for deep inheritance chains
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Start with BaseTypeCollector.CollectBaseTypes() and the GetNonInterfaceBaseTypes() callsites mentioned for deconstruction and BAML. Trace how collection currently detects cycles and orders base types, then find the relevant test project and add coverage for a deep acyclic inheritance chain. Done means traversal completes without stack overflow while preserving cycle detection and base-before-derived ordering.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Follow-up to PR #4336 and finding ANT-2026-OLTG8WBX.
PR #4336 fixes the reported short cyclic-base walks by using GetNonInterfaceBaseTypes(). That helper delegates to recursive BaseTypeCollector.CollectBaseTypes(), so sufficiently deep inheritance chains can still exhaust the process stack before traversal completes (or before a long cycle is detected). The PR's deconstruction and BAML callsites now use this recursive path.
Reproduced against PR head 94b35ee08da199645594783cd3ec93c3e6afbcd5 on .NET 11: a metadata assembly with 150,000 classes in one inheritance chain (T0 : System.Object, each subsequent Tn : Tn-1) causes T149999.GetNonInterfaceBaseTypes().Count() to terminate with Stack overflow, after about 47,575 repeated BaseTypeCollector.CollectBaseTypes() frames. The previous iterative DirectBaseTypes walk completed and counted 150,001 types.
Consider making base-type collection iterative while preserving its cycle detection and base-before-derived ordering, and add coverage for a deep acyclic chain (and, if useful, a long cycle).
Assisted-by: OpenCode:gpt-6-luna:OpenCode
- Ngôn ngữ chính
- C#
- Star
- 27.1k
- Fork
- 3.8k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 44
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của icsharpcode/ILSpy
-
AvaloniaEdit Issues to dateĐang mởExternal UI
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 75/100
icsharpcode/ILSpy#4284 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Misdecompilation of a lazy initialization patternCó thể đã có người làm @siegfriedpammer đã nhận 5 ngày trước. Đang mởBug Decompiler
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
icsharpcode/ILSpy#4349 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
icsharpcode/ILSpy#4343 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
AI
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 55/100
icsharpcode/ILSpy#4300 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
icsharpcode/ILSpy#4298 · 1 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của icsharpcode/ILSpy
Issue tương tự
-
type:task ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
elsa-workflows/elsa-foundation#5253 ·
Maintainer thường phản hồi trong vòng 1 ngày