aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@gmail.com>2017-07-24 16:43:50 +0200
committerGitHub <noreply@github.com>2017-07-24 16:43:50 +0200
commit6bbb0ce7e4e15656bb20f434583cc56e2acb492e (patch)
tree9624bcd0cecae843b31216fa5de7978d6d675572 /sys
parent1e06f3e00fe12ed48282e1c896f57b0c2874eb44 (diff)
parent2b21a445652488099a64067e13b98576f78f0363 (diff)
Merge pull request #297 from xairy/up-fix-enconding
prog: return error instead of panic when parsing
Diffstat (limited to 'sys')
-rw-r--r--sys/sys_amd64.go33
-rw-r--r--sys/sys_arm64.go33
-rw-r--r--sys/sys_ppc64le.go33
-rw-r--r--sys/test.txt13
4 files changed, 112 insertions, 0 deletions
diff --git a/sys/sys_amd64.go b/sys/sys_amd64.go
index 9f8013528..8ae510019 100644
--- a/sys/sys_amd64.go
+++ b/sys/sys_amd64.go
@@ -685,6 +685,8 @@ var structArray = []Type{
&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}},
+ &StructType{TypeCommon: TypeCommon{TypeName: "syz_struct0", IsOptional: false}},
+ &StructType{TypeCommon: TypeCommon{TypeName: "syz_struct1", IsOptional: false}},
&UnionType{TypeCommon: TypeCommon{TypeName: "syz_union0", IsOptional: false}},
&StructType{TypeCommon: TypeCommon{TypeName: "syz_union0_struct", IsOptional: false}},
&UnionType{TypeCommon: TypeCommon{TypeName: "syz_union1", IsOptional: false}},
@@ -19176,6 +19178,36 @@ var structFields = []struct {
{structKey{"syz_regression0_struct", "", DirOut}, []Type{
&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "f0", ArgDir: DirOut, IsOptional: false}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "f0", ArgDir: DirOut, IsOptional: false}, Kind: BufferBlobRand}},
}},
+ {structKey{"syz_struct0", "", DirIn}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "f0", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}},
+ getStruct(structKey{"syz_struct1", "f1", DirIn}),
+ }},
+ {structKey{"syz_struct0", "", DirInOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "f0", ArgDir: DirInOut, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}},
+ getStruct(structKey{"syz_struct1", "f1", DirInOut}),
+ }},
+ {structKey{"syz_struct0", "", DirOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "f0", ArgDir: DirOut, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}},
+ getStruct(structKey{"syz_struct1", "f1", DirOut}),
+ }},
+ {structKey{"syz_struct1", "", DirIn}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirIn, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
+ {structKey{"syz_struct1", "", DirInOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirInOut, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
+ {structKey{"syz_struct1", "", DirOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirOut, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
+ {structKey{"syz_struct1", "f1", DirIn}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirIn, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
+ {structKey{"syz_struct1", "f1", DirInOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirInOut, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
+ {structKey{"syz_struct1", "f1", DirOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirOut, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
{structKey{"syz_union0", "", DirIn}, []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "f0", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "f1", ArgDir: DirIn, IsOptional: false}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}}, Kind: ArrayRangeLen, RangeBegin: 10, RangeEnd: 10},
@@ -22904,6 +22936,7 @@ var Calls = []*Call{
&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$struct", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"syz_struct0", "", DirIn})}}, 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},
&Call{Name: "syz_test$text_x86_64", 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_64}}, &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 3a99368ad..08d6d18f4 100644
--- a/sys/sys_arm64.go
+++ b/sys/sys_arm64.go
@@ -685,6 +685,8 @@ var structArray = []Type{
&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}},
+ &StructType{TypeCommon: TypeCommon{TypeName: "syz_struct0", IsOptional: false}},
+ &StructType{TypeCommon: TypeCommon{TypeName: "syz_struct1", IsOptional: false}},
&UnionType{TypeCommon: TypeCommon{TypeName: "syz_union0", IsOptional: false}},
&StructType{TypeCommon: TypeCommon{TypeName: "syz_union0_struct", IsOptional: false}},
&UnionType{TypeCommon: TypeCommon{TypeName: "syz_union1", IsOptional: false}},
@@ -19176,6 +19178,36 @@ var structFields = []struct {
{structKey{"syz_regression0_struct", "", DirOut}, []Type{
&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "f0", ArgDir: DirOut, IsOptional: false}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "f0", ArgDir: DirOut, IsOptional: false}, Kind: BufferBlobRand}},
}},
+ {structKey{"syz_struct0", "", DirIn}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "f0", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}},
+ getStruct(structKey{"syz_struct1", "f1", DirIn}),
+ }},
+ {structKey{"syz_struct0", "", DirInOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "f0", ArgDir: DirInOut, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}},
+ getStruct(structKey{"syz_struct1", "f1", DirInOut}),
+ }},
+ {structKey{"syz_struct0", "", DirOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "f0", ArgDir: DirOut, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}},
+ getStruct(structKey{"syz_struct1", "f1", DirOut}),
+ }},
+ {structKey{"syz_struct1", "", DirIn}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirIn, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
+ {structKey{"syz_struct1", "", DirInOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirInOut, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
+ {structKey{"syz_struct1", "", DirOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirOut, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
+ {structKey{"syz_struct1", "f1", DirIn}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirIn, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
+ {structKey{"syz_struct1", "f1", DirInOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirInOut, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
+ {structKey{"syz_struct1", "f1", DirOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirOut, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
{structKey{"syz_union0", "", DirIn}, []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "f0", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "f1", ArgDir: DirIn, IsOptional: false}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}}, Kind: ArrayRangeLen, RangeBegin: 10, RangeEnd: 10},
@@ -22904,6 +22936,7 @@ var Calls = []*Call{
&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$struct", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"syz_struct0", "", DirIn})}}, 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},
&Call{Name: "syz_test$text_x86_64", 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_64}}, &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 69fae9ea2..cf33cd926 100644
--- a/sys/sys_ppc64le.go
+++ b/sys/sys_ppc64le.go
@@ -685,6 +685,8 @@ var structArray = []Type{
&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}},
+ &StructType{TypeCommon: TypeCommon{TypeName: "syz_struct0", IsOptional: false}},
+ &StructType{TypeCommon: TypeCommon{TypeName: "syz_struct1", IsOptional: false}},
&UnionType{TypeCommon: TypeCommon{TypeName: "syz_union0", IsOptional: false}},
&StructType{TypeCommon: TypeCommon{TypeName: "syz_union0_struct", IsOptional: false}},
&UnionType{TypeCommon: TypeCommon{TypeName: "syz_union1", IsOptional: false}},
@@ -19176,6 +19178,36 @@ var structFields = []struct {
{structKey{"syz_regression0_struct", "", DirOut}, []Type{
&PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "f0", ArgDir: DirOut, IsOptional: false}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "f0", ArgDir: DirOut, IsOptional: false}, Kind: BufferBlobRand}},
}},
+ {structKey{"syz_struct0", "", DirIn}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "f0", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}},
+ getStruct(structKey{"syz_struct1", "f1", DirIn}),
+ }},
+ {structKey{"syz_struct0", "", DirInOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "f0", ArgDir: DirInOut, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}},
+ getStruct(structKey{"syz_struct1", "f1", DirInOut}),
+ }},
+ {structKey{"syz_struct0", "", DirOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "f0", ArgDir: DirOut, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}},
+ getStruct(structKey{"syz_struct1", "f1", DirOut}),
+ }},
+ {structKey{"syz_struct1", "", DirIn}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirIn, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
+ {structKey{"syz_struct1", "", DirInOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirInOut, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
+ {structKey{"syz_struct1", "", DirOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirOut, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
+ {structKey{"syz_struct1", "f1", DirIn}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirIn, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
+ {structKey{"syz_struct1", "f1", DirInOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirInOut, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
+ {structKey{"syz_struct1", "f1", DirOut}, []Type{
+ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", ArgDir: DirOut, IsOptional: false}, TypeSize: 1, BigEndian: false, BitfieldLen: 0}},
+ }},
{structKey{"syz_union0", "", DirIn}, []Type{
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "f0", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}},
&ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "f1", ArgDir: DirIn, IsOptional: false}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "", ArgDir: DirIn, IsOptional: false}, TypeSize: 8, BigEndian: false, BitfieldLen: 0}}, Kind: ArrayRangeLen, RangeBegin: 10, RangeEnd: 10},
@@ -22904,6 +22936,7 @@ var Calls = []*Call{
&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$struct", CallName: "syz_test", Native: false, Args: []Type{&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", ArgDir: DirIn, IsOptional: false}, Type: getStruct(structKey{"syz_struct0", "", DirIn})}}, 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},
&Call{Name: "syz_test$text_x86_64", 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_64}}, &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 5072cff97..af664e4d6 100644
--- a/sys/test.txt
+++ b/sys/test.txt
@@ -95,6 +95,19 @@ syz_align6 {
f1 array[int32]
}
+# Structs
+
+syz_test$struct(a0 ptr[in, syz_struct0])
+
+syz_struct0 {
+ f0 int64
+ f1 syz_struct1
+}
+
+syz_struct1 {
+ f0 int8
+}
+
# Unions
syz_test$union0(a0 ptr[in, syz_union0_struct])