cranelift-frontend: Allow jump table reuse (#4429)
* Allow using jump-tables multiple times (fixes #3347) If there are multiple `br_table` instructions using the same jump table, then `append_jump_argument` must not modify the jump table in-place. When this function is called, we don't know if more `br_table` instructions might be added later. So this patch conservatively assumes that all jump tables might be reused. If Cranelift needs to add a block argument to a block that's the target of some jump table, then the jump table will be unconditionally cloned. I'm not sure if having duplicated and unused jump tables will turn out to be a compile-time performance issue. If it is, there's discussion in issue #3347 about ways to determine that there can't be any more uses of a jump table, so that it's safe to modify in-place. * Re-enable cranelift-fuzzgen fuzz target I've been running this fuzz target for an hour without finding new bugs. Let's see if oss-fuzz finds anything now.
This commit is contained in:
@@ -85,16 +85,11 @@ path = "fuzz_targets/compile-maybe-invalid.rs"
|
||||
test = false
|
||||
doc = false
|
||||
|
||||
# FIXME: the cranelift-fuzzgen fuzz targets are temporarily disabled until
|
||||
# the crashes they're finding are fixed. One issue is #3347 but otherwise the
|
||||
# oss-fuzz bots are reporting a 100% crash rate with these fuzzers so there may
|
||||
# be more issues as well. It's recommended to locally run these fuzzers for a
|
||||
# few hours locally before re-enabling.
|
||||
# [[bin]]
|
||||
# name = "cranelift-fuzzgen"
|
||||
# path = "fuzz_targets/cranelift-fuzzgen.rs"
|
||||
# test = false
|
||||
# doc = false
|
||||
[[bin]]
|
||||
name = "cranelift-fuzzgen"
|
||||
path = "fuzz_targets/cranelift-fuzzgen.rs"
|
||||
test = false
|
||||
doc = false
|
||||
|
||||
[[bin]]
|
||||
name = "instantiate-many"
|
||||
|
||||
Reference in New Issue
Block a user