aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorBaozeng Ding <baozeng.dbz@alibaba-inc.com>2016-08-08 21:32:48 +0800
committerBaozeng Ding <baozeng.dbz@alibaba-inc.com>2016-08-10 13:43:15 +0800
commit7db2edcb3364ef5415e992a18c02c73bba6cdd29 (patch)
treecec8efa9f607da32d04b57f31da78b61e9e52ac4 /sys
parent39350d876d19ab0937511d969844fb9a559dfd8d (diff)
sys/sysgen/prog: support ranged int
This commit supports inclusive ranged int, like foo int32[-10~10], which will generate random integer between -10 and 10. In future we will support more than one range, like int32[0, -5~10, 50, 100~200]
Diffstat (limited to 'sys')
-rw-r--r--sys/decl.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/decl.go b/sys/decl.go
index 8115a1d6c..4c85b9b53 100644
--- a/sys/decl.go
+++ b/sys/decl.go
@@ -1,4 +1,4 @@
-// Copyright 2015 syzkaller project authors. All rights reserved.
+// Copyright 2015/2016 syzkaller project authors. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
package sys
@@ -385,12 +385,15 @@ const (
IntSignalno
IntInaddr
IntInport
+ IntRange
)
type IntType struct {
TypeCommon
TypeSize uintptr
Kind IntKind
+ RangeBegin int64
+ RangeEnd int64
}
func (t IntType) Size() uintptr {