aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-09-29 12:21:26 +0200
committerDmitry Vyukov <dvyukov@google.com>2016-09-29 12:21:26 +0200
commitbf21057e7c36c72c1b46aa71bea8dc48509d4c40 (patch)
tree81c7c3e87305b00500af94b11ebabf5816d9b824 /sys
parent11a690d2752b590cadebe982ae4b66bf5c0cccef (diff)
prog: add a test for union layout
This is a retrospect tests for the union bug fixed in: 91eb1b922fd95bfaa5d8b0aad16902a73f3fe3d1
Diffstat (limited to 'sys')
-rw-r--r--sys/test.txt19
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/test.txt b/sys/test.txt
index 67e338a83..2fc41e677 100644
--- a/sys/test.txt
+++ b/sys/test.txt
@@ -14,12 +14,27 @@ syz_test$opt1(a0 ptr[in, intptr, opt])
syz_test$opt2(a0 vma[opt])
# Struct alignment.
-syz_test$align0(a0 ptr[in, align0])
+syz_test$align0(a0 ptr[in, syz_align0])
-align0 {
+syz_align0 {
f0 int16
f1 int32
f2 int8
f3 int16
f4 int64
}
+
+# Unions.
+
+syz_test$union0(a0 ptr[in, syz_union_struct])
+
+syz_union_struct {
+ f int64
+ u syz_union0
+}
+
+syz_union0 [
+ f0 int64
+ f1 array[int64, 10]
+ f2 int8
+]