aboutsummaryrefslogtreecommitdiffstats
path: root/sys/test
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-04-01 12:46:10 +0200
committerDmitry Vyukov <dvyukov@google.com>2019-04-01 12:46:10 +0200
commit162bd26be4e47d89f305435f7a1917b023138ed6 (patch)
treeb77571bea2cbc1baf320deae9895e1a185670a4b /sys/test
parent3e1cf9ad8a569844caebca4ce63759f15324c422 (diff)
pkg/compiler: make buffer alias to ptr[array[int8]]
Ptr type has special handling of direction (pointers are always input). But buffer type missed this special case all the time. Make buffer less special by aliasing to the ptr[array[int8]] type. As the result buffer type can't have optional trailing "opt" attribute because we don't have such support for templates yet. Change such cases to use ptr type directly. Fixes #1097
Diffstat (limited to 'sys/test')
-rw-r--r--sys/test/gen/64.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/test/gen/64.go b/sys/test/gen/64.go
index 17c535cda..3438bde60 100644
--- a/sys/test/gen/64.go
+++ b/sys/test/gen/64.go
@@ -493,7 +493,7 @@ var structDescs_64 = []*KeyedStruct{
&PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "a3", TypeSize: 8, IsOptional: true}, Type: &StructType{Key: StructKey{Name: "syz_recur_2_0"}}},
}}},
{Key: StructKey{Name: "syz_regression0_struct", Dir: 2}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_regression0_struct", TypeSize: 8, ArgDir: 2}, Fields: []Type{
- &PtrType{TypeCommon: TypeCommon{TypeName: "buffer", FldName: "f0", TypeSize: 8, ArgDir: 2}, Type: &BufferType{TypeCommon: TypeCommon{ArgDir: 1, IsVarlen: true}}},
+ &PtrType{TypeCommon: TypeCommon{TypeName: "ptr", FldName: "f0", TypeSize: 8}, Type: &BufferType{TypeCommon: TypeCommon{TypeName: "array", ArgDir: 1, IsVarlen: true}}},
}}},
{Key: StructKey{Name: "syz_regression1_struct"}, Desc: &StructDesc{TypeCommon: TypeCommon{TypeName: "syz_regression1_struct", TypeSize: 4}, Fields: []Type{
&BufferType{TypeCommon: TypeCommon{TypeName: "array", FldName: "f0", TypeSize: 4}, Kind: 1, RangeBegin: 4, RangeEnd: 4},
@@ -970,4 +970,4 @@ var consts_64 = []ConstValue{
{Name: "SYS_unsupported"},
}
-const revision_64 = "f2ea17f08041673e28f3c64109373c828a27d585"
+const revision_64 = "7b63ffeeaca40cb4b5b8e33cc6c9ead27f7e7741"