Skip to content

Commit 0f7922a

Browse files
yamilmoralescopybara-github
authored andcommitted
Refactor coverage out of GlobalRunnerState with the purpose of sharing it with the Rust FuzzTest framework for emitting features.
PiperOrigin-RevId: 783788660
1 parent 0f82dad commit 0f7922a

File tree

8 files changed

+605
-433
lines changed

8 files changed

+605
-433
lines changed

centipede/BUILD

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,8 @@ cc_library(
10241024
# e.g. feature.cc. These files are compiled by the engine and the runner
10251025
# separately, with different compiler flags.
10261026
RUNNER_SOURCES_NO_MAIN = [
1027+
"shared_coverage_state.cc",
1028+
"shared_coverage_state.h",
10271029
"byte_array_mutator.cc",
10281030
"byte_array_mutator.h",
10291031
"callstack.h",
@@ -1202,6 +1204,40 @@ cc_library(
12021204
],
12031205
)
12041206

1207+
cc_library(
1208+
name = "shared_coverage",
1209+
srcs = [
1210+
"runner_dl_info.cc",
1211+
"runner_sancov.cc",
1212+
"runner_sancov_object.cc",
1213+
"runner_utils.cc",
1214+
"shared_coverage_state.cc",
1215+
"@com_google_fuzztest//common:defs.h",
1216+
],
1217+
hdrs = [
1218+
"runner_dl_info.h",
1219+
"runner_interface.h",
1220+
"runner_sancov_object.h",
1221+
"runner_utils.h",
1222+
"shared_coverage_state.h",
1223+
],
1224+
deps = [
1225+
":callstack",
1226+
":feature",
1227+
":foreach_nonzero",
1228+
":int_utils",
1229+
":mutation_input",
1230+
":pc_info",
1231+
":reverse_pc_table",
1232+
":runner_cmp_trace",
1233+
":runner_result",
1234+
"@abseil-cpp//absl/base:core_headers",
1235+
"@abseil-cpp//absl/base:nullability",
1236+
"@abseil-cpp//absl/numeric:bits",
1237+
"@abseil-cpp//absl/types:span",
1238+
],
1239+
)
1240+
12051241
# Flags for :seed_corpus_maker.
12061242
cc_library(
12071243
name = "seed_corpus_maker_flags",

0 commit comments

Comments
 (0)