about summary refs log tree commit diff
path: root/include/trace.h
diff options
context:
space:
mode:
authorHuanyao Rong <r3tr0spect2019@qq.com>2024-06-21 21:03:37 -0700
committerNguyễn Gia Phong <cnx@loang.net>2024-12-03 11:17:44 +0900
commitd04bdf2e841fa6706c16bbba1cb6f6c73d647767 (patch)
tree23393adc733e6e9e61d7eb226c90258870bb0624 /include/trace.h
parentcee3c86d7d5f0a05ad6cbb1434dc13162a16e336 (diff)
downloadafl++-d04bdf2e841fa6706c16bbba1cb6f6c73d647767.tar.gz
Implement AFLRun
References: https://github.com/Mem2019/AFLRun/commit/f5bb87f78ef1
References: https://github.com/Mem2019/AFLRun/commit/3af5f11b5644
Diffstat (limited to 'include/trace.h')
-rw-r--r--include/trace.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/trace.h b/include/trace.h
new file mode 100644
index 00000000..f7253ac7
--- /dev/null
+++ b/include/trace.h
@@ -0,0 +1,19 @@
+#ifndef _HAVE_TRACE_H
+#define _HAVE_TRACE_H
+
+#ifdef __cplusplus
+#include <atomic>
+using namespace std;
+#else
+#include <stdatomic.h>
+#endif
+
+typedef struct _trace_t {
+#ifdef AFLRUN_OVERHEAD
+  atomic_ullong overhead;
+#endif // AFLRUN_OVERHEAD
+  atomic_size_t num;
+  ctx_t trace[];
+} trace_t;
+
+#endif