StateSpaceLimitExceeded
Raised (as a Left, never thrown) by Subset.isEmptyBounded, Subset.subsetBounded, TokenMatcher.fromRegexesBounded, and TokenMatcher.fromSubsetsBounded when deciding the answer would require visiting more than limit distinct derivative states.
This engine has no classic backtracking, so it isn't exposed to catastrophic-backtracking ReDoS in the traditional sense - but the derivative state space these operations explore has no bound of its own: a pattern built to maximize distinct derivative states (many overlapping alternations/intersections/bounded repetitions near Regex.maxRepeatBound) can still make either slow or memory-heavy. That matters wherever pattern strings come from untrusted input, e.g. Subset's stated use case of validating one pattern against another at load/build time. The bounded methods this guards are opt-in: the plain isEmpty/subset/fromRegexes/ fromSubsets stay uncapped, unchanged, for every existing caller.
Attributes
- Source
- Subset.scala
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any