Stream: cranelift

Topic: Rustlantis and Cranelift


view this post on Zulip Alex Crichton (Nov 28 2023 at 20:04):

There's a paper going around about a new fuzzer for rustc called Rustlantis. I haven't read it in full yet but I found this part interesting:

Cranelift [13] is a machine code generator developed by Bytecode Alliance.
It translates Cranelift IR into target-specific machine instructions. rustc can
generate Cranelift IR and use Cranelift as the machine code generator as an
alternative to LLVM IR and LLVM. It is comparatively new to LLVM and far
less widely used, therefore we hypothesised that it may contain more bugs
due to its immaturity.

...

Despite being new, Cranelift held up well with no bugs discovered by
Rustlantis. Of course, this is not proof that Cranelift is overall more correct
than LLVM, but it does serve as evidence in favour of Cranelift. This is likely
because it performs little optimisations and its developers have dedicated
fuzzing and formal verification efforts to ensure its correctness [13]:

Wanted to highlight this here and also link the paper. Props to bjorn3 for all the work on rustc_codegen_cranelift and all the fuzzing work on Wasmtime which likely led to this!

view this post on Zulip Alex Crichton (Nov 28 2023 at 20:09):

I also plan on reading this in full in the near future and seeing if it's got ideas we can take inspiration from to fold into wasm-smith

view this post on Zulip Chris Fallin (Nov 28 2023 at 22:30):

That's encouraging to read; thanks for digging that out!


Last updated: Dec 23 2024 at 12:05 UTC