diff --git a/executor/defs.h b/executor/defs.h index adf6f014a3a7..a44765eb7bf7 100644 --- a/executor/defs.h +++ b/executor/defs.h @@ -155,7 +155,7 @@ #if GOARCH_32_fork_shmem #define GOARCH "32_fork_shmem" -#define SYZ_REVISION "c1820da1fd3d10373aa40011a453b7479b078078" +#define SYZ_REVISION "5420d1980691671ee0ec084859e05868de853bed" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 4096 @@ -165,7 +165,7 @@ #if GOARCH_32_shmem #define GOARCH "32_shmem" -#define SYZ_REVISION "5c997491edf9b3c7f42853ea0cb2078731b361f2" +#define SYZ_REVISION "d4a26f797d2cfb3f3ffaf6e43a7c9f1f7d59d43b" #define SYZ_EXECUTOR_USES_FORK_SERVER 0 #define SYZ_EXECUTOR_USES_SHMEM 1 #define SYZ_PAGE_SIZE 8192 @@ -175,7 +175,7 @@ #if GOARCH_64 #define GOARCH "64" -#define SYZ_REVISION "9e4533f6dd739b2de6d80ae0eee00e10a2a1a45f" +#define SYZ_REVISION "94ed76558e13abf1f47e9590299293b926462bec" #define SYZ_EXECUTOR_USES_FORK_SERVER 0 #define SYZ_EXECUTOR_USES_SHMEM 0 #define SYZ_PAGE_SIZE 4096 @@ -185,7 +185,7 @@ #if GOARCH_64_fork #define GOARCH "64_fork" -#define SYZ_REVISION "7467ae0af7e161054ba46c3c4e2c2a2a9c82ba7f" +#define SYZ_REVISION "07a04161e736227d55b28532246146168743d177" #define SYZ_EXECUTOR_USES_FORK_SERVER 1 #define SYZ_EXECUTOR_USES_SHMEM 0 #define SYZ_PAGE_SIZE 8192 diff --git a/sys/test/exec.txt b/sys/test/exec.txt index 2545fa7ed542..aaf8919ebf4b 100644 --- a/sys/test/exec.txt +++ b/sys/test/exec.txt @@ -15,6 +15,12 @@ compare_data [ bf1 syz_bf_struct1 bf2 syz_bf_struct2 bf3 syz_bf_struct3 + bf4 syz_bf_align[syz_bf_struct4] + bf5 syz_bf_align[syz_bf_struct5] + bf6 syz_bf_align[syz_bf_struct6] + bf7 syz_bf_align[syz_bf_struct7] + bf8 syz_bf_align[syz_bf_struct8] + bf9 syz_bf_align[syz_bf_struct9] str string blob array[int8] arr16be array[int16be] @@ -27,3 +33,42 @@ align0 { f3 int16 f4 int64 } + +syz_bf_struct4 { + f0 int8 + f1 int32:4 + f2 int8 +} + +syz_bf_struct5 { + f0 int8 + f1 int32:4 +} + +syz_bf_struct6 { + f0 int8 + f1 int16:4 + f2 int8 +} + +syz_bf_struct7 { + f0 int8 + f1 int16:4 +} + +syz_bf_struct8 { + f0 int8 + f1 int32:4 + f2 int16:4 +} + +syz_bf_struct9 { + f0 int8 + f1 int16:4 + f2 int16:4 +} + +type syz_bf_align[T] { + f0 int8 + f1 T +} diff --git a/sys/test/gen/32_fork_shmem.go b/sys/test/gen/32_fork_shmem.go index 6b9d5f43cae4..97e8dc96a38b 100644 --- a/sys/test/gen/32_fork_shmem.go +++ b/sys/test/gen/32_fork_shmem.go @@ -30,10 +30,46 @@ var structDescs_32_fork_shmem = []*KeyedStruct{ &StructType{Key: StructKey{Name: "syz_bf_struct1"}, FldName: "bf1"}, &StructType{Key: StructKey{Name: "syz_bf_struct2"}, FldName: "bf2"}, &StructType{Key: StructKey{Name: "syz_bf_struct3"}, FldName: "bf3"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct4]"}, FldName: "bf4"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct5]"}, FldName: "bf5"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct6]"}, FldName: "bf6"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct7]"}, FldName: "bf7"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct8]"}, FldName: "bf8"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct9]"}, FldName: "bf9"}, &BufferType{TypeCommon: TypeCommon{TypeName: "string", FldName: "str", IsVarlen: true}, Kind: 2}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "blob", IsVarlen: true}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "arr16be", IsVarlen: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", TypeSize: 2}, ArgFormat: 1}}}, }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct4]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct4]", TypeSize: 16}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct4"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct5]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct5]", TypeSize: 12}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct5"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct6]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct6]", TypeSize: 8}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct6"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct7]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct7]", TypeSize: 6}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct7"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct8]", TypeSize: 16}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct8"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct9]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct9]", TypeSize: 6}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct9"}, FldName: "f1"}, + }}}, {Key: StructKey{Name: "syz_bf_struct0"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct0", TypeSize: 32}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "syz_bf_flags", FldName: "f0", TypeSize: 2}, BitfieldLen: 10}, Vals: []uint64{0, 1, 2}, BitMask: true}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 6}}, IsPad: true}, @@ -71,6 +107,43 @@ var structDescs_32_fork_shmem = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64be", FldName: "f3", TypeSize: 8}, ArgFormat: 1, BitfieldOff: 24, BitfieldLen: 20, BitfieldMdl: true}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64be", FldName: "f4", TypeSize: 8}, ArgFormat: 1, BitfieldOff: 44, BitfieldLen: 16}}, }}}, + {Key: StructKey{Name: "syz_bf_struct4"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct4", TypeSize: 12}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "f1", TypeSize: 4}, BitfieldLen: 4}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f2", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + }}}, + {Key: StructKey{Name: "syz_bf_struct5"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct5", TypeSize: 8}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "f1", TypeSize: 4}, BitfieldLen: 4}}, + }}}, + {Key: StructKey{Name: "syz_bf_struct6"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct6", TypeSize: 6}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f1", TypeSize: 2}, BitfieldLen: 4}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f2", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + }}}, + {Key: StructKey{Name: "syz_bf_struct7"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct7", TypeSize: 4}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f1", TypeSize: 2}, BitfieldLen: 4}}, + }}}, + {Key: StructKey{Name: "syz_bf_struct8"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct8", TypeSize: 12}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "f1", TypeSize: 4}, BitfieldLen: 4}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f2", TypeSize: 2}, BitfieldLen: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true}, + }}}, + {Key: StructKey{Name: "syz_bf_struct9"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct9", TypeSize: 4}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f1", TypeSize: 2}, BitfieldLen: 4, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f2", TypeSize: 2}, BitfieldOff: 4, BitfieldLen: 4}}, + }}}, } var syscalls_32_fork_shmem = []*Syscall{ @@ -120,4 +193,4 @@ var consts_32_fork_shmem = []ConstValue{ {Name: "ONLY_32BITS_CONST", Value: 1}, } -const revision_32_fork_shmem = "c1820da1fd3d10373aa40011a453b7479b078078" +const revision_32_fork_shmem = "5420d1980691671ee0ec084859e05868de853bed" diff --git a/sys/test/gen/32_shmem.go b/sys/test/gen/32_shmem.go index 71839f4a5755..c992450cc12d 100644 --- a/sys/test/gen/32_shmem.go +++ b/sys/test/gen/32_shmem.go @@ -30,10 +30,46 @@ var structDescs_32_shmem = []*KeyedStruct{ &StructType{Key: StructKey{Name: "syz_bf_struct1"}, FldName: "bf1"}, &StructType{Key: StructKey{Name: "syz_bf_struct2"}, FldName: "bf2"}, &StructType{Key: StructKey{Name: "syz_bf_struct3"}, FldName: "bf3"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct4]"}, FldName: "bf4"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct5]"}, FldName: "bf5"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct6]"}, FldName: "bf6"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct7]"}, FldName: "bf7"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct8]"}, FldName: "bf8"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct9]"}, FldName: "bf9"}, &BufferType{TypeCommon: TypeCommon{TypeName: "string", FldName: "str", IsVarlen: true}, Kind: 2}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "blob", IsVarlen: true}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "arr16be", IsVarlen: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", TypeSize: 2}, ArgFormat: 1}}}, }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct4]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct4]", TypeSize: 16}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct4"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct5]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct5]", TypeSize: 12}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct5"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct6]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct6]", TypeSize: 8}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct6"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct7]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct7]", TypeSize: 6}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct7"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct8]", TypeSize: 16}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct8"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct9]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct9]", TypeSize: 6}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct9"}, FldName: "f1"}, + }}}, {Key: StructKey{Name: "syz_bf_struct0"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct0", TypeSize: 32}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "syz_bf_flags", FldName: "f0", TypeSize: 2}, BitfieldLen: 10}, Vals: []uint64{0, 1, 2}, BitMask: true}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 6}}, IsPad: true}, @@ -71,6 +107,43 @@ var structDescs_32_shmem = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64be", FldName: "f3", TypeSize: 8}, ArgFormat: 1, BitfieldOff: 24, BitfieldLen: 20, BitfieldMdl: true}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64be", FldName: "f4", TypeSize: 8}, ArgFormat: 1, BitfieldOff: 44, BitfieldLen: 16}}, }}}, + {Key: StructKey{Name: "syz_bf_struct4"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct4", TypeSize: 12}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "f1", TypeSize: 4}, BitfieldLen: 4}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f2", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + }}}, + {Key: StructKey{Name: "syz_bf_struct5"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct5", TypeSize: 8}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "f1", TypeSize: 4}, BitfieldLen: 4}}, + }}}, + {Key: StructKey{Name: "syz_bf_struct6"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct6", TypeSize: 6}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f1", TypeSize: 2}, BitfieldLen: 4}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f2", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + }}}, + {Key: StructKey{Name: "syz_bf_struct7"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct7", TypeSize: 4}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f1", TypeSize: 2}, BitfieldLen: 4}}, + }}}, + {Key: StructKey{Name: "syz_bf_struct8"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct8", TypeSize: 12}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "f1", TypeSize: 4}, BitfieldLen: 4}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f2", TypeSize: 2}, BitfieldLen: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true}, + }}}, + {Key: StructKey{Name: "syz_bf_struct9"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct9", TypeSize: 4}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f1", TypeSize: 2}, BitfieldLen: 4, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f2", TypeSize: 2}, BitfieldOff: 4, BitfieldLen: 4}}, + }}}, } var syscalls_32_shmem = []*Syscall{ @@ -120,4 +193,4 @@ var consts_32_shmem = []ConstValue{ {Name: "ONLY_32BITS_CONST", Value: 1}, } -const revision_32_shmem = "5c997491edf9b3c7f42853ea0cb2078731b361f2" +const revision_32_shmem = "d4a26f797d2cfb3f3ffaf6e43a7c9f1f7d59d43b" diff --git a/sys/test/gen/64.go b/sys/test/gen/64.go index ef00a8713bea..68902c5ebcad 100644 --- a/sys/test/gen/64.go +++ b/sys/test/gen/64.go @@ -77,6 +77,12 @@ var structDescs_64 = []*KeyedStruct{ &StructType{Key: StructKey{Name: "syz_bf_struct1"}, FldName: "bf1"}, &StructType{Key: StructKey{Name: "syz_bf_struct2"}, FldName: "bf2"}, &StructType{Key: StructKey{Name: "syz_bf_struct3"}, FldName: "bf3"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct4]"}, FldName: "bf4"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct5]"}, FldName: "bf5"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct6]"}, FldName: "bf6"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct7]"}, FldName: "bf7"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct8]"}, FldName: "bf8"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct9]"}, FldName: "bf9"}, &BufferType{TypeCommon: TypeCommon{TypeName: "string", FldName: "str", IsVarlen: true}, Kind: 2}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "blob", IsVarlen: true}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "arr16be", IsVarlen: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", TypeSize: 2}, ArgFormat: 1}}}, @@ -285,6 +291,36 @@ var structDescs_64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f0", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64", FldName: "f1", TypeSize: 8}}}, }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct4]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct4]", TypeSize: 16}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct4"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct5]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct5]", TypeSize: 12}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct5"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct6]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct6]", TypeSize: 8}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct6"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct7]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct7]", TypeSize: 6}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct7"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct8]", TypeSize: 16}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct8"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct9]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct9]", TypeSize: 6}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct9"}, FldName: "f1"}, + }}}, {Key: StructKey{Name: "syz_bf_struct0"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct0", TypeSize: 32}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "syz_bf_flags", FldName: "f0", TypeSize: 2}, BitfieldLen: 10}, Vals: []uint64{0, 1, 2}, BitMask: true}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 6}}, IsPad: true}, @@ -322,6 +358,43 @@ var structDescs_64 = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64be", FldName: "f3", TypeSize: 8}, ArgFormat: 1, BitfieldOff: 24, BitfieldLen: 20, BitfieldMdl: true}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64be", FldName: "f4", TypeSize: 8}, ArgFormat: 1, BitfieldOff: 44, BitfieldLen: 16}}, }}}, + {Key: StructKey{Name: "syz_bf_struct4"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct4", TypeSize: 12}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "f1", TypeSize: 4}, BitfieldLen: 4}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f2", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + }}}, + {Key: StructKey{Name: "syz_bf_struct5"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct5", TypeSize: 8}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "f1", TypeSize: 4}, BitfieldLen: 4}}, + }}}, + {Key: StructKey{Name: "syz_bf_struct6"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct6", TypeSize: 6}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f1", TypeSize: 2}, BitfieldLen: 4}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f2", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + }}}, + {Key: StructKey{Name: "syz_bf_struct7"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct7", TypeSize: 4}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f1", TypeSize: 2}, BitfieldLen: 4}}, + }}}, + {Key: StructKey{Name: "syz_bf_struct8"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct8", TypeSize: 12}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "f1", TypeSize: 4}, BitfieldLen: 4}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f2", TypeSize: 2}, BitfieldLen: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true}, + }}}, + {Key: StructKey{Name: "syz_bf_struct9"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct9", TypeSize: 4}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f1", TypeSize: 2}, BitfieldLen: 4, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f2", TypeSize: 2}, BitfieldOff: 4, BitfieldLen: 4}}, + }}}, {Key: StructKey{Name: "syz_csum_encode"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_csum_encode", IsVarlen: true}, Fields: []Type{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f0", TypeSize: 2}}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "f1", TypeSize: 2}, ArgFormat: 1}}, @@ -1089,4 +1162,4 @@ var consts_64 = []ConstValue{ {Name: "SYS_unsupported"}, } -const revision_64 = "9e4533f6dd739b2de6d80ae0eee00e10a2a1a45f" +const revision_64 = "94ed76558e13abf1f47e9590299293b926462bec" diff --git a/sys/test/gen/64_fork.go b/sys/test/gen/64_fork.go index 6e1b38b7ea34..b37c57cd587b 100644 --- a/sys/test/gen/64_fork.go +++ b/sys/test/gen/64_fork.go @@ -30,10 +30,46 @@ var structDescs_64_fork = []*KeyedStruct{ &StructType{Key: StructKey{Name: "syz_bf_struct1"}, FldName: "bf1"}, &StructType{Key: StructKey{Name: "syz_bf_struct2"}, FldName: "bf2"}, &StructType{Key: StructKey{Name: "syz_bf_struct3"}, FldName: "bf3"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct4]"}, FldName: "bf4"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct5]"}, FldName: "bf5"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct6]"}, FldName: "bf6"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct7]"}, FldName: "bf7"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct8]"}, FldName: "bf8"}, + &StructType{Key: StructKey{Name: "syz_bf_align[syz_bf_struct9]"}, FldName: "bf9"}, &BufferType{TypeCommon: TypeCommon{TypeName: "string", FldName: "str", IsVarlen: true}, Kind: 2}, &BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "blob", IsVarlen: true}}, &ArrayType{TypeCommon: TypeCommon{TypeName: "array", FldName: "arr16be", IsVarlen: true}, Type: &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", TypeSize: 2}, ArgFormat: 1}}}, }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct4]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct4]", TypeSize: 16}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct4"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct5]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct5]", TypeSize: 12}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct5"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct6]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct6]", TypeSize: 8}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct6"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct7]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct7]", TypeSize: 6}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct7"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct8]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct8]", TypeSize: 16}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct8"}, FldName: "f1"}, + }}}, + {Key: StructKey{Name: "syz_bf_align[syz_bf_struct9]"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_align[syz_bf_struct9]", TypeSize: 6}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &StructType{Key: StructKey{Name: "syz_bf_struct9"}, FldName: "f1"}, + }}}, {Key: StructKey{Name: "syz_bf_struct0"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct0", TypeSize: 32}, Fields: []Type{ &FlagsType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "syz_bf_flags", FldName: "f0", TypeSize: 2}, BitfieldLen: 10}, Vals: []uint64{0, 1, 2}, BitMask: true}, &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 6}}, IsPad: true}, @@ -71,6 +107,43 @@ var structDescs_64_fork = []*KeyedStruct{ &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64be", FldName: "f3", TypeSize: 8}, ArgFormat: 1, BitfieldOff: 24, BitfieldLen: 20, BitfieldMdl: true}}, &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int64be", FldName: "f4", TypeSize: 8}, ArgFormat: 1, BitfieldOff: 44, BitfieldLen: 16}}, }}}, + {Key: StructKey{Name: "syz_bf_struct4"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct4", TypeSize: 12}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "f1", TypeSize: 4}, BitfieldLen: 4}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f2", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + }}}, + {Key: StructKey{Name: "syz_bf_struct5"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct5", TypeSize: 8}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "f1", TypeSize: 4}, BitfieldLen: 4}}, + }}}, + {Key: StructKey{Name: "syz_bf_struct6"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct6", TypeSize: 6}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f1", TypeSize: 2}, BitfieldLen: 4}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f2", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + }}}, + {Key: StructKey{Name: "syz_bf_struct7"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct7", TypeSize: 4}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f1", TypeSize: 2}, BitfieldLen: 4}}, + }}}, + {Key: StructKey{Name: "syz_bf_struct8"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct8", TypeSize: 12}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 3}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "f1", TypeSize: 4}, BitfieldLen: 4}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f2", TypeSize: 2}, BitfieldLen: 4}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 2}}, IsPad: true}, + }}}, + {Key: StructKey{Name: "syz_bf_struct9"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_bf_struct9", TypeSize: 4}, Fields: []Type{ + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int8", FldName: "f0", TypeSize: 1}}}, + &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "pad", TypeSize: 1}}, IsPad: true}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f1", TypeSize: 2}, BitfieldLen: 4, BitfieldMdl: true}}, + &IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16", FldName: "f2", TypeSize: 2}, BitfieldOff: 4, BitfieldLen: 4}}, + }}}, } var syscalls_64_fork = []*Syscall{ @@ -119,4 +192,4 @@ var consts_64_fork = []ConstValue{ {Name: "IPPROTO_UDP", Value: 17}, } -const revision_64_fork = "7467ae0af7e161054ba46c3c4e2c2a2a9c82ba7f" +const revision_64_fork = "07a04161e736227d55b28532246146168743d177" diff --git a/sys/test/test/bf2 b/sys/test/test/bf2 new file mode 100644 index 000000000000..6eed21a28f9c --- /dev/null +++ b/sys/test/test/bf2 @@ -0,0 +1,14 @@ +# TODO: all these results are wrong, correct answers are: +# "1200000034067800" +# "1200000034060000" +# "120034067800" +# "12003406" +# "1200000034860000" +# "12003486" + +syz_compare(&AUTO="12000000340000000600000078000000", AUTO, &AUTO=@bf4={0x012, {0x34, 0x56, 0x78}}, AUTO) +syz_compare(&AUTO="120000003400000006000000", AUTO, &AUTO=@bf5={0x012, {0x34, 0x56}}, AUTO) +syz_compare(&AUTO="1200340006007800", AUTO, &AUTO=@bf6={0x012, {0x34, 0x56, 0x78}}, AUTO) +syz_compare(&AUTO="120034000600", AUTO, &AUTO=@bf7={0x012, {0x34, 0x56}}, AUTO) +syz_compare(&AUTO="12000000340000000600000008000000", AUTO, &AUTO=@bf8={0x012, {0x34, 0x56, 0x78}}, AUTO) +syz_compare(&AUTO="120034008600", AUTO, &AUTO=@bf9={0x012, {0x34, 0x56, 0x78}}, AUTO)