diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-12-21 14:51:54 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-12-21 14:53:37 +0100 |
| commit | bfdfc2603c187447d32ecbc8b5a378df53af5734 (patch) | |
| tree | cff7440626d57bf7453634c4de4f8e89fc8fc4a6 /sys/test | |
| parent | bc5869180f69e2ad6c6b823e129e08a8e523d800 (diff) | |
prog: don't fail decoding on non-default out args
We get them in cross-compilation test where an out const
arg has different values in different archs.
No reason to fail deserialization in that case, replace with default
arg instead.
Diffstat (limited to 'sys/test')
| -rw-r--r-- | sys/test/gen/64.go | 5 | ||||
| -rw-r--r-- | sys/test/test.txt | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/sys/test/gen/64.go b/sys/test/gen/64.go index a9bbd5b51..ce4ca5a73 100644 --- a/sys/test/gen/64.go +++ b/sys/test/gen/64.go @@ -1233,6 +1233,9 @@ var syscalls_64 = []*Syscall{ {Name: "test$opt3", CallName: "test", MissingArgs: 5, Args: []Type{ &ProcType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "proc", FldName: "a0", TypeSize: 8, IsOptional: true}}, ValuesStart: 100, ValuesPerProc: 4}, }}, + {Name: "test$out_const", CallName: "test", MissingArgs: 5, Args: []Type{ + &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a1", TypeSize: 8}, Type: &ConstType{IntTypeCommon: IntTypeCommon{TypeCommon: TypeCommon{TypeName: "const", TypeSize: 4, ArgDir: 1}}, Val: 1}}, + }}, {Name: "test$recur0", CallName: "test", MissingArgs: 5, Args: []Type{ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a0", TypeSize: 8}, Type: &StructType{Key: StructKey{Name: "syz_recur_0", Dir: 2}}}, }}, @@ -1337,4 +1340,4 @@ var consts_64 = []ConstValue{ {Name: "SYS_unsupported"}, } -const revision_64 = "854312b077f42679e628a51764359033f376a9d4" +const revision_64 = "fd5870a81478a9208df976f4d8066bbdfa12f8e5" diff --git a/sys/test/test.txt b/sys/test/test.txt index e071ad305..bcbc3462f 100644 --- a/sys/test/test.txt +++ b/sys/test/test.txt @@ -541,6 +541,7 @@ test$excessive_args1() test$excessive_args2(a1 int8) test$excessive_fields1(a1 ptr[in, excessive_fields]) test$type_confusion1(a1 ptr[in, type_confusion]) +test$out_const(a1 ptr[out, const[1, int32]]) # Bitfields |
