Skip to content

Commit 2cd8b18

Browse files
committed
comments and better output
1 parent 53c027f commit 2cd8b18

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

run.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ def start_reporting_process(reader)
2929
next
3030
end
3131

32-
seen[cov_hash] = Base64.strict_decode64(encoded_bytes).freeze
33-
puts(seen)
32+
decoded_bytes = Base64.strict_decode64(encoded_bytes).freeze
33+
seen[cov_hash] = decoded_bytes
34+
puts("Encountered new code path with input bytes: #{decoded_bytes.inspect}")
3435
end
3536
end
3637
end
@@ -40,6 +41,7 @@ def start_fuzzing_process(file_path, writer)
4041
STDOUT.reopen('/dev/null')
4142
STDIN.reopen('/dev/null')
4243
loop do
44+
# TODO: better input generation
4345
bytes = Random.new.bytes(10)
4446

4547
fork do
@@ -53,6 +55,7 @@ def start_fuzzing_process(file_path, writer)
5355
exit(1)
5456
end
5557

58+
# TODO: replace numbers in hash with booleans
5659
writer.puts(Base64.strict_encode64(bytes) + '_' + Coverage.result.hash.to_s)
5760
end
5861
Process.wait

0 commit comments

Comments
 (0)