afonso360 opened PR #5034 from fuzzgen-reachable
to main
:
:wave: Hey,
This PR alters fuzzgen to always generate reachable blocks. See #5022 for context.
We do this by making sure that whenever we insert terminators at least one of the edges points to the next block.
Another thing this PR does is separate the CFG construction from block terminator insertion.
This fuzzed ok individually, but I'm now also testing with #5020 on top to see if it finds anything else.
cc: @jameysharp
jameysharp submitted PR review.
jameysharp created PR review comment:
I believe you can write this as:
.map(|_| u.choose(options).cloned())
jameysharp submitted PR review.
afonso360 updated PR #5034 from fuzzgen-reachable
to main
.
afonso360 updated PR #5034 from fuzzgen-reachable
to main
.
cfallin submitted PR review.
cfallin submitted PR review.
cfallin created PR review comment:
Comment here describing why these checks (brtable targets can't have blockparams)?
cfallin created PR review comment:
The vec of boxed closures here is a little awkward -- is it forced only because we want to use the
Arbitrary::choose()
function below to pick out of a list?I wonder if it would make sense to instead have something like
enum BlockTerminatorKind { Return, Jump, Cond, BrTable, ... }
and then match on that and do generation as required (i.e. have a
match kind { ... }
that evaluates to aBlockTerminator
)?
afonso360 submitted PR review.
afonso360 created PR review comment:
The vec of boxed closures here is a little awkward -- is it forced only because we want to use the Arbitrary::choose() function below to pick out of a list?
Yeah, exactly.
I wonder if it would make sense to instead have something like and then match on that and do generation as required (i.e. have a match kind { ... } that evaluates to a BlockTerminator)?
Sounds Good :+1:
afonso360 updated PR #5034 from fuzzgen-reachable
to main
.
afonso360 updated PR #5034 from fuzzgen-reachable
to main
.
afonso360 updated PR #5034 from fuzzgen-reachable
to main
.
cfallin submitted PR review.
cfallin merged PR #5034.
Last updated: Dec 23 2024 at 13:07 UTC