Skip to content

Commit 9009aed

Browse files
committed
[Mutation] print to stderr
1 parent dee0b70 commit 9009aed

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

src/mutation/mutator.ml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,7 +1742,7 @@ let mutate_inner_bb times llctx llm choice_fn importants =
17421742
if times = 0 then ([], None)
17431743
else
17441744
let mutation = choice_fn () in
1745-
L.info "mutation: %a" Domain.pp_mutation mutation;
1745+
Format.eprintf "[mutate_inner_bb] %a@." Domain.pp_mutation mutation;
17461746
(* L.debug "before:\n%s" (string_of_llmodule llm); *)
17471747
let mutation_result =
17481748
match mutation with
@@ -1755,14 +1755,12 @@ let mutate_inner_bb times llctx llm choice_fn importants =
17551755
(* | _ -> (None, None, None) *)
17561756
in
17571757
match mutation_result with
1758-
| _, Some llm ->
1759-
L.debug "mutant: %s" (string_of_llmodule llm);
1758+
| _, Some _llm ->
1759+
Format.eprintf "[mutate_inner_bb] good@.";
17601760
(* let f = choose_function llm in
17611761
reset_var_names f; *)
17621762
mutation_result
1763-
| _, None ->
1764-
L.debug "None";
1765-
loop (times - 1) ()
1763+
| _, None -> loop (times - 1) ()
17661764
in
17671765

17681766
loop times ()

src/seedcorpus/domain.ml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,7 @@ module CfgSeed = struct
150150
if !Config.score = Config.FuzzingMode.Constant then 4
151151
else
152152
let int_score = Float.to_int seed.score in
153-
if seed.covers then 12
154-
else if int_score >= 10 then 3
155-
else Int.sub 12 int_score
153+
if seed.covers then 12 else if int_score >= 10 then 3 else 12 - int_score
156154

157155
let name ?(parent : int option) seed =
158156
let hash = ALlvm.hash_llm seed.llm in

src/seedcorpus/sliced_cfg_edge_cov_based.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ let make llctx node_tbl (distmap : float Aflgo.DistanceTable.t) =
202202
let seeds =
203203
Sys.readdir seed_dir
204204
|> (fun x ->
205-
L.info "%d seeds found" (Array.length x);
206-
x)
205+
L.info "%d seeds found" (Array.length x);
206+
x)
207207
|> Array.to_list
208208
|> List.map (Filename.concat seed_dir)
209209
|> List.filter_map filter_seed

0 commit comments

Comments
 (0)