Skip to content

Commit 0b38fab

Browse files
CmpLog {Instruction, Switches} pass (#1612)
* switch and instruction pass copy paste * FMT * add cb * put things in the functions * fi * working * oops * options * no 128bit int on windows * no 128bit on windows * oops * unix only * windows * PACKED * let's stop using it, it's ugly * fmt * adjust --------- Co-authored-by: Andrea Fioraldi <[email protected]>
1 parent 77dfc7a commit 0b38fab

File tree

9 files changed

+1280
-1
lines changed

9 files changed

+1280
-1
lines changed

libafl_cc/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,8 @@ pub const LIBAFL_CC_LLVM_VERSION: Option<usize> = None;
397397
"afl-coverage-pass.cc",
398398
"autotokens-pass.cc",
399399
"coverage-accounting-pass.cc",
400+
"cmplog-instructions-pass.cc",
401+
"cmplog-switches-pass.cc",
400402
] {
401403
build_pass(
402404
bindir_path,

libafl_cc/src/clang.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ pub enum LLVMPasses {
4141
CoverageAccounting,
4242
/// The dump cfg pass
4343
DumpCfg,
44+
#[cfg(unix)]
45+
/// The CmpLog Instruction pass
46+
CmpLogInstructions,
47+
#[cfg(unix)]
48+
/// The CmpLog Switch pass
49+
CmpLogSwitches,
4450
}
4551

4652
impl LLVMPasses {
@@ -60,6 +66,12 @@ impl LLVMPasses {
6066
LLVMPasses::DumpCfg => {
6167
PathBuf::from(env!("OUT_DIR")).join(format!("dump-cfg-pass.{}", dll_extension()))
6268
}
69+
#[cfg(unix)]
70+
LLVMPasses::CmpLogInstructions => PathBuf::from(env!("OUT_DIR"))
71+
.join(format!("cmplog-instructions-pass.{}", dll_extension())),
72+
#[cfg(unix)]
73+
LLVMPasses::CmpLogSwitches => PathBuf::from(env!("OUT_DIR"))
74+
.join(format!("cmplog-switches-pass.{}", dll_extension())),
6375
}
6476
}
6577
}

0 commit comments

Comments
 (0)