You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've locally started setting up OSS fuzz and Rust recently, but we're
unfortunately getting a lot of timeouts where tests are taking much
longer than expected. After some investigation one cause of the issue
seems to be that although we're compiling the fuzzers in release mode
they're still performing quite badly at runtime.
One cause of this appears to be that functions are not being inlined
across CGUs within a crate, and digging even further seems to show that
functions are tagged with `notEligibleToImport` which presumably means
that ThinLTO cannot import them across CGUs.
Poking around in LLVM it looks like the sancov passes add mutations of a
private `__sancov_gen_` global in all functions in a CGU, and then that
global itself is listed as not importable. Any function referencing
something not importable is then also considered not importable, hence
nothing in any CGU is importable.
With this change, however, the performance of optimized-Rust being
sanitized is unfortunately still ~100x slower than non-sanitized Rust. I
don't think the overhead is supposed to be that high so I'm still
looking into other causes of slowness.
0 commit comments