mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-27 13:20:34 +00:00
executor: Fix FreeBSD such all platforms use same number of entries
FreeBSD sets the kcov buffer as number of bytes instead of number of entries. This also fixes the mmap() call, which was failing due to inconsistent sizes. The failing was hidden due to wrong error handling.
This commit is contained in:
parent
e8f58194c1
commit
a2af97ddf7
@ -71,7 +71,8 @@ static void cover_open(cover_t* cov)
|
||||
close(fd);
|
||||
|
||||
#if GOOS_freebsd
|
||||
if (ioctl(cov->fd, KIOSETBUFSIZE, kCoverSize))
|
||||
// On FreeBSD provide the size in bytes, not in number of entries.
|
||||
if (ioctl(cov->fd, KIOSETBUFSIZE, kCoverSize * sizeof(uint64_t)))
|
||||
fail("ioctl init trace write failed");
|
||||
#elif GOOS_openbsd
|
||||
unsigned long cover_size = kCoverSize;
|
||||
|
Loading…
Reference in New Issue
Block a user