-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
compiler-rt:fuzzerquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
If you are writing a fuzzer the code will basically like this:
#include <cstddef>
#include <cstdint>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t*, size_t)
{
return 0;
}But this code will produce a warning:
clang-13 -fsanitize=fuzzer -Weverything -o main main.cpp
main.cpp:4:16: warning: no previous prototype for function 'LLVMFuzzerTestOneInput' [-Wmissing-prototypes]
extern "C" int LLVMFuzzerTestOneInput(const uint8_t*, size_t)
^
main.cpp:4:12: note: declare 'static' if the function is not intended to be used outside of this translation unit
extern "C" int LLVMFuzzerTestOneInput(const uint8_t*, size_t)
^
static
1 warning generated.
If you fix that warning it will obviously no longer link.
Metadata
Metadata
Assignees
Labels
compiler-rt:fuzzerquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!