SerenityOS / serenity

The Serenity Operating System 🐞
https://serenityos.org
BSD 2-Clause "Simplified" License
30.45k stars 3.18k forks source link

Fuzzers: `AK/Coroutine.h` causes the fuzzer build to fail #24578

Closed tcl3 closed 3 months ago

tcl3 commented 3 months ago

The fuzzer build is currently failing with the following error:

/src/serenity/Meta/Lagom/../../AK/Coroutine.h:11:10: fatal error: 'coroutine' file not found
   11 | #include <coroutine>
      |          ^~~~~~~~~~~
1 error generated

Here is the full build log.

BertalanD commented 3 months ago

Looks like the oss-fuzz Docker images are based on Ubuntu 20.04. Assuming Clang uses the system's default C++ standard library even in the fuzzer config, this error is expected: 20.04 ships with GCC 9, but <coroutine> was introduced in version 10.

A possible fix would be to build with -stdlib=libc++ -- libc++ 18 is definitely new enough for us.