llvm/compiler-rt/lib/fuzzer/FuzzerExtFunctions.def

//===- FuzzerExtFunctions.def - External functions --------------*- C++ -* ===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// This defines the external function pointers that
// ``fuzzer::ExternalFunctions`` should contain and try to initialize.  The
// EXT_FUNC macro must be defined at the point of inclusion. The signature of
// the macro is:
//
// EXT_FUNC(<name>, <return_type>, <function_signature>, <warn_if_missing>)
//===----------------------------------------------------------------------===//

// Optional user functions
EXT_FUNC(LLVMFuzzerInitialize, int, (argcLLVMFuzzerInitialize;
EXT_FUNC(LLVMFuzzerCustomMutator, size_t,
         (DataLLVMFuzzerCustomMutator;
EXT_FUNC(LLVMFuzzerCustomCrossOver, size_t,
         (Data1LLVMFuzzerCustomCrossOver;

// Sanitizer functions
EXT_FUNC(__lsan_enable, void, (), false);
EXT_FUNC(__lsan_disable, void, (), false);
EXT_FUNC(__lsan_do_recoverable_leak_check, int, (), false);
EXT_FUNC(__sanitizer_acquire_crash_state, int, (), true);
EXT_FUNC(__sanitizer_install_malloc_and_free_hooks, int,
         (malloc_hook__sanitizer_install_malloc_and_free_hooks;
EXT_FUNC(__sanitizer_log_write, void, (buf__sanitizer_log_write;
EXT_FUNC(__sanitizer_purge_allocator, void, (), false);
EXT_FUNC(__sanitizer_print_memory_profile, void, (size_t, size_t), false);
EXT_FUNC(__sanitizer_print_stack_trace, void, (), true);
EXT_FUNC(__sanitizer_symbolize_pc, void,
         (void__sanitizer_symbolize_pc;
EXT_FUNC(__sanitizer_get_module_and_offset_for_pc, int,
         (pc__sanitizer_get_module_and_offset_for_pc;
EXT_FUNC(__sanitizer_set_death_callback, void, (void__sanitizer_set_death_callback;
EXT_FUNC(__sanitizer_set_report_fd, void, (void__sanitizer_set_report_fd;
EXT_FUNC(__msan_scoped_disable_interceptor_checks, void, (), false);
EXT_FUNC(__msan_scoped_enable_interceptor_checks, void, (), false);
EXT_FUNC(__msan_unpoison, void, (const__msan_unpoison;
EXT_FUNC(__msan_unpoison_param, void, (n__msan_unpoison_param;