Skip to content

Instantly share code, notes, and snippets.

View conrad-watt's full-sized avatar

Conrad Watt conrad-watt

View GitHub Profile
warning: `wasmtime` (lib) generated 1 warning
Compiling wasmtime-fuzz v0.0.0 (/home/conrad/wasmtime/fuzz)
error[E0433]: failed to resolve: use of undeclared crate or module `wasm_smith`
--> fuzz/fuzz_targets/differential_spec.rs:14:5
|
14 | wasm_smith::ConfiguredModule<oracles::SingleFunctionModuleConfig<false, false>>
| ^^^^^^^^^^ use of undeclared crate or module `wasm_smith`
error[E0412]: cannot find type `SingleFunctionModuleConfig` in module `oracles`
--> fuzz/fuzz_targets/differential_spec.rs:14:43

Irreducible control flow in Wasm

This is a summary of current discussions, and a follow-up to our recent meetings, prompted by the issue here. Anyone who's been following along with the last few weeks of discussions and presentations might wish to skip directly to the follow-up part.

What is irreducible control flow?

Reducible control flow is the control flow directly representable through semi-structured control flow constructs (loops, conditionals, and break/continue). It can be characterised in terms of a property of the control flow graph that all loops are single-entry. For more details, see the diagram and "Reducibility" subsection here.

Irreducible control flow is roughly "everything else". For example, goto into the middle of a loop would result in irreducible