Skip to content

Commit

Permalink
Speculative fix for untrusted exception. (#931)
Browse files Browse the repository at this point in the history
Convert protobuf sequences to python lists when receiving responses from
worker. Otherwise things may not work as expected on these values (e.g.
JSON serialisation).
  • Loading branch information
oliverchang authored Sep 3, 2019
1 parent a26c090 commit 22b1a23
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/python/bot/untrusted_runner/tasks_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ def process_testcase(engine_name, tool_name, target_name, arguments,
rebased_output_path = file_host.rebase_to_worker_root(output_path)
file_host.copy_file_from_worker(rebased_output_path, output_path)

return engine.ReproduceResult(response.command, response.return_code,
response.time_executed, response.output)
return engine.ReproduceResult(
list(response.command), response.return_code, response.time_executed,
response.output)


def engine_fuzz(engine_impl, target_name, sync_corpus_directory,
Expand Down Expand Up @@ -158,7 +159,7 @@ def engine_fuzz(engine_impl, target_name, sync_corpus_directory,

result = engine.FuzzResult(
logs=response.logs,
command=response.command,
command=list(response.command),
crashes=crashes,
stats=unpacked_stats,
time_executed=response.time_executed)
Expand Down Expand Up @@ -190,5 +191,6 @@ def engine_reproduce(engine_impl, target_name, testcase_path, arguments,
else:
raise

return engine.ReproduceResult(response.command, response.return_code,
response.time_executed, response.output)
return engine.ReproduceResult(
list(response.command), response.return_code, response.time_executed,
response.output)

0 comments on commit 22b1a23

Please sign in to comment.