[PATCH] D20943: [LibFuzzer] [WIP] Declare and use sanitizer functions in ``fuzzer::ExternalFunctions``

Dan Liew via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 2 18:51:16 PDT 2016


delcypher added a comment.

@kcc: There are a bunch of problems here that need resolving

- I've hacked the `CHECK_WEAK_API_FUNCTION` macro so that the tests pass on Linux but this is really bad. I'm thinking that it would be better to change the last argument ``EXT_FUNC`` to be an enum value (`enum { OK, WARN, ERROR};`) to indicate how a missing function should be handled and then change the implementations of `ExternalFunction::ExternalFunction` to abort as appropriate. That way we could get rid of the `CHECK_WEAK_API_FUNCTION` macro.

- I'm not 100% sure which external functions are required and which are just nice to have. I've just made educated guesses about what to warn about but I'm not sure If I have this right.

- There's still a linking issue on OSX. The `LLVMFuzzer-FourIndependentBranchesTest-TracePC` test (and probably other tests) fail to link due to having undefined reference to `_sanitizer_cov_trace_pc_indir`. I'm guessing LibFuzzer ought to provide an implementation but I'm surprised we don't hit this on Linux.

Thoughts?


http://reviews.llvm.org/D20943





More information about the llvm-commits mailing list