tools/syz-trace2syz/proggen/proggen_test.go: test ipv6 address conversion

This commit is contained in:
Shankara Pailoor 2019-01-08 08:17:41 -08:00 committed by Dmitry Vyukov
parent f9ccea26eb
commit db9b657915
9 changed files with 55 additions and 32 deletions

View File

@ -60,7 +60,7 @@
#if GOARCH_386
#define GOARCH "386"
#define SYZ_REVISION "65cd8b9bcd5fbf97b22da0164c90dc2727d0e8ec"
#define SYZ_REVISION "48662e35248c48c4603b1336b18c6af86b066588"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -70,7 +70,7 @@
#if GOARCH_amd64
#define GOARCH "amd64"
#define SYZ_REVISION "aafa4b181846dfe8004a332f2b96df445302f306"
#define SYZ_REVISION "29c6cd9e5fb8dfc9c2c68b74e20dac6056157812"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -80,7 +80,7 @@
#if GOARCH_arm
#define GOARCH "arm"
#define SYZ_REVISION "004e9334bed4096aa64ffcd026b851c4cf701bb1"
#define SYZ_REVISION "5cae71ad913cf62e2c1ad54d2252dc27a9197f0c"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -90,7 +90,7 @@
#if GOARCH_arm64
#define GOARCH "arm64"
#define SYZ_REVISION "21c08b07f76fe332864139a874a2ff417b7875f8"
#define SYZ_REVISION "e40e275642a844c787d5af9e28e82d33993bc1ec"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096
@ -100,7 +100,7 @@
#if GOARCH_ppc64le
#define GOARCH "ppc64le"
#define SYZ_REVISION "45226d0873c554b3fc45a2a5fa466624dba47347"
#define SYZ_REVISION "1ea8b686a9a5ac23be58de48a99586ad36bc6c46"
#define SYZ_EXECUTOR_USES_FORK_SERVER 1
#define SYZ_EXECUTOR_USES_SHMEM 1
#define SYZ_PAGE_SIZE 4096

View File

@ -19595,21 +19595,21 @@ var structDescs_386 = []*KeyedStruct{
{Key: StructKey{Name: "sockaddr_in6"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 28}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2}}, Val: 10},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "port", TypeSize: 2}, ArgFormat: 1}, Kind: 2, RangeBegin: 20000, RangeEnd: 20004},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "flow", TypeSize: 4}, ArgFormat: 1}},
&UnionType{Key: StructKey{Name: "ipv6_addr"}, FldName: "addr"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4}}},
}}},
{Key: StructKey{Name: "sockaddr_in6", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 28, ArgDir: 1}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2, ArgDir: 1}}, Val: 10},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "port", TypeSize: 2, ArgDir: 1}, ArgFormat: 1}, Kind: 2, RangeBegin: 20000, RangeEnd: 20004},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4, ArgDir: 1}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "flow", TypeSize: 4, ArgDir: 1}, ArgFormat: 1}},
&UnionType{Key: StructKey{Name: "ipv6_addr", Dir: 1}, FldName: "addr"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4, ArgDir: 1}}},
}}},
{Key: StructKey{Name: "sockaddr_in6", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 28, ArgDir: 2}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2, ArgDir: 2}}, Val: 10},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "port", TypeSize: 2, ArgDir: 2}, ArgFormat: 1}, Kind: 2, RangeBegin: 20000, RangeEnd: 20004},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4, ArgDir: 2}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "flow", TypeSize: 4, ArgDir: 2}, ArgFormat: 1}},
&UnionType{Key: StructKey{Name: "ipv6_addr", Dir: 2}, FldName: "addr"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4, ArgDir: 2}}},
}}},
@ -46328,4 +46328,4 @@ var consts_386 = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}
const revision_386 = "65cd8b9bcd5fbf97b22da0164c90dc2727d0e8ec"
const revision_386 = "48662e35248c48c4603b1336b18c6af86b066588"

View File

@ -19964,21 +19964,21 @@ var structDescs_amd64 = []*KeyedStruct{
{Key: StructKey{Name: "sockaddr_in6"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 28}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2}}, Val: 10},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "port", TypeSize: 2}, ArgFormat: 1}, Kind: 2, RangeBegin: 20000, RangeEnd: 20004},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "flow", TypeSize: 4}, ArgFormat: 1}},
&UnionType{Key: StructKey{Name: "ipv6_addr"}, FldName: "addr"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4}}},
}}},
{Key: StructKey{Name: "sockaddr_in6", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 28, ArgDir: 1}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2, ArgDir: 1}}, Val: 10},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "port", TypeSize: 2, ArgDir: 1}, ArgFormat: 1}, Kind: 2, RangeBegin: 20000, RangeEnd: 20004},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4, ArgDir: 1}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "flow", TypeSize: 4, ArgDir: 1}, ArgFormat: 1}},
&UnionType{Key: StructKey{Name: "ipv6_addr", Dir: 1}, FldName: "addr"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4, ArgDir: 1}}},
}}},
{Key: StructKey{Name: "sockaddr_in6", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 28, ArgDir: 2}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2, ArgDir: 2}}, Val: 10},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "port", TypeSize: 2, ArgDir: 2}, ArgFormat: 1}, Kind: 2, RangeBegin: 20000, RangeEnd: 20004},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4, ArgDir: 2}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "flow", TypeSize: 4, ArgDir: 2}, ArgFormat: 1}},
&UnionType{Key: StructKey{Name: "ipv6_addr", Dir: 2}, FldName: "addr"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4, ArgDir: 2}}},
}}},
@ -47118,4 +47118,4 @@ var consts_amd64 = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}
const revision_amd64 = "aafa4b181846dfe8004a332f2b96df445302f306"
const revision_amd64 = "29c6cd9e5fb8dfc9c2c68b74e20dac6056157812"

