Skip to content

Commit 9cb7fa5

Browse files
Fix issue dealing with lack of fuzz target picked by preprocess (#4367)
Handle this gracefully as it's needed for jobs.
1 parent 6eb6da1 commit 9cb7fa5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/clusterfuzz/_internal/bot/tasks/utasks/fuzz_task.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,6 +1754,10 @@ def run(self):
17541754
self.fuzz_task_output.fuzz_targets.extend(build_setup_result.fuzz_targets)
17551755
if not self.fuzz_task_output.fuzz_targets:
17561756
logs.error('No fuzz targets.')
1757+
if not self.fuzz_target:
1758+
return uworker_msg_pb2.Output( # pylint: disable=no-member
1759+
fuzz_task_output=self.fuzz_task_output,
1760+
error_type=uworker_msg_pb2.ErrorType.FUZZ_NO_FUZZ_TARGET_SELECTED) # pylint: disable=no-member
17571761

17581762
# Check if we have an application path. If not, our build failed
17591763
# to setup correctly.
@@ -1793,8 +1797,7 @@ def run(self):
17931797
return uworker_msg_pb2.Output( # pylint: disable=no-member
17941798
error_type=uworker_msg_pb2.ErrorType.FUZZ_DATA_BUNDLE_SETUP_FAILURE) # pylint: disable=no-member
17951799

1796-
engine_impl = engine.get(self.fuzzer.name)
1797-
if engine_impl:
1800+
if engine_impl and fuzz_target.binary:
17981801
crashes, fuzzer_metadata = self.do_engine_fuzzing(engine_impl)
17991802

18001803
# Not applicable to engine fuzzers.

0 commit comments

Comments
 (0)