diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2021-10-05 14:55:30 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2021-10-05 15:45:04 +0200 |
| commit | 0a63fd369d13c0ab63f5055e3c734222f4d02631 (patch) | |
| tree | a94343e8728b08032fe4441fdc13cb5d2e70db7c /pkg/compiler/compiler_test.go | |
| parent | eaadec3ec64508f32364171878561860087ec85a (diff) | |
pkg/compiler: fix almost infinite recursion in template instantiation
Fix another cases where recurion is finite but fan out factor is large,
so our recursion check would take 5^10 iterations to handle this.
Diffstat (limited to 'pkg/compiler/compiler_test.go')
| -rw-r--r-- | pkg/compiler/compiler_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/compiler/compiler_test.go b/pkg/compiler/compiler_test.go index 8045bf608..79735d10a 100644 --- a/pkg/compiler/compiler_test.go +++ b/pkg/compiler/compiler_test.go @@ -136,6 +136,16 @@ func TestFuzz(t *testing.T) { t.Parallel() for _, data := range []string{ ` +type H b[A] +type b[L] { + m b[u:L] + l b[z:L] + m b[V:L] + m b[0:L] + H b[o:L] +} +`, + ` type p b[L] type b[L]{ e b[3:L] |
