aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor_fuchsia.cc
Commit message (Collapse)AuthorAgeFilesLines
* executor: overhaulDmitry Vyukov2018-07-241-95/+0
| | | | | | | | | | | | | | | | | Make as much code as possible shared between all OSes. In particular main is now common across all OSes. Make more code shared between executor and csource (in particular, loop function and threaded execution logic). Also make loop and threaded logic shared across all OSes. Make more posix/unix code shared across OSes (e.g. signal handling, pthread creation, etc). Plus other changes along similar lines. Also support test OS in executor (based on portable posix) and add 4 arches that cover all execution modes (fork server/no fork server, shmem/no shmem). This change paves way for testing of executor code and allows to preserve consistency across OSes and executor/csource.
* executor: fix zx_log_read return valueDmitry Vyukov2018-06-301-1/+4
| | | | It does not return status and breaks fallback signal.
* executor: improve fuchsia fallback coverageDmitry Vyukov2018-06-291-2/+2
|
* executor, pkg/ipc: support output over pipesDmitry Vyukov2018-06-291-0/+1
|
* pkg/csource: support fuchsiaDmitry Vyukov2018-06-291-5/+14
| | | | Lots of assorted heavylifting to support csource on fuchsia.
* executor: rework fallback coverageDmitry Vyukov2018-06-221-3/+2
| | | | | | | | | | We have fallback coverage implmentation for freebsd. 1. It's broken after some recent changes. 2. We need it for fuchsia, windows, akaros, linux too. 3. It's painful to work with C code. Move fallback coverage to ipc package, fix it and provide for all OSes.
* executor: make syscall table and number constantDmitry Vyukov2018-06-071-3/+3
| | | | | | | | | We see some crashes that suggest corruption of the syscall number: invalid command number 1296 (errno 11) invalid command number 107 (errno 110) Make the table and the number constant to prevent corruption.
* executor: use linux result convention for fuchsiaDmitry Vyukov2018-06-061-1/+3
| | | | | In several places we assume that -1 is failure and 0 is OK. Use this convention for fuchsia as well.
* executor: filter out invalid PCs on linux/x86_64Dmitry Vyukov2018-05-141-0/+10
| | | | | Fuzzer manages to corrupt output region and write random coverage again and again. Do a sanity range check on coverage PCs to filter out invalid ones.
* executor: fix read_cover_size signatureDmitry Vyukov2018-04-301-1/+1
|
* prog: rework address allocationDmitry Vyukov2018-02-191-0/+3
| | | | | | | | | | | | 1. mmap all memory always, without explicit mmap calls in the program. This makes lots of things much easier and removes lots of code. Makes mmap not a special syscall and allows to fuzz without mmap enabled. 2. Change address assignment algorithm. Current algorithm allocates unmapped addresses too frequently and allows collisions between arguments of a single syscall. The new algorithm analyzes actual allocations in the program and places new arguments at unused locations.
* executor: introduce uint64/32/16/8 typesDmitry Vyukov2017-12-271-4/+4
| | | | | | | | | | | | | | | The "define uint64_t unsigned long long" were too good to work. With a different toolchain I am getting: cstdint:69:11: error: expected unqualified-id using ::uint64_t; ^ executor/common.h:34:18: note: expanded from macro 'uint64_t' Do it the proper way: introduce uint64/32/16/8 types and use them. pkg/csource then does s/uint64/uint64_t/ to not clutter code with additional typedefs.
* executor: prevent executor from messing with output regionDmitry Vyukov2017-10-231-0/+5
| | | | | | | | When comparisons are enabled fuzzer somehow manages to discover the output region and corrupt it. It seems to fetch the address from some memory operations (mmap/munmap). Don't leak the output region address.
* executor: improvements for akarosDmitry Vyukov2017-10-171-1/+1
| | | | | | | 1. remove workaround for pthread attrs (was fixed in akaros) 2. remove workaround for dup2 (was fixed in akaros) 3. check that we receive a program 4. implement timeout for test processes
* sys/fuchsia: more descriptionsDmitry Vyukov2017-10-161-1/+2
|
* executor: repair fuchsia nonfailing modeDmitry Vyukov2017-10-161-2/+1
|
* executor, pkg/ipc: unify ipc protocol between linux and other OSesDmitry Vyukov2017-10-161-25/+4
| | | | | | | | | | | | | | | | | We currently use more complex and functional protocol on linux, and a simple ad-hoc protocol on other OSes. This leads to code duplication in both ipc and executor. Linux supports coverage, shared memory communication and fork server, which would also be useful for most other OSes. Unify communication protocol and parametrize it by (1) use of shmem or only pipes, (2) use of fork server. This reduces duplication in ipc and executor and will allow to support the useful features for other OSes easily. Finally, this fixes akaros support as it currently uses syz-stress running on host (linux) and executor running on akaros.
* Makefile: add fuchsia supportDmitry Vyukov2017-09-251-0/+1
|
* executor, sys/windows: initial windows supportDmitry Vyukov2017-09-251-65/+1
|
* all: more assorted fuchsia supportDmitry Vyukov2017-09-221-2/+137
|
* all: initial support for fuchsiaDmitry Vyukov2017-09-201-0/+3
| | | | | | Nothing works, but builds. Update #191
* executor: split source per-OSDmitry Vyukov2017-09-201-0/+9
Update #191