Skip to content

Commit c0be67d

Browse files
xinhaoyuancopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 944563827
1 parent d1dc134 commit c0be67d

7 files changed

Lines changed: 351 additions & 400 deletions

File tree

‎centipede/BUILD‎

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -984,35 +984,6 @@ cc_library(
984984
# This has no dependency and only uses string, pair and vector.
985985
)
986986

987-
cc_library(
988-
name = "engine_worker",
989-
srcs = [
990-
"engine_worker.cc",
991-
],
992-
hdrs = ["engine_worker_abi.h"],
993-
deps = [
994-
":engine_abi",
995-
":execution_metadata",
996-
":feature",
997-
":runner_request",
998-
":runner_result",
999-
":runner_utils",
1000-
":shared_memory_blob_sequence",
1001-
"@abseil-cpp//absl/base:nullability",
1002-
"@com_google_fuzztest//common:defs",
1003-
],
1004-
)
1005-
1006-
cc_library(
1007-
name = "engine_controller_with_subprocess",
1008-
srcs = ["engine_controller_with_subprocess.cc"],
1009-
hdrs = ["engine_controller_abi.h"],
1010-
deps = [
1011-
"@com_google_fuzztest//centipede:engine_abi",
1012-
"@com_google_fuzztest//fuzztest/internal:escaping",
1013-
],
1014-
)
1015-
1016987
# The runner library is special:
1017988
# * It must not be instrumented with asan, sancov, etc.
1018989
# * It must not have heavy dependencies, and ideally not at all.
@@ -1033,8 +1004,6 @@ RUNNER_SOURCES_NO_MAIN = [
10331004
"runner_dl_info.cc",
10341005
"runner_dl_info.h",
10351006
"runner_interface.h",
1036-
"runner_utils.cc",
1037-
"runner_utils.h",
10381007
"sancov_callbacks.cc",
10391008
"sancov_interceptors.cc",
10401009
"sancov_object_array.cc",
@@ -1081,11 +1050,12 @@ RUNNER_DEPS = [
10811050
":knobs",
10821051
":mutation_data",
10831052
":rolling_hash",
1084-
":engine_abi",
10851053
":runner_cmp_trace",
1086-
":runner_fork_server",
10871054
":runner_request",
10881055
":runner_result",
1056+
":runner_utils",
1057+
":engine_abi",
1058+
":engine_worker",
10891059
":shared_memory_blob_sequence",
10901060
"@com_google_fuzztest//common:defs",
10911061
"@abseil-cpp//absl/base:core_headers",
@@ -1094,6 +1064,37 @@ RUNNER_DEPS = [
10941064
"@abseil-cpp//absl/types:span",
10951065
]
10961066

1067+
cc_library(
1068+
name = "engine_worker",
1069+
srcs = [
1070+
"engine_worker.cc",
1071+
],
1072+
hdrs = ["engine_worker_abi.h"],
1073+
copts = RUNNER_COPTS,
1074+
deps = [
1075+
":engine_abi",
1076+
":execution_metadata",
1077+
":feature",
1078+
":runner_fork_server",
1079+
":runner_request",
1080+
":runner_result",
1081+
":runner_utils",
1082+
":shared_memory_blob_sequence",
1083+
"@abseil-cpp//absl/base:nullability",
1084+
"@com_google_fuzztest//common:defs",
1085+
],
1086+
)
1087+
1088+
cc_library(
1089+
name = "engine_controller_with_subprocess",
1090+
srcs = ["engine_controller_with_subprocess.cc"],
1091+
hdrs = ["engine_controller_abi.h"],
1092+
deps = [
1093+
"@com_google_fuzztest//centipede:engine_abi",
1094+
"@com_google_fuzztest//fuzztest/internal:escaping",
1095+
],
1096+
)
1097+
10971098
# A fuzz target needs to link with this library in order to run with Centipede.
10981099
# The fuzz target must provide its own main().
10991100
#

‎centipede/centipede_callbacks.cc‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,8 +617,9 @@ int CentipedeCallbacks::ExecuteCentipedeSancovBinaryWithShmem(
617617
ReadFromLocalFile(failure_description_path_,
618618
batch_result.failure_description());
619619
if (std::filesystem::exists(failure_signature_path_)) {
620-
ReadFromLocalFile(failure_signature_path_,
621-
batch_result.failure_signature());
620+
std::string plain_signature;
621+
ReadFromLocalFile(failure_signature_path_, plain_signature);
622+
batch_result.failure_signature() = Hash(plain_signature);
622623
} else {
623624
// Crash deduplication assumes that the failure signature contains no
624625
// dashes and that it can be used as a file name.

0 commit comments

Comments
 (0)