aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-11-02 17:34:58 +0100
committervan Hauser <vh@thc.org>2020-11-02 17:34:58 +0100
commit050354a9deeece1249f3f5a8172328b4523c5b7f (patch)
tree50cce5d72d50ec1f1be62494c2f710533a164194
parent26d78ce2eca33d58e1195b5e733c850496c57cec (diff)
downloadafl++-050354a9deeece1249f3f5a8172328b4523c5b7f.tar.gz
code-format
-rw-r--r--examples/qemu_persistent_hook/read_into_rdi.c9
-rw-r--r--instrumentation/SanitizerCoveragePCGUARD.so.cc22
2 files changed, 17 insertions, 14 deletions
diff --git a/examples/qemu_persistent_hook/read_into_rdi.c b/examples/qemu_persistent_hook/read_into_rdi.c
index 1977c89f..f4a8ae59 100644
--- a/examples/qemu_persistent_hook/read_into_rdi.c
+++ b/examples/qemu_persistent_hook/read_into_rdi.c
@@ -3,11 +3,9 @@
#include <stdio.h>
#include <string.h>
-void afl_persistent_hook(struct x86_64_regs *regs,
- uint64_t guest_base,
- uint8_t *input_buf,
- uint32_t input_buf_len) {
-
+void afl_persistent_hook(struct x86_64_regs *regs, uint64_t guest_base,
+ uint8_t *input_buf, uint32_t input_buf_len) {
+\
#define g2h(x) ((void *)((unsigned long)(x) + guest_base))
#define h2g(x) ((uint64_t)(x)-guest_base)
@@ -33,3 +31,4 @@ int afl_persistent_hook_init(void) {
return 1;
}
+
diff --git a/instrumentation/SanitizerCoveragePCGUARD.so.cc b/instrumentation/SanitizerCoveragePCGUARD.so.cc
index 934db3de..772a6f60 100644
--- a/instrumentation/SanitizerCoveragePCGUARD.so.cc
+++ b/instrumentation/SanitizerCoveragePCGUARD.so.cc
@@ -70,15 +70,17 @@ class ModuleSanitizerCoveragePass
if (AllowlistFiles.size() > 0)
Allowlist = SpecialCaseList::createOrDie(AllowlistFiles
#if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0)
- , *vfs::getRealFileSystem()
+ ,
+ *vfs::getRealFileSystem()
#endif
- );
+ );
if (BlocklistFiles.size() > 0)
Blocklist = SpecialCaseList::createOrDie(BlocklistFiles
#if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0)
- , *vfs::getRealFileSystem()
+ ,
+ *vfs::getRealFileSystem()
#endif
- );
+ );
}
@@ -253,7 +255,7 @@ SanitizerCoverageOptions OverrideFromCL(SanitizerCoverageOptions Options) {
Options.CoverageType =
SanitizerCoverageOptions::SCK_Edge; // std::max(Options.CoverageType,
// CLOpts.CoverageType);
- Options.IndirectCalls = false; // CLOpts.IndirectCalls;
+ Options.IndirectCalls = false; // CLOpts.IndirectCalls;
Options.TraceCmp = false; //|= ClCMPTracing;
Options.TraceDiv = false; //|= ClDIVTracing;
Options.TraceGep = false; //|= ClGEPTracing;
@@ -379,15 +381,17 @@ class ModuleSanitizerCoverageLegacyPass : public ModulePass {
if (AllowlistFiles.size() > 0)
Allowlist = SpecialCaseList::createOrDie(AllowlistFiles
#if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0)
- , *vfs::getRealFileSystem()
+ ,
+ *vfs::getRealFileSystem()
#endif
- );
+ );
if (BlocklistFiles.size() > 0)
Blocklist = SpecialCaseList::createOrDie(BlocklistFiles
#if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0)
- , *vfs::getRealFileSystem()
+ ,
+ *vfs::getRealFileSystem()
#endif
- );
+ );
initializeModuleSanitizerCoverageLegacyPassPass(
*PassRegistry::getPassRegistry());