code-format

This commit is contained in:
van Hauser
2020-11-02 17:34:58 +01:00
parent 26d78ce2ec
commit 050354a9de
2 changed files with 17 additions and 14 deletions

View File

@ -3,11 +3,9 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
void afl_persistent_hook(struct x86_64_regs *regs, void afl_persistent_hook(struct x86_64_regs *regs, uint64_t guest_base,
uint64_t guest_base, uint8_t *input_buf, uint32_t input_buf_len) {
uint8_t *input_buf, \
uint32_t input_buf_len) {
#define g2h(x) ((void *)((unsigned long)(x) + guest_base)) #define g2h(x) ((void *)((unsigned long)(x) + guest_base))
#define h2g(x) ((uint64_t)(x)-guest_base) #define h2g(x) ((uint64_t)(x)-guest_base)
@ -33,3 +31,4 @@ int afl_persistent_hook_init(void) {
return 1; return 1;
} }

View File

@ -70,13 +70,15 @@ class ModuleSanitizerCoveragePass
if (AllowlistFiles.size() > 0) if (AllowlistFiles.size() > 0)
Allowlist = SpecialCaseList::createOrDie(AllowlistFiles Allowlist = SpecialCaseList::createOrDie(AllowlistFiles
#if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0) #if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0)
, *vfs::getRealFileSystem() ,
*vfs::getRealFileSystem()
#endif #endif
); );
if (BlocklistFiles.size() > 0) if (BlocklistFiles.size() > 0)
Blocklist = SpecialCaseList::createOrDie(BlocklistFiles Blocklist = SpecialCaseList::createOrDie(BlocklistFiles
#if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0) #if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0)
, *vfs::getRealFileSystem() ,
*vfs::getRealFileSystem()
#endif #endif
); );
@ -379,13 +381,15 @@ class ModuleSanitizerCoverageLegacyPass : public ModulePass {
if (AllowlistFiles.size() > 0) if (AllowlistFiles.size() > 0)
Allowlist = SpecialCaseList::createOrDie(AllowlistFiles Allowlist = SpecialCaseList::createOrDie(AllowlistFiles
#if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0) #if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0)
, *vfs::getRealFileSystem() ,
*vfs::getRealFileSystem()
#endif #endif
); );
if (BlocklistFiles.size() > 0) if (BlocklistFiles.size() > 0)
Blocklist = SpecialCaseList::createOrDie(BlocklistFiles Blocklist = SpecialCaseList::createOrDie(BlocklistFiles
#if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0) #if LLVM_MAJOR > 10 || (LLVM_MAJOR == 10 && LLVM_MINOR > 0)
, *vfs::getRealFileSystem() ,
*vfs::getRealFileSystem()
#endif #endif
); );
initializeModuleSanitizerCoverageLegacyPassPass( initializeModuleSanitizerCoverageLegacyPassPass(