Skip to content

Commit 450f43f

Browse files
authored
Merge pull request #83834 from slavapestov/subst-limit
AST: Allow substitution limits >= 32767
2 parents d4cdac7 + d80ad91 commit 450f43f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/swift/AST/InFlightSubstitution.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ class InFlightSubstitution {
3535
LookupConformanceFn BaselineLookupConformance;
3636
SubstOptions Options;
3737
RecursiveTypeProperties Props;
38-
unsigned RemainingCount : 15;
38+
unsigned RemainingCount : 31;
3939
unsigned InitLimit : 1;
40-
unsigned RemainingDepth : 15;
40+
unsigned RemainingDepth : 31;
4141
unsigned LimitReached : 1;
4242

4343
struct ActivePackExpansion {

include/swift/Basic/LangOptions.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,11 +615,11 @@ namespace swift {
615615

616616
/// Maximum nesting depth for type substitution operations, to prevent
617617
/// runaway recursion.
618-
unsigned MaxSubstitutionDepth = 1000;
618+
unsigned MaxSubstitutionDepth = 500;
619619

620620
/// Maximum step count for type substitution operations, to prevent
621621
/// runaway recursion.
622-
unsigned MaxSubstitutionCount = 32000;
622+
unsigned MaxSubstitutionCount = 120000;
623623

624624
/// Enable implicit lifetime dependence for ~Escapable return types.
625625
bool EnableExperimentalLifetimeDependenceInference = false;

0 commit comments

Comments
 (0)