aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2022-06-20 14:05:59 +0200
committerDmitry Vyukov <dvyukov@google.com>2022-06-20 14:22:01 +0200
commitb9406563d876e5550ab7e93cd0d559758b8352ca (patch)
treef6e16bb454424fee11f885a9e340efc5a64aa2fa /pkg/compiler
parent789e5a631f90bd99d7e395c8a5675a98ffb52429 (diff)
prog: support int8 resources in any squashing
We've got the following panic: --- FAIL: TestMutateRandom (7.77s) export_test.go:37: seed=1655724857302243235 --- FAIL: TestMutateRandom/test/32_shmem (0.00s) panic: bad size [recovered] panic: bad size goroutine 562 [running]: panic({0x5ea5a0, 0x8dade8}) /usr/local/go/src/runtime/panic.go:1038 +0x215 github.com/google/syzkaller/prog.(*Target).squashResult(0xc0002a9ba0, 0xc026faa7b0, 0xc026ad1bc8) /syzkaller/gopath/src/github.com/google/syzkaller/prog/any.go:236 +0x2d1 This happens because we try to squash resource of size 1. While we still don't have such resources in real descriptions, we've got one in test descriptions (added in out_overlay change). Support int8 resources in squashing procedure.
Diffstat (limited to 'pkg/compiler')
-rw-r--r--pkg/compiler/types.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/pkg/compiler/types.go b/pkg/compiler/types.go
index fc4acfee3..9e75de18d 100644
--- a/pkg/compiler/types.go
+++ b/pkg/compiler/types.go
@@ -1074,6 +1074,7 @@ type optional[T] [
# prog/any.go knows layout of these types.
ANYUNION [
ANYBLOB array[int8]
+ ANYRES8 ANYRES8
ANYRES16 ANYRES16
ANYRES32 ANYRES32
ANYRES64 ANYRES64
@@ -1087,15 +1088,17 @@ ANYPTRS [
ANYPTR64 ptr64[in, array[ANYUNION]]
]
+resource ANYRES8[int8]: -1, 0
resource ANYRES16[int16]: -1, 0
resource ANYRES32[int32]: -1, 0
resource ANYRES64[int64]: -1, 0
syz_builtin0(a ptr[in, ANYPTRS]) (disabled)
syz_builtin1(a ptr[out, ANYUNION]) (disabled)
-syz_builtin2() ANYRES16 (disabled)
-syz_builtin3() ANYRES32 (disabled)
-syz_builtin4() ANYRES64 (disabled)
+syz_builtin2() ANYRES8 (disabled)
+syz_builtin3() ANYRES16 (disabled)
+syz_builtin4() ANYRES32 (disabled)
+syz_builtin5() ANYRES64 (disabled)
`
func init() {