You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
runtime/src/tests/Loader/classloader/generics/Instantiation/Nesting/NestedGenericTypesMix.cs (34KB, 1,022 lines) makes csharp func_start run effectively forever (>15s cutoff, and a pool worker spun 14+ CPU-min) on both the pre- and post-#3317 regex, on both code_stream and the Mode-B safe stream.
No production impact today: a real scan never reaches the regex. The aperture blocks the file first (Blocked (Saturation: Line 16 exceeds 500 chars), verified on main). It only bites if that saturation gate is relaxed, or if a similar nested-generic file has short lines. Parked for that reason.
Suspected mechanism
The nested-generic token alternatives in the Branch A/B return-type loop, <[^<>]{0,100}(?:<[^<>]{0,100}>[^<>]{0,100}){0,5}>, overlap with </> in the single-char class [a-zA-Z0-9_<>\[\]?.*]. This is the same ambiguity family as the [...] trigger (sibling issue), applied to <...> on long nested generic type arguments. Not yet bisected to a line.
When revisited
Bisect the hot line (per-line-start func_start.match timing).
Likely shares a fix with the [...] ambiguity issue (atomic groups on Python ≥3.11, or a disambiguated token class).
Add a ReDoS regression test with a short-line nested-generic payload.
Activity
test: csharp func_start nested-generic-types-mix ReDoS regression (Pa…