From b06c1bd324d3aff0f132381727c85940bcf93b2f Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 4 Sep 2017 19:52:49 +0200 Subject: pkg/compiler: verify validity of len targets Update #217 --- pkg/compiler/testdata/recursion.txt | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pkg/compiler/testdata/recursion.txt (limited to 'pkg/compiler/testdata/recursion.txt') diff --git a/pkg/compiler/testdata/recursion.txt b/pkg/compiler/testdata/recursion.txt new file mode 100644 index 000000000..683049b91 --- /dev/null +++ b/pkg/compiler/testdata/recursion.txt @@ -0,0 +1,37 @@ +# Copyright 2017 syzkaller project authors. All rights reserved. +# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +resource r6[r6] ### recursive resource r6->r6 +resource r7[r8] ### recursive resource r7->r8->r7 +resource r8[r7] ### recursive resource r8->r7->r8 + +sr1 { + f1 sr1 ### recursive declaration: sr1.f1 -> sr1 (mark some pointers as opt) +} + +sr2 { + f1 sr3 + f2 sr4 +} + +sr3 { + f1 ptr[in, sr3] ### recursive declaration: sr3.f1 -> sr3 (mark some pointers as opt) +} + +sr4 { + f1 ptr[in, sr3] + f2 array[ptr[in, sr5], 4] ### recursive declaration: sr4.f2 -> sr5.f2 -> sr6.f1 -> sr4 (mark some pointers as opt) +} + +sr5 [ + f1 int32 + f2 sr6 +] + +sr6 { + f1 sr4 +} + +sr7 { + f1 ptr[in, sr7, opt] +} -- cgit mrf-deployment