Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 35 additions & 33 deletions centipede/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -984,35 +984,6 @@ cc_library(
# This has no dependency and only uses string, pair and vector.
)

cc_library(
name = "engine_worker",
srcs = [
"engine_worker.cc",
],
hdrs = ["engine_worker_abi.h"],
deps = [
":engine_abi",
":execution_metadata",
":feature",
":runner_request",
":runner_result",
":runner_utils",
":shared_memory_blob_sequence",
"@abseil-cpp//absl/base:nullability",
"@com_google_fuzztest//common:defs",
],
)

cc_library(
name = "engine_controller_with_subprocess",
srcs = ["engine_controller_with_subprocess.cc"],
hdrs = ["engine_controller_abi.h"],
deps = [
"@com_google_fuzztest//centipede:engine_abi",
"@com_google_fuzztest//fuzztest/internal:escaping",
],
)

# The runner library is special:
# * It must not be instrumented with asan, sancov, etc.
# * It must not have heavy dependencies, and ideally not at all.
Expand All @@ -1033,8 +1004,6 @@ RUNNER_SOURCES_NO_MAIN = [
"runner_dl_info.cc",
"runner_dl_info.h",
"runner_interface.h",
"runner_utils.cc",
"runner_utils.h",
"sancov_callbacks.cc",
"sancov_interceptors.cc",
"sancov_object_array.cc",
Expand Down Expand Up @@ -1081,19 +1050,52 @@ RUNNER_DEPS = [
":knobs",
":mutation_data",
":rolling_hash",
":engine_abi",
":runner_cmp_trace",
":runner_fork_server",
":runner_request",
":runner_result",
":runner_utils",
":engine_abi",
":engine_worker",
":shared_memory_blob_sequence",
"@com_google_fuzztest//common:defs",
"@com_google_fuzztest//common:hash",
"@abseil-cpp//absl/base:core_headers",
"@abseil-cpp//absl/base:nullability",
"@abseil-cpp//absl/numeric:bits",
"@abseil-cpp//absl/types:span",
]

cc_library(
name = "engine_worker",
srcs = [
"engine_worker.cc",
],
hdrs = ["engine_worker_abi.h"],
copts = RUNNER_COPTS,
deps = [
":engine_abi",
":execution_metadata",
":feature",
":runner_fork_server",
":runner_request",
":runner_result",
":runner_utils",
":shared_memory_blob_sequence",
"@abseil-cpp//absl/base:nullability",
"@com_google_fuzztest//common:defs",
],
)

cc_library(
name = "engine_controller_with_subprocess",
srcs = ["engine_controller_with_subprocess.cc"],
hdrs = ["engine_controller_abi.h"],
deps = [
"@com_google_fuzztest//centipede:engine_abi",
"@com_google_fuzztest//fuzztest/internal:escaping",
],
)

# A fuzz target needs to link with this library in order to run with Centipede.
# The fuzz target must provide its own main().
#
Expand Down
5 changes: 3 additions & 2 deletions centipede/centipede_callbacks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,9 @@ int CentipedeCallbacks::ExecuteCentipedeSancovBinaryWithShmem(
ReadFromLocalFile(failure_description_path_,
batch_result.failure_description());
if (std::filesystem::exists(failure_signature_path_)) {
ReadFromLocalFile(failure_signature_path_,
batch_result.failure_signature());
std::string plain_signature;
ReadFromLocalFile(failure_signature_path_, plain_signature);
batch_result.failure_signature() = Hash(plain_signature);
} else {
// Crash deduplication assumes that the failure signature contains no
// dashes and that it can be used as a file name.
Expand Down
Loading
Loading