Mitch Phillips | da9a463 | 2019-07-15 09:34:09 -0700 | [diff] [blame] | 1 | // Copyright 2016 Google Inc. All rights reserved. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package cc |
| 16 | |
| 17 | import ( |
Kris Alder | f979ee3 | 2019-10-22 10:52:01 -0700 | [diff] [blame] | 18 | "encoding/json" |
Mitch Phillips | 4de896e | 2019-08-28 16:04:36 -0700 | [diff] [blame] | 19 | "path/filepath" |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 20 | "sort" |
Mitch Phillips | a0a5e19 | 2019-09-27 14:00:06 -0700 | [diff] [blame] | 21 | "strings" |
Mitch Phillips | 4de896e | 2019-08-28 16:04:36 -0700 | [diff] [blame] | 22 | |
Victor Chang | 00c144f | 2021-02-09 12:30:33 +0000 | [diff] [blame^] | 23 | "github.com/google/blueprint/proptools" |
| 24 | |
Mitch Phillips | da9a463 | 2019-07-15 09:34:09 -0700 | [diff] [blame] | 25 | "android/soong/android" |
| 26 | "android/soong/cc/config" |
| 27 | ) |
| 28 | |
Kris Alder | f979ee3 | 2019-10-22 10:52:01 -0700 | [diff] [blame] | 29 | type FuzzConfig struct { |
| 30 | // Email address of people to CC on bugs or contact about this fuzz target. |
| 31 | Cc []string `json:"cc,omitempty"` |
hamzeh | 3478a0d | 2019-12-16 16:25:50 -0800 | [diff] [blame] | 32 | // Specify whether to enable continuous fuzzing on devices. Defaults to true. |
| 33 | Fuzz_on_haiku_device *bool `json:"fuzz_on_haiku_device,omitempty"` |
| 34 | // Specify whether to enable continuous fuzzing on host. Defaults to true. |
| 35 | Fuzz_on_haiku_host *bool `json:"fuzz_on_haiku_host,omitempty"` |
Kris Alder | f979ee3 | 2019-10-22 10:52:01 -0700 | [diff] [blame] | 36 | // Component in Google's bug tracking system that bugs should be filed to. |
| 37 | Componentid *int64 `json:"componentid,omitempty"` |
| 38 | // Hotlists in Google's bug tracking system that bugs should be marked with. |
| 39 | Hotlists []string `json:"hotlists,omitempty"` |
Kris Alder | e051d0d | 2020-04-28 18:32:23 +0000 | [diff] [blame] | 40 | // Specify whether this fuzz target was submitted by a researcher. Defaults |
| 41 | // to false. |
| 42 | Researcher_submitted *bool `json:"researcher_submitted,omitempty"` |
Kris Alder | 2598c9b | 2020-09-29 22:09:36 +0000 | [diff] [blame] | 43 | // Specify who should be acknowledged for CVEs in the Android Security |
| 44 | // Bulletin. |
| 45 | Acknowledgement []string `json:"acknowledgement,omitempty"` |
Kris Alder | c81f59f | 2021-01-07 20:57:23 +0000 | [diff] [blame] | 46 | // Additional options to be passed to libfuzzer when run in Haiku. |
| 47 | Libfuzzer_options []string `json:"libfuzzer_options,omitempty"` |
| 48 | // Additional options to be passed to HWASAN when running on-device in Haiku. |
| 49 | Hwasan_options []string `json:"hwasan_options,omitempty"` |
| 50 | // Additional options to be passed to HWASAN when running on host in Haiku. |
| 51 | Asan_options []string `json:"asan_options,omitempty"` |
Kris Alder | f979ee3 | 2019-10-22 10:52:01 -0700 | [diff] [blame] | 52 | } |
| 53 | |
| 54 | func (f *FuzzConfig) String() string { |
| 55 | b, err := json.Marshal(f) |
| 56 | if err != nil { |
| 57 | panic(err) |
| 58 | } |
| 59 | |
| 60 | return string(b) |
| 61 | } |
| 62 | |
Mitch Phillips | 4e4ab8a | 2019-09-13 17:32:50 -0700 | [diff] [blame] | 63 | type FuzzProperties struct { |
| 64 | // Optional list of seed files to be installed to the fuzz target's output |
| 65 | // directory. |
| 66 | Corpus []string `android:"path"` |
Tri Vo | ad172d8 | 2019-11-27 13:45:45 -0800 | [diff] [blame] | 67 | // Optional list of data files to be installed to the fuzz target's output |
| 68 | // directory. Directory structure relative to the module is preserved. |
| 69 | Data []string `android:"path"` |
Mitch Phillips | 4e4ab8a | 2019-09-13 17:32:50 -0700 | [diff] [blame] | 70 | // Optional dictionary to be installed to the fuzz target's output directory. |
| 71 | Dictionary *string `android:"path"` |
Kris Alder | f979ee3 | 2019-10-22 10:52:01 -0700 | [diff] [blame] | 72 | // Config for running the target on fuzzing infrastructure. |
| 73 | Fuzz_config *FuzzConfig |
Mitch Phillips | 4e4ab8a | 2019-09-13 17:32:50 -0700 | [diff] [blame] | 74 | } |
| 75 | |
Mitch Phillips | da9a463 | 2019-07-15 09:34:09 -0700 | [diff] [blame] | 76 | func init() { |
| 77 | android.RegisterModuleType("cc_fuzz", FuzzFactory) |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 78 | android.RegisterSingletonType("cc_fuzz_packaging", fuzzPackagingFactory) |
Mitch Phillips | da9a463 | 2019-07-15 09:34:09 -0700 | [diff] [blame] | 79 | } |
| 80 | |
| 81 | // cc_fuzz creates a host/device fuzzer binary. Host binaries can be found at |
| 82 | // $ANDROID_HOST_OUT/fuzz/, and device binaries can be found at /data/fuzz on |
| 83 | // your device, or $ANDROID_PRODUCT_OUT/data/fuzz in your build tree. |
| 84 | func FuzzFactory() android.Module { |
| 85 | module := NewFuzz(android.HostAndDeviceSupported) |
| 86 | return module.Init() |
| 87 | } |
| 88 | |
| 89 | func NewFuzzInstaller() *baseInstaller { |
| 90 | return NewBaseInstaller("fuzz", "fuzz", InstallInData) |
| 91 | } |
| 92 | |
| 93 | type fuzzBinary struct { |
| 94 | *binaryDecorator |
| 95 | *baseCompiler |
Mitch Phillips | 4e4ab8a | 2019-09-13 17:32:50 -0700 | [diff] [blame] | 96 | |
Mitch Phillips | 8a2bc0b | 2019-10-17 15:04:01 -0700 | [diff] [blame] | 97 | Properties FuzzProperties |
| 98 | dictionary android.Path |
| 99 | corpus android.Paths |
| 100 | corpusIntermediateDir android.Path |
Kris Alder | f979ee3 | 2019-10-22 10:52:01 -0700 | [diff] [blame] | 101 | config android.Path |
Tri Vo | ad172d8 | 2019-11-27 13:45:45 -0800 | [diff] [blame] | 102 | data android.Paths |
| 103 | dataIntermediateDir android.Path |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 104 | installedSharedDeps []string |
Mitch Phillips | da9a463 | 2019-07-15 09:34:09 -0700 | [diff] [blame] | 105 | } |
| 106 | |
| 107 | func (fuzz *fuzzBinary) linkerProps() []interface{} { |
| 108 | props := fuzz.binaryDecorator.linkerProps() |
Mitch Phillips | 4e4ab8a | 2019-09-13 17:32:50 -0700 | [diff] [blame] | 109 | props = append(props, &fuzz.Properties) |
Mitch Phillips | da9a463 | 2019-07-15 09:34:09 -0700 | [diff] [blame] | 110 | return props |
| 111 | } |
| 112 | |
| 113 | func (fuzz *fuzzBinary) linkerInit(ctx BaseModuleContext) { |
Mitch Phillips | da9a463 | 2019-07-15 09:34:09 -0700 | [diff] [blame] | 114 | fuzz.binaryDecorator.linkerInit(ctx) |
| 115 | } |
| 116 | |
| 117 | func (fuzz *fuzzBinary) linkerDeps(ctx DepsContext, deps Deps) Deps { |
| 118 | deps.StaticLibs = append(deps.StaticLibs, |
| 119 | config.LibFuzzerRuntimeLibrary(ctx.toolchain())) |
| 120 | deps = fuzz.binaryDecorator.linkerDeps(ctx, deps) |
| 121 | return deps |
| 122 | } |
| 123 | |
| 124 | func (fuzz *fuzzBinary) linkerFlags(ctx ModuleContext, flags Flags) Flags { |
| 125 | flags = fuzz.binaryDecorator.linkerFlags(ctx, flags) |
Mitch Phillips | 1f7f54f | 2019-11-14 14:50:47 -0800 | [diff] [blame] | 126 | // RunPaths on devices isn't instantiated by the base linker. `../lib` for |
| 127 | // installed fuzz targets (both host and device), and `./lib` for fuzz |
| 128 | // target packages. |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 129 | flags.Local.LdFlags = append(flags.Local.LdFlags, `-Wl,-rpath,\$$ORIGIN/../lib`) |
Mitch Phillips | 1f7f54f | 2019-11-14 14:50:47 -0800 | [diff] [blame] | 130 | flags.Local.LdFlags = append(flags.Local.LdFlags, `-Wl,-rpath,\$$ORIGIN/lib`) |
Mitch Phillips | da9a463 | 2019-07-15 09:34:09 -0700 | [diff] [blame] | 131 | return flags |
| 132 | } |
| 133 | |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 134 | // This function performs a breadth-first search over the provided module's |
| 135 | // dependencies using `visitDirectDeps` to enumerate all shared library |
| 136 | // dependencies. We require breadth-first expansion, as otherwise we may |
| 137 | // incorrectly use the core libraries (sanitizer runtimes, libc, libdl, etc.) |
| 138 | // from a dependency. This may cause issues when dependencies have explicit |
| 139 | // sanitizer tags, as we may get a dependency on an unsanitized libc, etc. |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 140 | func collectAllSharedDependencies(ctx android.SingletonContext, module android.Module) android.Paths { |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 141 | var fringe []android.Module |
| 142 | |
Mitch Phillips | c0b442f | 2020-04-27 16:44:58 -0700 | [diff] [blame] | 143 | seen := make(map[string]bool) |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 144 | |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 145 | // Enumerate the first level of dependencies, as we discard all non-library |
| 146 | // modules in the BFS loop below. |
| 147 | ctx.VisitDirectDeps(module, func(dep android.Module) { |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 148 | if isValidSharedDependency(dep) { |
Mitch Phillips | f50bddb | 2019-11-12 14:03:31 -0800 | [diff] [blame] | 149 | fringe = append(fringe, dep) |
| 150 | } |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 151 | }) |
| 152 | |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 153 | var sharedLibraries android.Paths |
| 154 | |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 155 | for i := 0; i < len(fringe); i++ { |
| 156 | module := fringe[i] |
Mitch Phillips | c0b442f | 2020-04-27 16:44:58 -0700 | [diff] [blame] | 157 | if seen[module.Name()] { |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 158 | continue |
| 159 | } |
Mitch Phillips | c0b442f | 2020-04-27 16:44:58 -0700 | [diff] [blame] | 160 | seen[module.Name()] = true |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 161 | |
| 162 | ccModule := module.(*Module) |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 163 | sharedLibraries = append(sharedLibraries, ccModule.UnstrippedOutputFile()) |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 164 | ctx.VisitDirectDeps(module, func(dep android.Module) { |
Mitch Phillips | c0b442f | 2020-04-27 16:44:58 -0700 | [diff] [blame] | 165 | if isValidSharedDependency(dep) && !seen[dep.Name()] { |
Mitch Phillips | f50bddb | 2019-11-12 14:03:31 -0800 | [diff] [blame] | 166 | fringe = append(fringe, dep) |
| 167 | } |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 168 | }) |
| 169 | } |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 170 | |
| 171 | return sharedLibraries |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 172 | } |
| 173 | |
| 174 | // This function takes a module and determines if it is a unique shared library |
| 175 | // that should be installed in the fuzz target output directories. This function |
| 176 | // returns true, unless: |
Victor Chang | 00c144f | 2021-02-09 12:30:33 +0000 | [diff] [blame^] | 177 | // - The module is not an installable shared library, or |
Martin Stjernholm | 02460ab | 2020-10-06 02:36:43 +0100 | [diff] [blame] | 178 | // - The module is a header, stub, or vendor-linked library, or |
| 179 | // - The module is a prebuilt and its source is available, or |
| 180 | // - The module is a versioned member of an SDK snapshot. |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 181 | func isValidSharedDependency(dependency android.Module) bool { |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 182 | // TODO(b/144090547): We should be parsing these modules using |
| 183 | // ModuleDependencyTag instead of the current brute-force checking. |
| 184 | |
Colin Cross | 31076b3 | 2020-10-23 17:22:06 -0700 | [diff] [blame] | 185 | linkable, ok := dependency.(LinkableInterface) |
| 186 | if !ok || !linkable.CcLibraryInterface() { |
| 187 | // Discard non-linkables. |
| 188 | return false |
| 189 | } |
| 190 | |
| 191 | if !linkable.Shared() { |
| 192 | // Discard static libs. |
| 193 | return false |
| 194 | } |
| 195 | |
| 196 | if linkable.UseVndk() { |
| 197 | // Discard vendor linked libraries. |
| 198 | return false |
| 199 | } |
| 200 | |
| 201 | if lib := moduleLibraryInterface(dependency); lib != nil && lib.buildStubs() && linkable.CcLibrary() { |
Mitch Phillips | f50bddb | 2019-11-12 14:03:31 -0800 | [diff] [blame] | 202 | // Discard stubs libs (only CCLibrary variants). Prebuilt libraries should not |
| 203 | // be excluded on the basis of they're not CCLibrary()'s. |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 204 | return false |
| 205 | } |
| 206 | |
Mitch Phillips | f50bddb | 2019-11-12 14:03:31 -0800 | [diff] [blame] | 207 | // We discarded module stubs libraries above, but the LLNDK prebuilts stubs |
| 208 | // libraries must be handled differently - by looking for the stubDecorator. |
| 209 | // Discard LLNDK prebuilts stubs as well. |
| 210 | if ccLibrary, isCcLibrary := dependency.(*Module); isCcLibrary { |
| 211 | if _, isLLndkStubLibrary := ccLibrary.linker.(*stubDecorator); isLLndkStubLibrary { |
| 212 | return false |
| 213 | } |
Victor Chang | 00c144f | 2021-02-09 12:30:33 +0000 | [diff] [blame^] | 214 | // Discard installable:false libraries because they are expected to be absent |
| 215 | // in runtime. |
| 216 | if !proptools.BoolDefault(ccLibrary.Properties.Installable, true) { |
| 217 | return false |
| 218 | } |
Mitch Phillips | f50bddb | 2019-11-12 14:03:31 -0800 | [diff] [blame] | 219 | } |
| 220 | |
Martin Stjernholm | 02460ab | 2020-10-06 02:36:43 +0100 | [diff] [blame] | 221 | // If the same library is present both as source and a prebuilt we must pick |
| 222 | // only one to avoid a conflict. Always prefer the source since the prebuilt |
| 223 | // probably won't be built with sanitizers enabled. |
| 224 | if prebuilt, ok := dependency.(android.PrebuiltInterface); ok && |
| 225 | prebuilt.Prebuilt() != nil && prebuilt.Prebuilt().SourceExists() { |
| 226 | return false |
| 227 | } |
| 228 | |
| 229 | // Discard versioned members of SDK snapshots, because they will conflict with |
| 230 | // unversioned ones. |
| 231 | if sdkMember, ok := dependency.(android.SdkAware); ok && !sdkMember.ContainingSdk().Unversioned() { |
| 232 | return false |
| 233 | } |
| 234 | |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 235 | return true |
| 236 | } |
| 237 | |
| 238 | func sharedLibraryInstallLocation( |
| 239 | libraryPath android.Path, isHost bool, archString string) string { |
| 240 | installLocation := "$(PRODUCT_OUT)/data" |
| 241 | if isHost { |
| 242 | installLocation = "$(HOST_OUT)" |
| 243 | } |
| 244 | installLocation = filepath.Join( |
| 245 | installLocation, "fuzz", archString, "lib", libraryPath.Base()) |
| 246 | return installLocation |
| 247 | } |
| 248 | |
Mitch Phillips | 0bf9713 | 2020-03-06 09:38:12 -0800 | [diff] [blame] | 249 | // Get the device-only shared library symbols install directory. |
| 250 | func sharedLibrarySymbolsInstallLocation(libraryPath android.Path, archString string) string { |
| 251 | return filepath.Join("$(PRODUCT_OUT)/symbols/data/fuzz/", archString, "/lib/", libraryPath.Base()) |
| 252 | } |
| 253 | |
Mitch Phillips | da9a463 | 2019-07-15 09:34:09 -0700 | [diff] [blame] | 254 | func (fuzz *fuzzBinary) install(ctx ModuleContext, file android.Path) { |
Mitch Phillips | 4e4ab8a | 2019-09-13 17:32:50 -0700 | [diff] [blame] | 255 | fuzz.binaryDecorator.baseInstaller.dir = filepath.Join( |
| 256 | "fuzz", ctx.Target().Arch.ArchType.String(), ctx.ModuleName()) |
| 257 | fuzz.binaryDecorator.baseInstaller.dir64 = filepath.Join( |
| 258 | "fuzz", ctx.Target().Arch.ArchType.String(), ctx.ModuleName()) |
Mitch Phillips | da9a463 | 2019-07-15 09:34:09 -0700 | [diff] [blame] | 259 | fuzz.binaryDecorator.baseInstaller.install(ctx, file) |
Mitch Phillips | 4e4ab8a | 2019-09-13 17:32:50 -0700 | [diff] [blame] | 260 | |
| 261 | fuzz.corpus = android.PathsForModuleSrc(ctx, fuzz.Properties.Corpus) |
Colin Cross | f1a035e | 2020-11-16 17:32:30 -0800 | [diff] [blame] | 262 | builder := android.NewRuleBuilder(pctx, ctx) |
Mitch Phillips | 8a2bc0b | 2019-10-17 15:04:01 -0700 | [diff] [blame] | 263 | intermediateDir := android.PathForModuleOut(ctx, "corpus") |
| 264 | for _, entry := range fuzz.corpus { |
| 265 | builder.Command().Text("cp"). |
| 266 | Input(entry). |
| 267 | Output(intermediateDir.Join(ctx, entry.Base())) |
| 268 | } |
Colin Cross | f1a035e | 2020-11-16 17:32:30 -0800 | [diff] [blame] | 269 | builder.Build("copy_corpus", "copy corpus") |
Mitch Phillips | 8a2bc0b | 2019-10-17 15:04:01 -0700 | [diff] [blame] | 270 | fuzz.corpusIntermediateDir = intermediateDir |
| 271 | |
Tri Vo | ad172d8 | 2019-11-27 13:45:45 -0800 | [diff] [blame] | 272 | fuzz.data = android.PathsForModuleSrc(ctx, fuzz.Properties.Data) |
Colin Cross | f1a035e | 2020-11-16 17:32:30 -0800 | [diff] [blame] | 273 | builder = android.NewRuleBuilder(pctx, ctx) |
Tri Vo | ad172d8 | 2019-11-27 13:45:45 -0800 | [diff] [blame] | 274 | intermediateDir = android.PathForModuleOut(ctx, "data") |
| 275 | for _, entry := range fuzz.data { |
| 276 | builder.Command().Text("cp"). |
| 277 | Input(entry). |
| 278 | Output(intermediateDir.Join(ctx, entry.Rel())) |
| 279 | } |
Colin Cross | f1a035e | 2020-11-16 17:32:30 -0800 | [diff] [blame] | 280 | builder.Build("copy_data", "copy data") |
Tri Vo | ad172d8 | 2019-11-27 13:45:45 -0800 | [diff] [blame] | 281 | fuzz.dataIntermediateDir = intermediateDir |
| 282 | |
Mitch Phillips | 4e4ab8a | 2019-09-13 17:32:50 -0700 | [diff] [blame] | 283 | if fuzz.Properties.Dictionary != nil { |
| 284 | fuzz.dictionary = android.PathForModuleSrc(ctx, *fuzz.Properties.Dictionary) |
| 285 | if fuzz.dictionary.Ext() != ".dict" { |
| 286 | ctx.PropertyErrorf("dictionary", |
| 287 | "Fuzzer dictionary %q does not have '.dict' extension", |
| 288 | fuzz.dictionary.String()) |
| 289 | } |
| 290 | } |
Kris Alder | f979ee3 | 2019-10-22 10:52:01 -0700 | [diff] [blame] | 291 | |
| 292 | if fuzz.Properties.Fuzz_config != nil { |
Kris Alder | db97af4 | 2019-10-30 10:17:04 -0700 | [diff] [blame] | 293 | configPath := android.PathForModuleOut(ctx, "config").Join(ctx, "config.json") |
Colin Cross | cf371cc | 2020-11-13 11:48:42 -0800 | [diff] [blame] | 294 | android.WriteFileRule(ctx, configPath, fuzz.Properties.Fuzz_config.String()) |
Kris Alder | f979ee3 | 2019-10-22 10:52:01 -0700 | [diff] [blame] | 295 | fuzz.config = configPath |
| 296 | } |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 297 | |
| 298 | // Grab the list of required shared libraries. |
Mitch Phillips | c0b442f | 2020-04-27 16:44:58 -0700 | [diff] [blame] | 299 | seen := make(map[string]bool) |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 300 | var sharedLibraries android.Paths |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 301 | ctx.WalkDeps(func(child, parent android.Module) bool { |
Mitch Phillips | c0b442f | 2020-04-27 16:44:58 -0700 | [diff] [blame] | 302 | if seen[child.Name()] { |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 303 | return false |
| 304 | } |
Mitch Phillips | c0b442f | 2020-04-27 16:44:58 -0700 | [diff] [blame] | 305 | seen[child.Name()] = true |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 306 | |
| 307 | if isValidSharedDependency(child) { |
| 308 | sharedLibraries = append(sharedLibraries, child.(*Module).UnstrippedOutputFile()) |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 309 | return true |
| 310 | } |
| 311 | return false |
| 312 | }) |
| 313 | |
| 314 | for _, lib := range sharedLibraries { |
| 315 | fuzz.installedSharedDeps = append(fuzz.installedSharedDeps, |
| 316 | sharedLibraryInstallLocation( |
| 317 | lib, ctx.Host(), ctx.Arch().ArchType.String())) |
Mitch Phillips | 0bf9713 | 2020-03-06 09:38:12 -0800 | [diff] [blame] | 318 | |
| 319 | // Also add the dependency on the shared library symbols dir. |
| 320 | if !ctx.Host() { |
| 321 | fuzz.installedSharedDeps = append(fuzz.installedSharedDeps, |
| 322 | sharedLibrarySymbolsInstallLocation(lib, ctx.Arch().ArchType.String())) |
| 323 | } |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 324 | } |
Mitch Phillips | da9a463 | 2019-07-15 09:34:09 -0700 | [diff] [blame] | 325 | } |
| 326 | |
| 327 | func NewFuzz(hod android.HostOrDeviceSupported) *Module { |
| 328 | module, binary := NewBinary(hod) |
| 329 | |
Mitch Phillips | da9a463 | 2019-07-15 09:34:09 -0700 | [diff] [blame] | 330 | binary.baseInstaller = NewFuzzInstaller() |
Ivan Lozano | 3968d8f | 2020-12-14 11:27:52 -0500 | [diff] [blame] | 331 | module.sanitize.SetSanitizer(Fuzzer, true) |
Mitch Phillips | da9a463 | 2019-07-15 09:34:09 -0700 | [diff] [blame] | 332 | |
| 333 | fuzz := &fuzzBinary{ |
| 334 | binaryDecorator: binary, |
| 335 | baseCompiler: NewBaseCompiler(), |
| 336 | } |
| 337 | module.compiler = fuzz |
| 338 | module.linker = fuzz |
| 339 | module.installer = fuzz |
Colin Cross | eec9b28 | 2019-07-18 16:20:52 -0700 | [diff] [blame] | 340 | |
| 341 | // The fuzzer runtime is not present for darwin host modules, disable cc_fuzz modules when targeting darwin. |
| 342 | android.AddLoadHook(module, func(ctx android.LoadHookContext) { |
Alex Light | 71123ec | 2019-07-24 13:34:19 -0700 | [diff] [blame] | 343 | disableDarwinAndLinuxBionic := struct { |
Colin Cross | eec9b28 | 2019-07-18 16:20:52 -0700 | [diff] [blame] | 344 | Target struct { |
| 345 | Darwin struct { |
| 346 | Enabled *bool |
| 347 | } |
Alex Light | 71123ec | 2019-07-24 13:34:19 -0700 | [diff] [blame] | 348 | Linux_bionic struct { |
| 349 | Enabled *bool |
| 350 | } |
Colin Cross | eec9b28 | 2019-07-18 16:20:52 -0700 | [diff] [blame] | 351 | } |
| 352 | }{} |
Alex Light | 71123ec | 2019-07-24 13:34:19 -0700 | [diff] [blame] | 353 | disableDarwinAndLinuxBionic.Target.Darwin.Enabled = BoolPtr(false) |
| 354 | disableDarwinAndLinuxBionic.Target.Linux_bionic.Enabled = BoolPtr(false) |
| 355 | ctx.AppendProperties(&disableDarwinAndLinuxBionic) |
Colin Cross | eec9b28 | 2019-07-18 16:20:52 -0700 | [diff] [blame] | 356 | }) |
| 357 | |
Mitch Phillips | da9a463 | 2019-07-15 09:34:09 -0700 | [diff] [blame] | 358 | return module |
| 359 | } |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 360 | |
| 361 | // Responsible for generating GNU Make rules that package fuzz targets into |
| 362 | // their architecture & target/host specific zip file. |
| 363 | type fuzzPackager struct { |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 364 | packages android.Paths |
| 365 | sharedLibInstallStrings []string |
| 366 | fuzzTargets map[string]bool |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 367 | } |
| 368 | |
| 369 | func fuzzPackagingFactory() android.Singleton { |
| 370 | return &fuzzPackager{} |
| 371 | } |
| 372 | |
| 373 | type fileToZip struct { |
| 374 | SourceFilePath android.Path |
| 375 | DestinationPathPrefix string |
| 376 | } |
| 377 | |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 378 | type archOs struct { |
| 379 | hostOrTarget string |
| 380 | arch string |
| 381 | dir string |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 382 | } |
| 383 | |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 384 | func (s *fuzzPackager) GenerateBuildActions(ctx android.SingletonContext) { |
| 385 | // Map between each architecture + host/device combination, and the files that |
| 386 | // need to be packaged (in the tuple of {source file, destination folder in |
| 387 | // archive}). |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 388 | archDirs := make(map[archOs][]fileToZip) |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 389 | |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 390 | // Map tracking whether each shared library has an install rule to avoid duplicate install rules from |
| 391 | // multiple fuzzers that depend on the same shared library. |
| 392 | sharedLibraryInstalled := make(map[string]bool) |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 393 | |
| 394 | // List of individual fuzz targets, so that 'make fuzz' also installs the targets |
| 395 | // to the correct output directories as well. |
| 396 | s.fuzzTargets = make(map[string]bool) |
| 397 | |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 398 | ctx.VisitAllModules(func(module android.Module) { |
| 399 | // Discard non-fuzz targets. |
| 400 | ccModule, ok := module.(*Module) |
| 401 | if !ok { |
| 402 | return |
| 403 | } |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 404 | |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 405 | fuzzModule, ok := ccModule.compiler.(*fuzzBinary) |
| 406 | if !ok { |
| 407 | return |
| 408 | } |
| 409 | |
Yifan Hong | 60e0cfb | 2020-10-21 15:17:56 -0700 | [diff] [blame] | 410 | // Discard ramdisk + vendor_ramdisk + recovery modules, they're duplicates of |
Mitch Phillips | 2edbe8e | 2019-11-13 08:36:07 -0800 | [diff] [blame] | 411 | // fuzz targets we're going to package anyway. |
| 412 | if !ccModule.Enabled() || ccModule.Properties.PreventInstall || |
Yifan Hong | 60e0cfb | 2020-10-21 15:17:56 -0700 | [diff] [blame] | 413 | ccModule.InRamdisk() || ccModule.InVendorRamdisk() || ccModule.InRecovery() { |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 414 | return |
| 415 | } |
| 416 | |
Mitch Phillips | 6a9bf21 | 2019-12-05 07:36:11 -0800 | [diff] [blame] | 417 | // Discard modules that are in an unavailable namespace. |
| 418 | if !ccModule.ExportedToMake() { |
| 419 | return |
| 420 | } |
| 421 | |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 422 | hostOrTargetString := "target" |
| 423 | if ccModule.Host() { |
| 424 | hostOrTargetString = "host" |
| 425 | } |
| 426 | |
| 427 | archString := ccModule.Arch().ArchType.String() |
| 428 | archDir := android.PathForIntermediates(ctx, "fuzz", hostOrTargetString, archString) |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 429 | archOs := archOs{hostOrTarget: hostOrTargetString, arch: archString, dir: archDir.String()} |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 430 | |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 431 | // Grab the list of required shared libraries. |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 432 | sharedLibraries := collectAllSharedDependencies(ctx, module) |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 433 | |
Mitch Phillips | 2edbe8e | 2019-11-13 08:36:07 -0800 | [diff] [blame] | 434 | var files []fileToZip |
Colin Cross | f1a035e | 2020-11-16 17:32:30 -0800 | [diff] [blame] | 435 | builder := android.NewRuleBuilder(pctx, ctx) |
Mitch Phillips | 2edbe8e | 2019-11-13 08:36:07 -0800 | [diff] [blame] | 436 | |
| 437 | // Package the corpora into a zipfile. |
| 438 | if fuzzModule.corpus != nil { |
| 439 | corpusZip := archDir.Join(ctx, module.Name()+"_seed_corpus.zip") |
Colin Cross | f1a035e | 2020-11-16 17:32:30 -0800 | [diff] [blame] | 440 | command := builder.Command().BuiltTool("soong_zip"). |
Mitch Phillips | 2edbe8e | 2019-11-13 08:36:07 -0800 | [diff] [blame] | 441 | Flag("-j"). |
| 442 | FlagWithOutput("-o ", corpusZip) |
Colin Cross | 053fca1 | 2020-08-19 13:51:47 -0700 | [diff] [blame] | 443 | command.FlagWithRspFileInputList("-r ", fuzzModule.corpus) |
Mitch Phillips | 2edbe8e | 2019-11-13 08:36:07 -0800 | [diff] [blame] | 444 | files = append(files, fileToZip{corpusZip, ""}) |
| 445 | } |
| 446 | |
Tri Vo | ad172d8 | 2019-11-27 13:45:45 -0800 | [diff] [blame] | 447 | // Package the data into a zipfile. |
| 448 | if fuzzModule.data != nil { |
| 449 | dataZip := archDir.Join(ctx, module.Name()+"_data.zip") |
Colin Cross | f1a035e | 2020-11-16 17:32:30 -0800 | [diff] [blame] | 450 | command := builder.Command().BuiltTool("soong_zip"). |
Tri Vo | ad172d8 | 2019-11-27 13:45:45 -0800 | [diff] [blame] | 451 | FlagWithOutput("-o ", dataZip) |
| 452 | for _, f := range fuzzModule.data { |
| 453 | intermediateDir := strings.TrimSuffix(f.String(), f.Rel()) |
| 454 | command.FlagWithArg("-C ", intermediateDir) |
| 455 | command.FlagWithInput("-f ", f) |
| 456 | } |
| 457 | files = append(files, fileToZip{dataZip, ""}) |
| 458 | } |
| 459 | |
Mitch Phillips | 2edbe8e | 2019-11-13 08:36:07 -0800 | [diff] [blame] | 460 | // Find and mark all the transiently-dependent shared libraries for |
| 461 | // packaging. |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 462 | for _, library := range sharedLibraries { |
Mitch Phillips | 2edbe8e | 2019-11-13 08:36:07 -0800 | [diff] [blame] | 463 | files = append(files, fileToZip{library, "lib"}) |
Mitch Phillips | 13ed3f5 | 2019-11-12 11:12:10 -0800 | [diff] [blame] | 464 | |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 465 | // For each architecture-specific shared library dependency, we need to |
| 466 | // install it to the output directory. Setup the install destination here, |
| 467 | // which will be used by $(copy-many-files) in the Make backend. |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 468 | installDestination := sharedLibraryInstallLocation( |
| 469 | library, ccModule.Host(), archString) |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 470 | if sharedLibraryInstalled[installDestination] { |
| 471 | continue |
| 472 | } |
| 473 | sharedLibraryInstalled[installDestination] = true |
Mitch Phillips | 0bf9713 | 2020-03-06 09:38:12 -0800 | [diff] [blame] | 474 | |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 475 | // Escape all the variables, as the install destination here will be called |
| 476 | // via. $(eval) in Make. |
| 477 | installDestination = strings.ReplaceAll( |
| 478 | installDestination, "$", "$$") |
| 479 | s.sharedLibInstallStrings = append(s.sharedLibInstallStrings, |
| 480 | library.String()+":"+installDestination) |
Mitch Phillips | 0bf9713 | 2020-03-06 09:38:12 -0800 | [diff] [blame] | 481 | |
| 482 | // Ensure that on device, the library is also reinstalled to the /symbols/ |
| 483 | // dir. Symbolized DSO's are always installed to the device when fuzzing, but |
| 484 | // we want symbolization tools (like `stack`) to be able to find the symbols |
| 485 | // in $ANDROID_PRODUCT_OUT/symbols automagically. |
| 486 | if !ccModule.Host() { |
| 487 | symbolsInstallDestination := sharedLibrarySymbolsInstallLocation(library, archString) |
| 488 | symbolsInstallDestination = strings.ReplaceAll(symbolsInstallDestination, "$", "$$") |
| 489 | s.sharedLibInstallStrings = append(s.sharedLibInstallStrings, |
| 490 | library.String()+":"+symbolsInstallDestination) |
| 491 | } |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 492 | } |
| 493 | |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 494 | // The executable. |
Mitch Phillips | 2edbe8e | 2019-11-13 08:36:07 -0800 | [diff] [blame] | 495 | files = append(files, fileToZip{ccModule.UnstrippedOutputFile(), ""}) |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 496 | |
| 497 | // The dictionary. |
| 498 | if fuzzModule.dictionary != nil { |
Mitch Phillips | 2edbe8e | 2019-11-13 08:36:07 -0800 | [diff] [blame] | 499 | files = append(files, fileToZip{fuzzModule.dictionary, ""}) |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 500 | } |
Kris Alder | f979ee3 | 2019-10-22 10:52:01 -0700 | [diff] [blame] | 501 | |
| 502 | // Additional fuzz config. |
| 503 | if fuzzModule.config != nil { |
Mitch Phillips | 2edbe8e | 2019-11-13 08:36:07 -0800 | [diff] [blame] | 504 | files = append(files, fileToZip{fuzzModule.config, ""}) |
Kris Alder | f979ee3 | 2019-10-22 10:52:01 -0700 | [diff] [blame] | 505 | } |
Mitch Phillips | 2edbe8e | 2019-11-13 08:36:07 -0800 | [diff] [blame] | 506 | |
| 507 | fuzzZip := archDir.Join(ctx, module.Name()+".zip") |
Colin Cross | f1a035e | 2020-11-16 17:32:30 -0800 | [diff] [blame] | 508 | command := builder.Command().BuiltTool("soong_zip"). |
Mitch Phillips | 2edbe8e | 2019-11-13 08:36:07 -0800 | [diff] [blame] | 509 | Flag("-j"). |
| 510 | FlagWithOutput("-o ", fuzzZip) |
| 511 | for _, file := range files { |
| 512 | if file.DestinationPathPrefix != "" { |
| 513 | command.FlagWithArg("-P ", file.DestinationPathPrefix) |
| 514 | } else { |
| 515 | command.Flag("-P ''") |
| 516 | } |
| 517 | command.FlagWithInput("-f ", file.SourceFilePath) |
| 518 | } |
| 519 | |
Colin Cross | f1a035e | 2020-11-16 17:32:30 -0800 | [diff] [blame] | 520 | builder.Build("create-"+fuzzZip.String(), |
Mitch Phillips | 2edbe8e | 2019-11-13 08:36:07 -0800 | [diff] [blame] | 521 | "Package "+module.Name()+" for "+archString+"-"+hostOrTargetString) |
| 522 | |
Mitch Phillips | 18e6719 | 2020-02-24 08:26:20 -0800 | [diff] [blame] | 523 | // Don't add modules to 'make haiku' that are set to not be exported to the |
| 524 | // fuzzing infrastructure. |
| 525 | if config := fuzzModule.Properties.Fuzz_config; config != nil { |
| 526 | if ccModule.Host() && !BoolDefault(config.Fuzz_on_haiku_host, true) { |
| 527 | return |
| 528 | } else if !BoolDefault(config.Fuzz_on_haiku_device, true) { |
| 529 | return |
| 530 | } |
| 531 | } |
| 532 | |
| 533 | s.fuzzTargets[module.Name()] = true |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 534 | archDirs[archOs] = append(archDirs[archOs], fileToZip{fuzzZip, ""}) |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 535 | }) |
| 536 | |
Colin Cross | dc809f9 | 2019-11-20 15:58:32 -0800 | [diff] [blame] | 537 | var archOsList []archOs |
| 538 | for archOs := range archDirs { |
| 539 | archOsList = append(archOsList, archOs) |
| 540 | } |
| 541 | sort.Slice(archOsList, func(i, j int) bool { return archOsList[i].dir < archOsList[j].dir }) |
| 542 | |
| 543 | for _, archOs := range archOsList { |
| 544 | filesToZip := archDirs[archOs] |
| 545 | arch := archOs.arch |
| 546 | hostOrTarget := archOs.hostOrTarget |
Colin Cross | f1a035e | 2020-11-16 17:32:30 -0800 | [diff] [blame] | 547 | builder := android.NewRuleBuilder(pctx, ctx) |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 548 | outputFile := android.PathForOutput(ctx, "fuzz-"+hostOrTarget+"-"+arch+".zip") |
Mitch Phillips | a0a5e19 | 2019-09-27 14:00:06 -0700 | [diff] [blame] | 549 | s.packages = append(s.packages, outputFile) |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 550 | |
Colin Cross | f1a035e | 2020-11-16 17:32:30 -0800 | [diff] [blame] | 551 | command := builder.Command().BuiltTool("soong_zip"). |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 552 | Flag("-j"). |
Mitch Phillips | 2edbe8e | 2019-11-13 08:36:07 -0800 | [diff] [blame] | 553 | FlagWithOutput("-o ", outputFile). |
| 554 | Flag("-L 0") // No need to try and re-compress the zipfiles. |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 555 | |
| 556 | for _, fileToZip := range filesToZip { |
Mitch Phillips | 2edbe8e | 2019-11-13 08:36:07 -0800 | [diff] [blame] | 557 | if fileToZip.DestinationPathPrefix != "" { |
| 558 | command.FlagWithArg("-P ", fileToZip.DestinationPathPrefix) |
| 559 | } else { |
| 560 | command.Flag("-P ''") |
| 561 | } |
| 562 | command.FlagWithInput("-f ", fileToZip.SourceFilePath) |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 563 | } |
| 564 | |
Colin Cross | f1a035e | 2020-11-16 17:32:30 -0800 | [diff] [blame] | 565 | builder.Build("create-fuzz-package-"+arch+"-"+hostOrTarget, |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 566 | "Create fuzz target packages for "+arch+"-"+hostOrTarget) |
| 567 | } |
Mitch Phillips | a0a5e19 | 2019-09-27 14:00:06 -0700 | [diff] [blame] | 568 | } |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 569 | |
Mitch Phillips | a0a5e19 | 2019-09-27 14:00:06 -0700 | [diff] [blame] | 570 | func (s *fuzzPackager) MakeVars(ctx android.MakeVarsContext) { |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 571 | packages := s.packages.Strings() |
| 572 | sort.Strings(packages) |
| 573 | sort.Strings(s.sharedLibInstallStrings) |
Mitch Phillips | a0a5e19 | 2019-09-27 14:00:06 -0700 | [diff] [blame] | 574 | // TODO(mitchp): Migrate this to use MakeVarsContext::DistForGoal() when it's |
| 575 | // ready to handle phony targets created in Soong. In the meantime, this |
| 576 | // exports the phony 'fuzz' target and dependencies on packages to |
| 577 | // core/main.mk so that we can use dist-for-goals. |
Mitch Phillips | e1ee1a1 | 2019-10-17 19:20:41 -0700 | [diff] [blame] | 578 | ctx.Strict("SOONG_FUZZ_PACKAGING_ARCH_MODULES", strings.Join(packages, " ")) |
| 579 | ctx.Strict("FUZZ_TARGET_SHARED_DEPS_INSTALL_PAIRS", |
| 580 | strings.Join(s.sharedLibInstallStrings, " ")) |
| 581 | |
| 582 | // Preallocate the slice of fuzz targets to minimise memory allocations. |
| 583 | fuzzTargets := make([]string, 0, len(s.fuzzTargets)) |
| 584 | for target, _ := range s.fuzzTargets { |
| 585 | fuzzTargets = append(fuzzTargets, target) |
| 586 | } |
| 587 | sort.Strings(fuzzTargets) |
| 588 | ctx.Strict("ALL_FUZZ_TARGETS", strings.Join(fuzzTargets, " ")) |
Mitch Phillips | d3254b4 | 2019-09-24 13:03:28 -0700 | [diff] [blame] | 589 | } |