From e8b49705479678b38c0068e84f1f599af8829184 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 26 Jan 2018 12:34:02 +0100 Subject: pkg/compiler: allow unions with only 1 field Unions with only 1 field are not actually unions, and can always be replaced with the option type. However, they are still useful when there will be more options in future but currently only 1 is described. Alternatives are: - not using union (but then all existing programs will be broken when union is finally introduced) - adding a fake field (ugly and reduces fuzzer efficiency) Allow unions with only 1 field. --- executor/syscalls_test.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'executor') diff --git a/executor/syscalls_test.h b/executor/syscalls_test.h index efbea282e..d81dc0694 100644 --- a/executor/syscalls_test.h +++ b/executor/syscalls_test.h @@ -2,8 +2,8 @@ #if 0 #define GOARCH "32" -#define SYZ_REVISION "bbf8d8ed4354030a23f6bde2600005f3f6c9bb91" -unsigned syscall_count = 83; +#define SYZ_REVISION "8c0396f8a2a8a97239cf4a67f73bb2c345ced9bf" +unsigned syscall_count = 84; call_t syscalls[] = { {"mmap", 0, (syscall_t)mmap}, {"mutate0", 0, (syscall_t)mutate0}, @@ -80,6 +80,7 @@ call_t syscalls[] = { {"syz_test$res0", 0, (syscall_t)syz_test}, {"syz_test$res1", 0, (syscall_t)syz_test}, {"syz_test$struct", 0, (syscall_t)syz_test}, + {"syz_test$syz_union3", 0, (syscall_t)syz_test}, {"syz_test$text_x86_16", 0, (syscall_t)syz_test}, {"syz_test$text_x86_32", 0, (syscall_t)syz_test}, {"syz_test$text_x86_64", 0, (syscall_t)syz_test}, @@ -94,8 +95,8 @@ call_t syscalls[] = { #if 0 #define GOARCH "64" -#define SYZ_REVISION "04defb49ad13778b83e2676461ef16d009d6128d" -unsigned syscall_count = 83; +#define SYZ_REVISION "b95102f518b7d55de0f591cbf5642d978a068932" +unsigned syscall_count = 84; call_t syscalls[] = { {"mmap", 0, (syscall_t)mmap}, {"mutate0", 0, (syscall_t)mutate0}, @@ -172,6 +173,7 @@ call_t syscalls[] = { {"syz_test$res0", 0, (syscall_t)syz_test}, {"syz_test$res1", 0, (syscall_t)syz_test}, {"syz_test$struct", 0, (syscall_t)syz_test}, + {"syz_test$syz_union3", 0, (syscall_t)syz_test}, {"syz_test$text_x86_16", 0, (syscall_t)syz_test}, {"syz_test$text_x86_32", 0, (syscall_t)syz_test}, {"syz_test$text_x86_64", 0, (syscall_t)syz_test}, -- cgit mrf-deployment