• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*===- DataFlow.h - a standalone DataFlow trace                     -------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 // Internal header file to connect DataFlow.cpp and DataFlowCallbacks.cpp.
9 //===----------------------------------------------------------------------===*/
10 
11 #ifndef __LIBFUZZER_DATAFLOW_H
12 #define __LIBFUZZER_DATAFLOW_H
13 
14 #include <cstddef>
15 #include <cstdint>
16 #include <sanitizer/dfsan_interface.h>
17 
18 // This data is shared between DataFlowCallbacks.cpp and DataFlow.cpp.
19 struct CallbackData {
20   size_t NumFuncs, NumGuards;
21   const uintptr_t *PCsBeg, *PCsEnd;
22   dfsan_label *FuncLabels;  // Array of NumFuncs elements.
23   bool *BBExecuted;         // Array of NumGuards elements.
24 };
25 
26 extern CallbackData __dft;
27 
28 enum {
29   PCFLAG_FUNC_ENTRY = 1,
30 };
31 
32 #endif  // __LIBFUZZER_DATAFLOW_H
33