Lines Matching +full:oss +full:- +full:fuzz
1 ---
7 permalink: /getting-started/new-project-guide/go-lang/
8 ---
13 - TOC
15 ---
17 The process of integrating a project written in Go with OSS-Fuzz is very similar
19 [Setting up a new project]({{ site.baseurl }}/getting-started/new-project-guide/)
22 ## Go-fuzz support
24 OSS-Fuzz supports **go-fuzz** in the
25 [libFuzzer compatible mode](https://github.com/mdempsky/go114-fuzz-build)
26 only. In that mode, fuzz targets for Go use the libFuzzer engine with native Go
28 libFuzzer command line interface as non-Go fuzz targets.
32 First, you need to write a Go fuzz target that accepts a stream of bytes and
33 calls the program API with that. This fuzz target should reside in your project
35 ([example](https://github.com/golang/go/blob/4ad13555184eb0697c2e92c64c1b0bdb287ccc10/src/html/fuzz…
37 The structure of the project directory in OSS-Fuzz repository doesn't differ for
51 [Example](https://github.com/google/oss-fuzz/blob/356f2b947670b7eb33a1f535c71bc5c87a60b0d1/projects…
55 - libfuzzer
57 - address
62 The Dockerfile should start by `FROM gcr.io/oss-fuzz-base/base-builder-go`
64 The OSS-Fuzz builder image has the latest stable release of Golang installed. In
67 [Example](https://github.com/google/oss-fuzz/blob/356f2b947670b7eb33a1f535c71bc5c87a60b0d1/projects…
70 # Dependency for one of the fuzz targets.
71 RUN git clone --depth 1 https://github.com/ianlancetaylor/demangle
74 go-fuzz will then automatically download the dependencies based on the go.mod file
78 In order to build a Go fuzz target, you need to call `go-fuzz`
85 A usage example from go-dns project is
88 compile_go_fuzzer github.com/miekg/dns FuzzNewRR fuzz_newrr fuzz
92 * path of the package with the fuzz target
93 * name of the fuzz function