• Home
Name Date Size #Lines LOC

..--

corpus/03-May-2024-

.clang-formatD03-May-202423 21

DockerfileD03-May-2024488 1412

README.mdD03-May-20241 KiB4535

build.shD03-May-2024805 259

cras_hfp_slc.ccD03-May-20241.9 KiB6753

cras_hfp_slc.dictD03-May-2024223 2423

rclient_message.ccD03-May-20242.2 KiB6952

README.md

1# OSS-Fuzz for CRAS
2
3This directory contains source code and build scripts for coverage-guided
4fuzzers.
5
6Detailed instructions are available at: https://github.com/google/oss-fuzz/blob/master/docs/
7
8## Quick start
9
10### Sudoless Docker
11```
12sudo adduser $USER docker
13```
14### Sync to the latest base-builder
15```
16docker pull gcr.io/oss-fuzz-base/base-builder
17```
18
19### Build a container from the adhd directory
20```
21docker build -t ossfuzz/cras -f cras/src/fuzz/Dockerfile .
22```
23Add `--no-cache` if you want a complete rebuild.
24
25### Build fuzzers
26```
27docker run --cap-add=SYS_PTRACE -ti --rm -v /tmp/fuzzers:/out ossfuzz/cras
28```
29
30### Look in /tmp/fuzzers to see the executables. Run them like so:
31```
32docker run --cap-add=SYS_PTRACE -ti -v $(pwd)/cras/src/fuzz/corpus:/corpus \
33    -v /tmp/fuzzers:/out ossfuzz/cras /out/rclient_message \
34    /corpus -runs=100
35```
36
37### Debug in docker
38
39Go into docker console by
40```
41docker run --cap-add=SYS_PTRACE -ti -v $(pwd)/cras/src/fuzz/corpus:/corpus \
42    -v /tmp/fuzzers:/out ossfuzz/cras /bin/bash
43```
44and start debugging.
45