Dan Liew | d3c3311 | 2016-06-02 05:48:02 +0000 | [diff] [blame] | 1 | //===- FuzzerExtFunctions.def - External functions --------------*- C++ -* ===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // This defines the external function pointers that |
| 10 | // ``fuzzer::ExternalFunctions`` should contain and try to initialize. The |
| 11 | // EXT_FUNC macro must be defined at the point of inclusion. The signature of |
| 12 | // the macro is: |
| 13 | // |
| 14 | // EXT_FUNC(<name>, <return_type>, <function_signature>, <warn_if_missing>) |
| 15 | //===----------------------------------------------------------------------===// |
| 16 | |
| 17 | // Optional user functions |
| 18 | EXT_FUNC(LLVMFuzzerInitialize, int, (int *argc, char ***argv), false); |
| 19 | EXT_FUNC(LLVMFuzzerCustomMutator, size_t, |
| 20 | (uint8_t * Data, size_t Size, size_t MaxSize, unsigned int Seed), |
| 21 | false); |
Mike Aizatsky | 41d6683 | 2016-06-07 20:22:15 +0000 | [diff] [blame] | 22 | EXT_FUNC(LLVMFuzzerCustomCrossOver, size_t, |
| 23 | (const uint8_t * Data1, size_t Size1, |
| 24 | const uint8_t * Data2, size_t Size2, |
| 25 | uint8_t * Out, size_t MaxOutSize, unsigned int Seed), |
| 26 | false); |
Dan Liew | d3c3311 | 2016-06-02 05:48:02 +0000 | [diff] [blame] | 27 | |
| 28 | // TODO: Sanitizer functions |