-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't know how to fix wasmtime's coverage build #3468
Comments
Thanks for reporting this and sorry for the trouble. Coverage should be running for C/C++ projects only, as of now, hm... This coverage build is used only for generating HTML reports, so the fuzzing quality or any other OSS-Fuzz bits aren't affected by this. We use https://clang.llvm.org/docs/SourceBasedCodeCoverage.html if you want to learn more, and for languages other than C/C++ we just skip the coverage job for now, until we reach some critical mass of fuzzers/users of a given language :) |
Ah, I see what's going on. The coverage build failure got opened before we started to skip coverage job for non C/C++ projects. After that change was made, no new bugs are being opened for such projects, but the one for wasmtime wasn't autoclosed. Same for mtail (written in Go). I've just WontFix'ed both. If you know how to generate code coverage reports for Rust, we can discuss it in #3469, but I should say it's not likely that we'll add a support for it soon. We'd love to get more Rust projects signed up first :) |
Oh heh that all makes sense, thanks for the info and quick resolution! |
When we first added wasmtime to oss-fuzz we quckly got a bug opened about the coverage build failing. Checking out the build log the end of it has failures that look like:
Notably it looks like no
*.profraw
or*.profdata
entries are getting emitted by the fuzzers. This is almost for sure due to how wasmtime is a Rust project and the Rust integration with oss-fuzz isn't complete in some way.I'm curious though if we could get some help in deciphering this a bit? I believe these files are supposed to be generated by instrumentation in LLVM, for example I've seen them get generated for PGO builds of Rust at some point. I'm not entirely sure how the fuzzers are supposed to generate them though. Is there an example of what this looks like in C/C++ to see what we need to mirror into Rust? Or is it known what LLVM intrinsic libraries are necessary to get linked in (or passes to run?) that we need to configure rustc to execute? Additionally I wasn't entirely sure how we would know to change our build to a "coverage mode" because at least reading the build logs I didn't see env vars or such indicating that we should be building the fuzzers a different way.
Another question may just be if this is that relevant to fix. Are we perhaps losing out on the quality of fuzzing because we don't have this coverage information?
In any case any help in debugging this would be much appreciated! I also wasn't sure how to reproduce and poke around locally, so if there's a one-liner for that I can dig more in locally myself too.
The text was updated successfully, but these errors were encountered: