summaryrefslogtreecommitdiff
path: root/testing/fuzzers
diff options
context:
space:
mode:
Diffstat (limited to 'testing/fuzzers')
-rw-r--r--testing/fuzzers/BUILD.gn5
-rw-r--r--testing/fuzzers/pdf_fuzzer_init.cc6
-rw-r--r--testing/fuzzers/pdfium_fuzzer_helper.cc5
3 files changed, 12 insertions, 4 deletions
diff --git a/testing/fuzzers/BUILD.gn b/testing/fuzzers/BUILD.gn
index f528ad5c9d..94f501ad65 100644
--- a/testing/fuzzers/BUILD.gn
+++ b/testing/fuzzers/BUILD.gn
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/jumbo.gni")
import("../../pdfium.gni")
config("fuzzer_config") {
@@ -66,7 +67,7 @@ group("fuzzers") {
}
template("pdfium_public_fuzzer") {
- source_set(target_name) {
+ jumbo_source_set(target_name) {
sources = invoker.sources + [
"pdfium_fuzzer_helper.cc",
"pdfium_fuzzer_helper.h",
@@ -95,7 +96,7 @@ template("pdfium_public_fuzzer") {
}
template("pdfium_fuzzer") {
- source_set(target_name) {
+ jumbo_source_set(target_name) {
sources = invoker.sources + [ "pdf_fuzzer_init.cc" ]
deps = [
"../../:pdfium",
diff --git a/testing/fuzzers/pdf_fuzzer_init.cc b/testing/fuzzers/pdf_fuzzer_init.cc
index 4b9790c3f8..d6b10ff00e 100644
--- a/testing/fuzzers/pdf_fuzzer_init.cc
+++ b/testing/fuzzers/pdf_fuzzer_init.cc
@@ -18,4 +18,8 @@ struct TestCase {
}
FPDF_LIBRARY_CONFIG config;
};
-static TestCase* testCase = new TestCase();
+
+// pdf_fuzzer_init.cc and pdfium_fuzzer_helper.cc are mutually exclusive and
+// should not be built together. They deliberately have the same global
+// variable.
+static TestCase* g_test_case = new TestCase();
diff --git a/testing/fuzzers/pdfium_fuzzer_helper.cc b/testing/fuzzers/pdfium_fuzzer_helper.cc
index ed000d251d..0315916d0c 100644
--- a/testing/fuzzers/pdfium_fuzzer_helper.cc
+++ b/testing/fuzzers/pdfium_fuzzer_helper.cc
@@ -261,4 +261,7 @@ struct TestCase {
UNSUPPORT_INFO unsupport_info;
};
-static TestCase* test_case = new TestCase();
+// pdf_fuzzer_init.cc and pdfium_fuzzer_helper.cc are mutually exclusive and
+// should not be built together. They deliberately have the same global
+// variable.
+static TestCase* g_test_case = new TestCase();