Make base-type collection stack-safe for deep inheritance chains
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- C#
- Stelle
- 27.1k
- Fork
- 3.8k
- Merge medio
- 1g 23h
- PR unite (30g)
- 44
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di icsharpcode/ILSpy
-
AvaloniaEdit Issues to dateApertaExternal UI
Difficoltà 1/5 1-3 ore Idoneità per principianti 75/100
icsharpcode/ILSpy#4284 ·
I maintainer di solito rispondono entro 1 giorno
-
Misdecompilation of a lazy initialization patternForse già presa @siegfriedpammer l’ha presa 5 giorni fa. ApertaBug Decompiler
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
icsharpcode/ILSpy#4349 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
icsharpcode/ILSpy#4343 ·
I maintainer di solito rispondono entro 1 giorno
-
AI
Difficoltà 4/5 1-2 giorni Idoneità per principianti 55/100
icsharpcode/ILSpy#4300 ·
I maintainer di solito rispondono entro 1 giorno
-
Enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
icsharpcode/ILSpy#4298 · 1 commento · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di icsharpcode/ILSpy
Issue simili
-
type:task ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
elsa-workflows/elsa-foundation#5253 ·
I maintainer di solito rispondono entro 1 giorno