Coder Social home page Coder Social logo

Comments (7)

stoklund avatar stoklund commented on August 27, 2024

Fuzzing is a great idea. It will definitely find some parser bugs.

I wonder how well it will work for the deeper parts of the compiler. I suspect that the initial verifier pass will reject most of the fuzzer's attempts.

from wasmtime.

stoklund avatar stoklund commented on August 27, 2024

The llvm-stress program is a different approach to compiler fuzzing. It generates random, but valid LLVM input. I think this approach could be combined with cargo-fuzz to make it more likely to tickle deeper parts of the compiler.

CSMith was very successful at finding compiler bugs by generating random but correct C programs that print the state of their globals before exiting. It works by comparing outputs from programs compiled with different compilers. A similar tool for WebAssembly would be very useful.

from wasmtime.

anholt avatar anholt commented on August 27, 2024

The underlying fuzzer is libFuzzer, and it seems to be quite good at drilling down to useful syntax quickly even in the absence of an input corpus. We'll be generating some corpus for our manual testcases, though, so that should make things even easier.

The failure I found sounds like it's actually rust-lang/rust#39882, so we'll have to wait until that's resolved to see value from cargo-fuzz, I think.

from wasmtime.

stoklund avatar stoklund commented on August 27, 2024

Is it possible to run cargo-fuzz without the sanitizers enabled? Cretonne contains almost no unsafe code, so they are not likely to add much value anyway.

from wasmtime.

stoklund avatar stoklund commented on August 27, 2024

Maybe add -C overflow-checks=on to a release build for fuzzing.

from wasmtime.

bjorn3 avatar bjorn3 commented on August 27, 2024

Wasmtime and regalloc.rs are now being fuzzed. Should this be closed?

from wasmtime.

fitzgen avatar fitzgen commented on August 27, 2024

Yeah we have a fairly extensive suite of cargo fuzz targets running in oss-fuzz. While improvements to those are always appreciated, it looks like this issue isn't tracking any particular missing thing anymore.

from wasmtime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.