File tree Expand file tree Collapse file tree 1 file changed +22
-13
lines changed
Expand file tree Collapse file tree 1 file changed +22
-13
lines changed Original file line number Diff line number Diff line change @@ -30,21 +30,30 @@ def fuzz_function_exists?(file_path)
3030 exit ( 1 )
3131end
3232
33+ reader , writer = IO . pipe
34+
3335fork do
34- STDOUT . reopen ( '/dev/null' )
35- STDIN . reopen ( '/dev/null' )
36+ loop do
37+ puts "reading from IO pipe: #{ reader . gets . strip } "
38+ end
39+ end
3640
37- Coverage . start ( :all )
41+ loop do
42+ fork do
43+ STDOUT . reopen ( '/dev/null' )
44+ STDIN . reopen ( '/dev/null' )
3845
39- begin
40- load ( file_path )
41- fuzz ( Random . new . bytes ( 10 ) )
42- rescue => e
43- puts "Encountered an exception: #{ e } "
44- exit ( 1 )
45- end
46+ Coverage . start ( :all )
4647
47- p Coverage . result
48- end
48+ begin
49+ load ( file_path )
50+ fuzz ( Random . new . bytes ( 10 ) )
51+ rescue => e
52+ puts "Encountered an exception: #{ e } "
53+ exit ( 1 )
54+ end
4955
50- Process . wait
56+ writer . puts ( Coverage . result . hash )
57+ end
58+ Process . wait
59+ end
You can’t perform that action at this time.
0 commit comments