| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Build executor w/o optimizations for tests.
Tests can build lots of versions of executor in parallel,
and on overloaded machines it can be slow. On my machine
this reduces executor build time from ~7.5 to ~3.5 secs.
Reduces pkg/runtest tests time considerably.
Before:
--- PASS: TestExecutor (8.89s)
--- SKIP: TestExecutor/386 (0.00s)
--- PASS: TestExecutor/riscv64 (30.76s)
--- PASS: TestExecutor/arm (32.56s)
--- PASS: TestExecutor/arm64 (33.01s)
--- PASS: TestExecutor/amd64 (31.83s)
--- SKIP: TestExecutor/ppc64le (26.56s)
--- PASS: TestExecutor/s390x (25.53s)
--- PASS: TestExecutor/mips64le (25.65s)
After:
--- PASS: TestExecutor (4.74s)
--- SKIP: TestExecutor/386 (0.00s)
--- PASS: TestExecutor/s390x (12.27s)
--- SKIP: TestExecutor/ppc64le (12.59s)
--- PASS: TestExecutor/amd64 (12.84s)
--- PASS: TestExecutor/riscv64 (12.89s)
--- PASS: TestExecutor/arm (11.53s)
--- PASS: TestExecutor/arm64 (11.88s)
--- PASS: TestExecutor/mips64le (12.82s)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add C++ compiler and flags to the target
and build executor with the C++ compiler.
This will be needed to merge syz-fuzzer in to syz-executor
since it will be beefier and will most likely require linking in libc++.
But also this should fix #4821 since we won't use C++ flags
when building C sources (we already had work-around in pkg/csource,
but not in syz-extract).
Fixes #4821
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Test that extension points keep stable interface and work.
|
| |
|
|
|
|
|
|
|
| |
Renamed Target.BrokenCrossCompiler to Target.BrokenCompiler and
Target.CrossCFlags to Target.CFlags
"Everything in Target is about Cross now."
Signed-off-by: Alexander Potapenko <glider@google.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Detect when compiler is present, but is not functioning
(can't build a simple program, common for Linux distros).
2. Be more strict with skipping tests due to missing/broken compilers on CI
(on CI they should work, so fail loudly if not).
3. Dedup this logic across syz-env and pkg/csource tests.
4. Add better error reporting for syz-env.
Fixes #1606
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Running bisection using an older repro failed with:
<stdin>: In function ‘syz_mount_image.constprop’:
<stdin>:298:3: error: argument 1 null where non-null expected [-Werror=nonnull]
In file included from <stdin>:26:0:
/usr/include/x86_64-linux-gnu/sys/stat.h:320:12: note: in a call to function ‘mkdir’ declared here
extern int mkdir (const char *__path, __mode_t __mode)
Let's be safe and ignore warnings during repro/bisect.
Everything that runs during tests still has all warnings.
Update #501
|
| |
|
|
|
|
| |
The problem is stupid: <endian.h> should be included as <sys/endian.h> on freebsd.
Pass actual host OS to executor build as HOSTGOOS and use it to figure out
how we should include this header.
|
| |
|
|
|
|
|
| |
See discussion in PR #942.
Extend support for optional flags in sys/targets
as this flag is not supported by gcc 5.
Make flags consistent across Makefile and pkg/csource.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
pkg/csource test gets OOM-killed on travis:
https://travis-ci.org/google/syzkaller/jobs/461827347
https://travis-ci.org/google/syzkaller/jobs/460226110
Add several measures:
- set GOMAXPROCS=1 to restrict parallel processes
- remove -g from compiler invocation
- reduce set of tests run in short mode to compensate for GOMAXPROCS=1
- also reduce set of tests in full mode as they timeout now
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
In most cases we have source in memory,
so provide a function to build right from memory
without creating temp files.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We currently have native cross-compilation logic duplicated
in Makefile and in sys/targets. Some pieces are missed in one
place, some are in another. Only pkg/csource knows how to check
for -static support.
Move all CC/CFLAGS logic to sys/targets and pull results in Makefile.
This should make Makefile work on distros that have broken x86_64-linux-gnu-gcc,
now we will use just gcc. And this removes the need to define NOSTATIC,
as it's always auto-detected.
This also paves the way for making pkg/csource work on OSes other than Linux.
|
| |
|
|
| |
Introduce TempFile helper and use it in several packages.
|
| |
|
|
|
|
| |
We call the binary syz-executor because it sometimes shows in bug titles,
and we don't want 2 different bugs for when a crash is triggered during
fuzzing and during repro.
|
| |
|
|
| |
Fix typos, non-canonical code, remove dead code, etc.
|
| |
|
|
|
|
|
| |
Remove dup newlines around includes.
Makes int values shorter if not hurting readability.
Increase line len to 80.
Remove {} when not needed during copyout.
|
|
|
csource.go is too large and messy.
Move Build/Format into buid.go.
Move generation of common header into common.go.
Split generation of common header into smaller managable functions.
|