diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2017-07-19 15:31:22 +0200 |
|---|---|---|
| committer | Andrey Konovalov <andreyknvl@google.com> | 2017-07-19 15:46:50 +0200 |
| commit | 94f1595a775beffc924ace61dbdaabfc57d65668 (patch) | |
| tree | 23419c4fc03a7fbdbb4123533660d768243826d3 | |
| parent | 0107e4124d76088695cc3c6132072a3e604121a4 (diff) | |
prog: allow recursion for optional pointers
When syzkaller generates arg that uses a few structs that reference each
other via pointers, it can go into infinite recursion and crash.
Fix this by forcing pointer args to be null when the depth of recursion
reaches 3 for some struct.
| -rw-r--r-- | executor/syscalls.h | 9 | ||||
| -rw-r--r-- | prog/rand.go | 19 | ||||
| -rw-r--r-- | sys/sys_amd64.go | 70 | ||||
| -rw-r--r-- | sys/sys_arm64.go | 70 | ||||
| -rw-r--r-- | sys/sys_ppc64le.go | 70 | ||||
| -rw-r--r-- | sys/test.txt | 31 |
6 files changed, 268 insertions, 1 deletions
diff --git a/executor/syscalls.h b/executor/syscalls.h index 80648b4f3..7f6388789 100644 --- a/executor/syscalls.h +++ b/executor/syscalls.h @@ -1464,6 +1464,9 @@ static call_t syscalls[] = { {"syz_test$opt0", 1000001}, {"syz_test$opt1", 1000001}, {"syz_test$opt2", 1000001}, + {"syz_test$recur0", 1000001}, + {"syz_test$recur1", 1000001}, + {"syz_test$recur2", 1000001}, {"syz_test$regression0", 1000001}, {"syz_test$text_x86_16", 1000001}, {"syz_test$text_x86_32", 1000001}, @@ -2972,6 +2975,9 @@ static call_t syscalls[] = { {"syz_test$opt0", 1000001}, {"syz_test$opt1", 1000001}, {"syz_test$opt2", 1000001}, + {"syz_test$recur0", 1000001}, + {"syz_test$recur1", 1000001}, + {"syz_test$recur2", 1000001}, {"syz_test$regression0", 1000001}, {"syz_test$text_x86_16", 1000001}, {"syz_test$text_x86_32", 1000001}, @@ -4480,6 +4486,9 @@ static call_t syscalls[] = { {"syz_test$opt0", 1000001}, {"syz_test$opt1", 1000001}, {"syz_test$opt2", 1000001}, + {"syz_test$recur0", 1000001}, + {"syz_test$recur1", 1000001}, + {"syz_test$recur2", 1000001}, {"syz_test$regression0", 1000001}, {"syz_test$text_x86_16", 1000001}, {"syz_test$text_x86_32", 1000001}, diff --git a/prog/rand.go b/prog/rand.go index d6bcecb70..f510c5e10 100644 --- a/prog/rand.go +++ b/prog/rand.go @@ -20,10 +20,11 @@ var pageStartPool = sync.Pool{New: func() interface{} { return new([]uintptr) }} type randGen struct { *rand.Rand inCreateResource bool + recDepth map[sys.Type]int } func newRand(rs rand.Source) *randGen { - return &randGen{rand.New(rs), false} + return &randGen{rand.New(rs), false, make(map[sys.Type]int)} } func (r *randGen) rand(n int) uintptr { @@ -629,6 +630,22 @@ func (r *randGen) generateArg(s *state, typ sys.Type) (arg Arg, calls []*Call) { } } + // Allow infinite recursion for optional pointers. + if pt, ok := typ.(*sys.PtrType); ok && typ.Optional() { + if _, ok := pt.Type.(*sys.StructType); ok { + r.recDepth[pt.Type] += 1 + defer func() { + r.recDepth[pt.Type] -= 1 + if r.recDepth[pt.Type] == 0 { + delete(r.recDepth, pt.Type) + } + }() + if r.recDepth[pt.Type] >= 3 { + return pointerArg(typ, 0, 0, 0, nil), nil + } + } + } + switch a := typ.(type) { case *sys.ResourceType: switch { diff --git a/sys/sys_amd64.go b/sys/sys_amd64.go index 88835de03..9f8013528 100644 --- a/sys/sys_amd64.go +++ b/sys/sys_amd64.go @@ -680,6 +680,10 @@ var structArray = []Type{ &StructType{TypeCommon: TypeCommon{TypeName: "syz_length_parent2_struct_inner_inner", IsOptional: false}}, &StructType{TypeCommon: TypeCommon{TypeName: "syz_length_parent_struct", IsOptional: false}}, &StructType{TypeCommon: TypeCommon{TypeName: "syz_length_vma_struct", IsOptional: false}}, + &StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_0", IsOptional: false}}, + &StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_1", IsOptional: false}}, + &StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_2", IsOptional: false}}, + &StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_2_0", IsOptional: false}}, &StructType{TypeCommon: TypeCommon{TypeName: "syz_regression0_struct", IsOptional: false}}, &UnionType{TypeCommon: TypeCommon{TypeName: "syz_union0", IsOptional: false}}, &StructType{TypeCommon: TypeCommon{TypeName: "syz_union0_struct", IsOptional: false}}, @@ -19100,6 +19104,69 @@ var structFields = []struct { &VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "f0", ArgDir: DirOut, IsOptional: false}, RangeBegin: 0, RangeEnd: 0}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "f1", ArgDir: DirOut, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Buf: "f0", ByteSize: 0}, }}, + {structKey{"syz_recur_0", "", DirIn}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + }}, + {structKey{"syz_recur_0", "", DirInOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + }}, + {structKey{"syz_recur_0", "", DirOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + }}, + {structKey{"syz_recur_1", "", DirIn}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_1", "", DirInOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_1", "", DirOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_2", "", DirIn}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a4", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a5", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_2", "", DirInOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a4", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a5", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_2", "", DirOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a4", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a5", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_2_0", "", DirIn}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + }}, + {structKey{"syz_recur_2_0", "", DirInOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + }}, + {structKey{"syz_recur_2_0", "", DirOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + }}, {structKey{"syz_regression0_struct", "", DirIn}, []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "f0", ArgDir: DirIn, IsOptional: false}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "f0", ArgDir: DirOut, IsOptional: false}, Kind: BufferBlobRand}}, }}, @@ -22833,6 +22900,9 @@ var Calls = []*Call{ &Call{Name: "syz_test$opt0", CallName: "syz_test", Native: false, Args: []Type{&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}}}, NR: 1000001}, &Call{Name: "syz_test$opt1", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}}}}, NR: 1000001}, &Call{Name: "syz_test$opt2", CallName: "syz_test", Native: false, Args: []Type{&VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "a0", ArgDir: DirIn, IsOptional: true}, RangeBegin: 0, RangeEnd: 0}}, NR: 1000001}, + &Call{Name: "syz_test$recur0", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"syz_recur_0", "", DirInOut})}}, NR: 1000001}, + &Call{Name: "syz_test$recur1", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"syz_recur_1", "", DirInOut})}}, NR: 1000001}, + &Call{Name: "syz_test$recur2", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"syz_recur_2", "", DirInOut})}}, NR: 1000001}, &Call{Name: "syz_test$regression0", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"syz_regression0_struct", "", DirInOut})}}, NR: 1000001}, &Call{Name: "syz_test$text_x86_16", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "text", FldName: "", ArgDir: DirIn, IsOptional: false}, Kind: BufferText, Text: Text_x86_16}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "a1", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Buf: "a0", ByteSize: 0}}, NR: 1000001}, &Call{Name: "syz_test$text_x86_32", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "text", FldName: "", ArgDir: DirIn, IsOptional: false}, Kind: BufferText, Text: Text_x86_32}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "a1", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Buf: "a0", ByteSize: 0}}, NR: 1000001}, diff --git a/sys/sys_arm64.go b/sys/sys_arm64.go index 0e9a19751..3a99368ad 100644 --- a/sys/sys_arm64.go +++ b/sys/sys_arm64.go @@ -680,6 +680,10 @@ var structArray = []Type{ &StructType{TypeCommon: TypeCommon{TypeName: "syz_length_parent2_struct_inner_inner", IsOptional: false}}, &StructType{TypeCommon: TypeCommon{TypeName: "syz_length_parent_struct", IsOptional: false}}, &StructType{TypeCommon: TypeCommon{TypeName: "syz_length_vma_struct", IsOptional: false}}, + &StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_0", IsOptional: false}}, + &StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_1", IsOptional: false}}, + &StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_2", IsOptional: false}}, + &StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_2_0", IsOptional: false}}, &StructType{TypeCommon: TypeCommon{TypeName: "syz_regression0_struct", IsOptional: false}}, &UnionType{TypeCommon: TypeCommon{TypeName: "syz_union0", IsOptional: false}}, &StructType{TypeCommon: TypeCommon{TypeName: "syz_union0_struct", IsOptional: false}}, @@ -19100,6 +19104,69 @@ var structFields = []struct { &VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "f0", ArgDir: DirOut, IsOptional: false}, RangeBegin: 0, RangeEnd: 0}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "f1", ArgDir: DirOut, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Buf: "f0", ByteSize: 0}, }}, + {structKey{"syz_recur_0", "", DirIn}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + }}, + {structKey{"syz_recur_0", "", DirInOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + }}, + {structKey{"syz_recur_0", "", DirOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + }}, + {structKey{"syz_recur_1", "", DirIn}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_1", "", DirInOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_1", "", DirOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_2", "", DirIn}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a4", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a5", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_2", "", DirInOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a4", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a5", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_2", "", DirOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a4", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a5", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_2_0", "", DirIn}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + }}, + {structKey{"syz_recur_2_0", "", DirInOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + }}, + {structKey{"syz_recur_2_0", "", DirOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + }}, {structKey{"syz_regression0_struct", "", DirIn}, []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "f0", ArgDir: DirIn, IsOptional: false}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "f0", ArgDir: DirOut, IsOptional: false}, Kind: BufferBlobRand}}, }}, @@ -22833,6 +22900,9 @@ var Calls = []*Call{ &Call{Name: "syz_test$opt0", CallName: "syz_test", Native: false, Args: []Type{&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}}}, NR: 1000001}, &Call{Name: "syz_test$opt1", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}}}}, NR: 1000001}, &Call{Name: "syz_test$opt2", CallName: "syz_test", Native: false, Args: []Type{&VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "a0", ArgDir: DirIn, IsOptional: true}, RangeBegin: 0, RangeEnd: 0}}, NR: 1000001}, + &Call{Name: "syz_test$recur0", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"syz_recur_0", "", DirInOut})}}, NR: 1000001}, + &Call{Name: "syz_test$recur1", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"syz_recur_1", "", DirInOut})}}, NR: 1000001}, + &Call{Name: "syz_test$recur2", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"syz_recur_2", "", DirInOut})}}, NR: 1000001}, &Call{Name: "syz_test$regression0", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"syz_regression0_struct", "", DirInOut})}}, NR: 1000001}, &Call{Name: "syz_test$text_x86_16", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "text", FldName: "", ArgDir: DirIn, IsOptional: false}, Kind: BufferText, Text: Text_x86_16}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "a1", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Buf: "a0", ByteSize: 0}}, NR: 1000001}, &Call{Name: "syz_test$text_x86_32", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "text", FldName: "", ArgDir: DirIn, IsOptional: false}, Kind: BufferText, Text: Text_x86_32}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "a1", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Buf: "a0", ByteSize: 0}}, NR: 1000001}, diff --git a/sys/sys_ppc64le.go b/sys/sys_ppc64le.go index 8f15ed9d6..69fae9ea2 100644 --- a/sys/sys_ppc64le.go +++ b/sys/sys_ppc64le.go @@ -680,6 +680,10 @@ var structArray = []Type{ &StructType{TypeCommon: TypeCommon{TypeName: "syz_length_parent2_struct_inner_inner", IsOptional: false}}, &StructType{TypeCommon: TypeCommon{TypeName: "syz_length_parent_struct", IsOptional: false}}, &StructType{TypeCommon: TypeCommon{TypeName: "syz_length_vma_struct", IsOptional: false}}, + &StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_0", IsOptional: false}}, + &StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_1", IsOptional: false}}, + &StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_2", IsOptional: false}}, + &StructType{TypeCommon: TypeCommon{TypeName: "syz_recur_2_0", IsOptional: false}}, &StructType{TypeCommon: TypeCommon{TypeName: "syz_regression0_struct", IsOptional: false}}, &UnionType{TypeCommon: TypeCommon{TypeName: "syz_union0", IsOptional: false}}, &StructType{TypeCommon: TypeCommon{TypeName: "syz_union0_struct", IsOptional: false}}, @@ -19100,6 +19104,69 @@ var structFields = []struct { &VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "f0", ArgDir: DirOut, IsOptional: false}, RangeBegin: 0, RangeEnd: 0}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "f1", ArgDir: DirOut, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Buf: "f0", ByteSize: 0}, }}, + {structKey{"syz_recur_0", "", DirIn}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + }}, + {structKey{"syz_recur_0", "", DirInOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + }}, + {structKey{"syz_recur_0", "", DirOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + }}, + {structKey{"syz_recur_1", "", DirIn}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_1", "", DirInOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_1", "", DirOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_2", "", DirIn}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a4", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a5", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_2", "", DirInOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a4", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a5", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_2", "", DirOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_1", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a4", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a5", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2", "", DirIn})}, + }}, + {structKey{"syz_recur_2_0", "", DirIn}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + }}, + {structKey{"syz_recur_2_0", "", DirInOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + }}, + {structKey{"syz_recur_2_0", "", DirOut}, []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a2", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", ArgDir: DirIn, IsOptional: true}, Type: getStruct(structKey{"syz_recur_2_0", "", DirIn})}, + }}, {structKey{"syz_regression0_struct", "", DirIn}, []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "f0", ArgDir: DirIn, IsOptional: false}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "f0", ArgDir: DirOut, IsOptional: false}, Kind: BufferBlobRand}}, }}, @@ -22833,6 +22900,9 @@ var Calls = []*Call{ &Call{Name: "syz_test$opt0", CallName: "syz_test", Native: false, Args: []Type{&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}}}, NR: 1000001}, &Call{Name: "syz_test$opt1", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "intptr", FldName: "", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}}}}, NR: 1000001}, &Call{Name: "syz_test$opt2", CallName: "syz_test", Native: false, Args: []Type{&VmaType{TypeCommon: TypeCommon{TypeName: "vma", FldName: "a0", ArgDir: DirIn, IsOptional: true}, RangeBegin: 0, RangeEnd: 0}}, NR: 1000001}, + &Call{Name: "syz_test$recur0", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"syz_recur_0", "", DirInOut})}}, NR: 1000001}, + &Call{Name: "syz_test$recur1", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"syz_recur_1", "", DirInOut})}}, NR: 1000001}, + &Call{Name: "syz_test$recur2", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"syz_recur_2", "", DirInOut})}}, NR: 1000001}, &Call{Name: "syz_test$regression0", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"syz_regression0_struct", "", DirInOut})}}, NR: 1000001}, &Call{Name: "syz_test$text_x86_16", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "text", FldName: "", ArgDir: DirIn, IsOptional: false}, Kind: BufferText, Text: Text_x86_16}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "a1", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Buf: "a0", ByteSize: 0}}, NR: 1000001}, &Call{Name: "syz_test$text_x86_32", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "text", FldName: "", ArgDir: DirIn, IsOptional: false}, Kind: BufferText, Text: Text_x86_32}}, &LenType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "len", FldName: "a1", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}, Buf: "a0", ByteSize: 0}}, NR: 1000001}, diff --git a/sys/test.txt b/sys/test.txt index 851164305..5072cff97 100644 --- a/sys/test.txt +++ b/sys/test.txt @@ -463,3 +463,34 @@ syz_csum_ipv6_icmp_packet { header syz_csum_ipv6_header payload syz_csum_icmp_packet } [packed] + +# Recursion + +syz_recur_0 { + a0 ptr[in, syz_recur_0, opt] +} + +syz_recur_1 { + a0 ptr[in, syz_recur_1, opt] + a1 ptr[in, syz_recur_2, opt] +} + +syz_recur_2_0 { + a0 ptr[in, syz_recur_2_0, opt] + a1 ptr[in, syz_recur_2_0, opt] + a2 ptr[in, syz_recur_2_0, opt] + a3 ptr[in, syz_recur_2_0, opt] +} + +syz_recur_2 { + a0 ptr[in, syz_recur_0, opt] + a1 ptr[in, syz_recur_1, opt] + a2 ptr[in, syz_recur_2_0, opt] + a3 ptr[in, syz_recur_2_0, opt] + a4 ptr[in, syz_recur_2, opt] + a5 ptr[in, syz_recur_2, opt] +} + +syz_test$recur0(a0 ptr[inout, syz_recur_0]) +syz_test$recur1(a0 ptr[inout, syz_recur_1]) +syz_test$recur2(a0 ptr[inout, syz_recur_2]) |
