mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-31 01:43:03 +08:00
9a97daff39
Adds the build support for using libfuzzer controlled by setting `crashpad_use_libfuzzer=true`. Also adds a first fuzzer (for ElfImageReader). Currently only runs on Linux, but should work on Fuchsia too with some minor fixes (not sure yet whether the fixes required are toolchain or in our build setup). Run as: out/lin/elf_image_reader_fuzzer snapshot/elf/elf_image_reader_fuzzer_corpus/ hits an OOM pretty quickly in trying to allocate a giant buffer. Bug: crashpad:30, crashpad:196, crashpad:233 Change-Id: Idd3ca11fe00319b8b29e029d5e13b17bfd518ea0 Reviewed-on: https://chromium-review.googlesource.com/1083451 Reviewed-by: Robert Sesek <rsesek@chromium.org> Reviewed-by: Joshua Peraza <jperaza@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
50 lines
1.6 KiB
Plaintext
50 lines
1.6 KiB
Plaintext
# Copyright 2018 The Crashpad Authors. All rights reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
source_set("libfuzzer") {
|
|
if (crashpad_use_libfuzzer) {
|
|
sources = [
|
|
"src/FuzzerClangCounters.cpp",
|
|
"src/FuzzerCrossOver.cpp",
|
|
"src/FuzzerDriver.cpp",
|
|
"src/FuzzerExtFunctionsDlsym.cpp",
|
|
"src/FuzzerExtFunctionsDlsymWin.cpp",
|
|
"src/FuzzerExtFunctionsWeak.cpp",
|
|
"src/FuzzerExtFunctionsWeakAlias.cpp",
|
|
"src/FuzzerExtraCounters.cpp",
|
|
"src/FuzzerIO.cpp",
|
|
"src/FuzzerIOPosix.cpp",
|
|
"src/FuzzerIOWindows.cpp",
|
|
"src/FuzzerLoop.cpp",
|
|
"src/FuzzerMain.cpp",
|
|
"src/FuzzerMerge.cpp",
|
|
"src/FuzzerMutate.cpp",
|
|
"src/FuzzerSHA1.cpp",
|
|
"src/FuzzerShmemPosix.cpp",
|
|
"src/FuzzerShmemWindows.cpp",
|
|
"src/FuzzerTracePC.cpp",
|
|
"src/FuzzerUtil.cpp",
|
|
"src/FuzzerUtilDarwin.cpp",
|
|
"src/FuzzerUtilLinux.cpp",
|
|
"src/FuzzerUtilPosix.cpp",
|
|
"src/FuzzerUtilWindows.cpp",
|
|
]
|
|
|
|
configs -= [
|
|
"//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors",
|
|
"//build:crashpad_fuzzer_flags",
|
|
]
|
|
}
|
|
}
|