View File

@ -19476,21 +19476,21 @@ var structDescs_arm = []*KeyedStruct{
{Key: StructKey{Name: "sockaddr_in6"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 28}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2}}, Val: 10},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "port", TypeSize: 2}, ArgFormat: 1}, Kind: 2, RangeBegin: 20000, RangeEnd: 20004},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "flow", TypeSize: 4}, ArgFormat: 1}},
&UnionType{Key: StructKey{Name: "ipv6_addr"}, FldName: "addr"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4}}},
}}},
{Key: StructKey{Name: "sockaddr_in6", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 28, ArgDir: 1}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2, ArgDir: 1}}, Val: 10},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "port", TypeSize: 2, ArgDir: 1}, ArgFormat: 1}, Kind: 2, RangeBegin: 20000, RangeEnd: 20004},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4, ArgDir: 1}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "flow", TypeSize: 4, ArgDir: 1}, ArgFormat: 1}},
&UnionType{Key: StructKey{Name: "ipv6_addr", Dir: 1}, FldName: "addr"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4, ArgDir: 1}}},
}}},
{Key: StructKey{Name: "sockaddr_in6", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 28, ArgDir: 2}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2, ArgDir: 2}}, Val: 10},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "port", TypeSize: 2, ArgDir: 2}, ArgFormat: 1}, Kind: 2, RangeBegin: 20000, RangeEnd: 20004},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4, ArgDir: 2}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "flow", TypeSize: 4, ArgDir: 2}, ArgFormat: 1}},
&UnionType{Key: StructKey{Name: "ipv6_addr", Dir: 2}, FldName: "addr"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4, ArgDir: 2}}},
}}},
@ -46167,4 +46167,4 @@ var consts_arm = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}
const revision_arm = "004e9334bed4096aa64ffcd026b851c4cf701bb1"
const revision_arm = "5cae71ad913cf62e2c1ad54d2252dc27a9197f0c"

View File

@ -19781,21 +19781,21 @@ var structDescs_arm64 = []*KeyedStruct{
{Key: StructKey{Name: "sockaddr_in6"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 28}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2}}, Val: 10},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "port", TypeSize: 2}, ArgFormat: 1}, Kind: 2, RangeBegin: 20000, RangeEnd: 20004},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "flow", TypeSize: 4}, ArgFormat: 1}},
&UnionType{Key: StructKey{Name: "ipv6_addr"}, FldName: "addr"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4}}},
}}},
{Key: StructKey{Name: "sockaddr_in6", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 28, ArgDir: 1}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2, ArgDir: 1}}, Val: 10},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "port", TypeSize: 2, ArgDir: 1}, ArgFormat: 1}, Kind: 2, RangeBegin: 20000, RangeEnd: 20004},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4, ArgDir: 1}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "flow", TypeSize: 4, ArgDir: 1}, ArgFormat: 1}},
&UnionType{Key: StructKey{Name: "ipv6_addr", Dir: 1}, FldName: "addr"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4, ArgDir: 1}}},
}}},
{Key: StructKey{Name: "sockaddr_in6", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 28, ArgDir: 2}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2, ArgDir: 2}}, Val: 10},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "port", TypeSize: 2, ArgDir: 2}, ArgFormat: 1}, Kind: 2, RangeBegin: 20000, RangeEnd: 20004},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4, ArgDir: 2}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "flow", TypeSize: 4, ArgDir: 2}, ArgFormat: 1}},
&UnionType{Key: StructKey{Name: "ipv6_addr", Dir: 2}, FldName: "addr"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4, ArgDir: 2}}},
}}},
@ -46476,4 +46476,4 @@ var consts_arm64 = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}
const revision_arm64 = "21c08b07f76fe332864139a874a2ff417b7875f8"
const revision_arm64 = "e40e275642a844c787d5af9e28e82d33993bc1ec"

View File

