syzkaller/sys
Dmitry Vyukov a5c1ab05b3 sys/test: add more tests for bitfields
Add tests for issue #1542

The correct results are obtained with the following program:

struct foo {
	unsigned char	f0;
	unsigned int	f1:4;
	unsigned short	f2:4;
};

struct bar {
	char f0;
	struct foo foo;
};

int main() {
	struct bar y;
	memset(&y, 0, sizeof(y));
	y.f0 = 0x12;
	y.foo.f0 = 0x34;
	y.foo.f1 = 0x56;
	y.foo.f2 = 0x78;
	int i;
	for (i = 0; i < sizeof(y); i++)
		printf("%02x", ((unsigned char*)&y)[i]);
	printf("\n");
}
2019-12-13 15:26:10 +01:00
..
akaros pkg/compiler: define fileoff template 2019-11-01 19:14:49 +01:00
android sys/linux: add ion and ashmem devices support 2018-01-09 21:24:28 +01:00
freebsd pkg/compiler: define fileoff template 2019-11-01 19:14:49 +01:00
fuchsia sys/fuchsia: remove deprecated exception APIs 2019-11-14 16:21:01 -08:00
linux executor: fix syz_mount_image 2019-12-10 16:08:35 +01:00
netbsd sys/netbsd: fix the build issues with posix_spawn 2019-12-05 10:06:13 +01:00
openbsd pkg/compiler: define fileoff template 2019-11-01 19:14:49 +01:00
syz-extract sys/syz-extract: extract constants from ELF 2019-12-02 14:36:47 +01:00
syz-sysgen .golangci.yml: add codeanalysis build tag 2019-05-15 11:39:31 +02:00
targets syz/targets: add SyzExecutorCmd flag 2019-12-09 15:13:49 -08:00
test sys/test: add more tests for bitfields 2019-12-13 15:26:10 +01:00
trusty .golangci.yml: add codeanalysis build tag 2019-05-15 11:39:31 +02:00
windows sys/windows/sys.txt: use bool32 instead of int32[0:1] 2019-11-28 10:01:41 +01:00
sys.go dashboard/app: properly handle build failures 2019-03-25 17:00:25 +01:00