2019-07-30 12:13:04 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Copyright 2019 syzkaller project authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
# Helper script for working with fuzzit.dev
|
|
|
|
# https://github.com/fuzzitdev/example-go
|
|
|
|
|
|
|
|
set -eux
|
2019-09-13 13:13:36 +00:00
|
|
|
export TYPE="${1}"
|
2019-07-30 12:13:04 +00:00
|
|
|
|
|
|
|
function target {
|
|
|
|
go-fuzz-build -libfuzzer -func $3 -o fuzzer.a $2
|
|
|
|
clang -fsanitize=fuzzer fuzzer.a -o fuzzer
|
2020-05-06 12:43:04 +00:00
|
|
|
./fuzzit create job --type "${TYPE}" --branch ${GITHUB_REF#refs/heads/} --revision ${GITHUB_SHA} syzkaller/$1 ./fuzzer
|
2019-07-30 12:13:04 +00:00
|
|
|
}
|
|
|
|
|
2020-05-06 12:43:04 +00:00
|
|
|
curl -L --output fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v2.4.77/fuzzit_Linux_x86_64
|
2019-07-30 12:13:04 +00:00
|
|
|
chmod a+x fuzzit
|
|
|
|
|
2020-05-01 05:22:22 +00:00
|
|
|
make descriptions
|
2019-08-09 07:46:28 +00:00
|
|
|
target syzkaller-prog-deserialize ./prog/test FuzzDeserialize
|
|
|
|
target syzkaller-prog-parselog ./prog/test FuzzParseLog
|
|
|
|
target syzkaller-compiler ./pkg/compiler Fuzz
|
|
|
|
target syzkaller-report ./pkg/report Fuzz
|
|
|
|
target syzkaller-trace2syz ./tools/syz-trace2syz/proggen Fuzz
|