about summary refs log tree commit diff
path: root/llvm_mode/compare-transform-pass.so.cc
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-07-21 13:15:59 +0200
committerGitHub <noreply@github.com>2020-07-21 13:15:59 +0200
commitb6e65f98827470745d7df5cf1e38b506b9e839b0 (patch)
tree602abd8c1a1929aebda3f80665ffe02b435fdd00 /llvm_mode/compare-transform-pass.so.cc
parentfc5cfc6cb309b072a45b991be117c17396e46a89 (diff)
parentc2b04bdf6c596f5d220f27caead20d09452ed42d (diff)
downloadafl++-b6e65f98827470745d7df5cf1e38b506b9e839b0.tar.gz
Merge pull request #461 from AFLplusplus/new_splicing
New splicing
Diffstat (limited to 'llvm_mode/compare-transform-pass.so.cc')
-rw-r--r--llvm_mode/compare-transform-pass.so.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm_mode/compare-transform-pass.so.cc b/llvm_mode/compare-transform-pass.so.cc
index 96abeebb..2f165ea6 100644
--- a/llvm_mode/compare-transform-pass.so.cc
+++ b/llvm_mode/compare-transform-pass.so.cc
@@ -58,7 +58,7 @@ class CompareTransform : public ModulePass {
   static char ID;
   CompareTransform() : ModulePass(ID) {
 
-    initWhitelist();
+    initInstrumentList();
 
   }
 
@@ -124,7 +124,7 @@ bool CompareTransform::transformCmps(Module &M, const bool processStrcmp,
    * strcmp/memcmp/strncmp/strcasecmp/strncasecmp */
   for (auto &F : M) {
 
-    if (!isInWhitelist(&F)) continue;
+    if (!isInInstrumentList(&F)) continue;
 
     for (auto &BB : F) {
 
@@ -474,8 +474,8 @@ bool CompareTransform::transformCmps(Module &M, const bool processStrcmp,
       if (cur_lenchk_bb) {
 
         IRBuilder<> cur_lenchk_IRB(&*(cur_lenchk_bb->getFirstInsertionPt()));
-        Value *     icmp = cur_lenchk_IRB.CreateICmpEQ(sizedValue,
-                                                  ConstantInt::get(Int64Ty, i));
+        Value *     icmp = cur_lenchk_IRB.CreateICmpEQ(
+            sizedValue, ConstantInt::get(sizedValue->getType(), i));
         cur_lenchk_IRB.CreateCondBr(icmp, end_bb, cur_cmp_bb);
         cur_lenchk_bb->getTerminator()->eraseFromParent();