@ -19663,21 +19663,21 @@ var structDescs_ppc64le = []*KeyedStruct{
{Key: StructKey{Name: "sockaddr_in6"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 28}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2}}, Val: 10},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "port", TypeSize: 2}, ArgFormat: 1}, Kind: 2, RangeBegin: 20000, RangeEnd: 20004},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "flow", TypeSize: 4}, ArgFormat: 1}},
&UnionType{Key: StructKey{Name: "ipv6_addr"}, FldName: "addr"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4}}},
}}},
{Key: StructKey{Name: "sockaddr_in6", Dir: 1}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 28, ArgDir: 1}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2, ArgDir: 1}}, Val: 10},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "port", TypeSize: 2, ArgDir: 1}, ArgFormat: 1}, Kind: 2, RangeBegin: 20000, RangeEnd: 20004},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4, ArgDir: 1}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "flow", TypeSize: 4, ArgDir: 1}, ArgFormat: 1}},
&UnionType{Key: StructKey{Name: "ipv6_addr", Dir: 1}, FldName: "addr"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4, ArgDir: 1}}},
}}},
{Key: StructKey{Name: "sockaddr_in6", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "sockaddr_in6", TypeSize: 28, ArgDir: 2}, Fields: []Type{
&ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", FldName: "family", TypeSize: 2, ArgDir: 2}}, Val: 10},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int16be", FldName: "port", TypeSize: 2, ArgDir: 2}, ArgFormat: 1}, Kind: 2, RangeBegin: 20000, RangeEnd: 20004},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "flow", TypeSize: 4, ArgDir: 2}}},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32be", FldName: "flow", TypeSize: 4, ArgDir: 2}, ArgFormat: 1}},
&UnionType{Key: StructKey{Name: "ipv6_addr", Dir: 2}, FldName: "addr"},
&IntType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "int32", FldName: "scope", TypeSize: 4, ArgDir: 2}}},
}}},
@ -43834,4 +43834,4 @@ var consts_ppc64le = []ConstValue{
{Name: "bpf_insn_load_imm_dw", Value: 24},
}
const revision_ppc64le = "45226d0873c554b3fc45a2a5fa466624dba47347"
const revision_ppc64le = "1ea8b686a9a5ac23be58de48a99586ad36bc6c46"

View File

@ -16,7 +16,7 @@ resource sock_in6[sock]
sockaddr_in6 {
family const[AF_INET6, int16]
port sock_port
flow int32
flow int32be
addr ipv6_addr
scope int32
}

View File

@ -339,19 +339,24 @@ func (ctx *context) genConst(syzType prog.Type, traceType parser.IrType) prog.Ar
// it is a good chance that we are decoding one of those fields. If it isn't, then most likely
// we have an error i.e. a sockaddr_un struct passed to a connect call with an inet file descriptor
var val uint64
toUint64 := binary.LittleEndian.Uint64
toUint32 := binary.LittleEndian.Uint32
toUint16 := binary.LittleEndian.Uint16
if syzType.Format() == prog.FormatBigEndian {
toUint64 = binary.BigEndian.Uint64
toUint32 = binary.BigEndian.Uint32
toUint16 = binary.BigEndian.Uint16
}
switch len(a.Val) {
case 8:
val = uint64(binary.BigEndian.Uint64([]byte(a.Val)))
val = toUint64([]byte(a.Val))
case 4:
// int
val = uint64(binary.BigEndian.Uint32([]byte(a.Val)))
val = uint64(toUint32([]byte(a.Val)))
case 2:
// short
val = uint64(binary.BigEndian.Uint16([]byte(a.Val)))
val = uint64(toUint16([]byte(a.Val)))
case 1:
val = uint64(a.Val[0])
default:
// The call almost certainly returned an errno
return syzType.DefaultArg()
}
return prog.MakeConstArg(syzType, val)

View File

@ -190,6 +190,24 @@ connect(3, {sa_family=0x2, sin_port="\x1f\x90", sin_addr="\x00"}, 16) = -1
`, `
r0 = socket$inet_tcp(0x2, 0x1, 0x0)
connect$inet(r0, &(0x7f0000000000)={0x2, 0x1f90}, 0x10)
`,
}, {`
connect(-1, {sa_family=0xa, sin6_port="\x30\x39",` +
`sin6_addr="\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01",` +
` sin6_flowinfo="\x07\x5b\xcd\x7a", sin6_scope_id=4207869677}, 28) = -1
`, `
connect(0xffffffffffffffff, &(0x7f0000000000)=` +
`@in6={0xa, 0x3039, 0x75bcd7a, @rand_addr="00000000000000000000000000000001",` +
` 0xfacefeed}, 0x80)
`,
}, {`
connect(-1, {sa_family=0xa, sin6_port="\x30\x39",` +
` sin6_addr="\x00\x12\x00\x34\x00\x56\x00\x78\x00\x90\x00\xab\x00\xcd\x00\xef",` +
` sin6_flowinfo="\x07\x5b\xcd\x7a", sin6_scope_id=4207869677}, 28) = -1
`, `
connect(0xffffffffffffffff, &(0x7f0000000000)=` +
`@in6={0xa, 0x3039, 0x75bcd7a, @rand_addr="0012003400560078009000ab00cd00ef",` +
` 0xfacefeed}, 0x80)
`,
},
}