-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
oss-fuzz clang issues #9989
Comments
@oliverchang, I guess it is safer to update |
It's possible, but probably something we should avoid. @jonathanmetzman thoughts? @amodra do you have any details on what particular bug/issue with with Clang 15 causes these? |
The binutils fuzzer issues that I mentioned are all in the setjmp return path after a longjmp. The source being compiled, i386-dis.c, does have a problem in that local variable accessed on that path are not volatile, but making them volatile doesn't help with the version of clang used by oss-fuzz. See https://sourceware.org/pipermail/binutils/2023-March/126757.html My logs show the problem i386-dis.c compile as: (Yes, I have some local mods to projects/binutils/build.sh to substitute -gline-tables-only with -g in CFLAGS and to pass V=1 to make in order to show the compiler command line.) |
Thanks! Can you confirm if this is fixed in more recent Clang versions? |
I can confirm that Ubuntu clang version 15.0.6 compiles binutils OK using and does not segfault on the problem oss-fuzz testcases. That isn't the same as saying that oss-fuzz will work fine with clang-15.0.6 of course, and I may have missed something critical about the centipede fuzzer build. I'm a complete newbie when it comes to using docker and the oss-fuzz build scripts.. |
cf #9397 Alan ;-) |
I'm fine with a single project using their own clang. |
Clang 15.0.0 rather than Clang 15.0.x (where X is > 3) is also the cause of the current https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=58457&sort=-opened&can=1&q=proj%3Aserenity Is updating the version of clang used in https://github.com/google/oss-fuzz/blob/f9401119d859e7837e2bf0b7c7c4b73b339dd6d2/projects/serenity/Dockerfile as easy as opening a PR, or are there other infra steps required? |
I think that should be fine, WDYT @jonathanmetzman? |
We were able to work around the issue with SerenityOS/serenity@872e18f (apparently Apple Clang from Xcode 14.3 has the same issue), so I don't think it'll be required for serenity right this second. The question remains open on how to customize the llvm version in our docker container if Apple clang's C++20 support surpasses the llvm commit used by oss-fuzz though (or how to help push through the llvm updates more globally :) ) |
Yeah we're fine with you update your own clang, but you are in warranty void territory (not that there's othewise a warranty :-) |
clang 15 segfaults on linking fuzzing binaries, see #10448 (comment) |
There's no right way because we don't encourage [ ;-) ] this. But I think using the ppa works well |
I presume one would need to link to the oss-fuzz libfuzzer and libc++, or does using libfuzzer/libc++ from the llvm-16 apt work in theory as well? cc @fanquake |
I'll have a look |
Is there a plan/timeline for the Also, has an epoch solution been considered? |
Also piling on as I'm unable to get google/pigweed to build using oss-fuzz's system clang-15 toolchain. At the moment, pigweed is using a vendored clang-18 version from cipd, but it's hard to get this to work with AFL as the clang wrappers aren't vendored into the project. |
I think we are going to have to consider something like this. @jonathanmetzman WDYT? |
There will be quite a few hiccups with doing versioning, such as having fuzzers that are out of date if we are using an old base-builder. Maybe we should do something different like upload clang builds to a bucket for later downloading and installation. |
Food for thought: macos 15 will probably be released this summer, which will probably, if the trend continues, Currently, oss-fuzz comes with LLVM15-ish. While it would be nice for oss-fuzz |
oss-fuzz comes with LLVM15-ish, but that (aside from macOS, which comes with LLVM16), is the only libc++-based distro, so it looks like we can get away with requiring libc++-16. It is a pity that we have to support clang-15, but that is much more invasive of a change. Refs. google/oss-fuzz#9989
oss-fuzz comes with LLVM15-ish, but that (aside from macOS, which comes with LLVM16), is the only libc++-based distro, so it looks like we can get away with requiring libc++-16. It is a pity that we have to support clang-15, but that is much more invasive of a change. Refs. google/oss-fuzz#9989
oss-fuzz comes with LLVM15-ish, but that (aside from macOS, which comes with LLVM16), is the only libc++-based distro, so it looks like we can get away with requiring libc++-16. It is a pity that we have to support clang-15, but that is much more invasive of a change. Refs. google/oss-fuzz#9989
With #8108 now closed, what is the best way to track progress on bumping As an aside I'm still confused why oss-fuzz uses a chromium-managed commit instead of using a public release tag. The llvm-project releases have a lot of back ports for bugs discovered after the initial -init for a branch. Not using them makes it tricky to ensure that the compiler used for fuzzing matches other CI. |
This was fixed today in #11714 and can be closed? |
Indeed, thank you very much once again @maflcko! |
Bugs in clang version 15.0.0 (https://github.com/llvm/llvm-project.git bf7f8d6fa6f460bf0a16ffec319cd71592216bf4) used by oss-fuzz are the cause of binutils issues 57127, 57050, 57042, and 57041. An update to clang from a release branch would be welcome.
The text was updated successfully, but these errors were encountered: