summary refs log tree commit diff
path: root/libAflDyninst.cpp
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2018-03-14 16:32:35 +0100
committervan Hauser <vh@thc.org>2018-03-14 16:32:35 +0100
commit682b4f6b8a0d3244775e1c32563031cbd9277e24 (patch)
tree2a49d4ae7c64a7202b4170553191ac991676d866 /libAflDyninst.cpp
parent7867e610b5cffd2c0749703eca1333bdd7840824 (diff)
downloadafl-dyninst-682b4f6b8a0d3244775e1c32563031cbd9277e24.tar.gz
added -E and -D switches, -S switch repeatable, dyninst version check
Diffstat (limited to 'libAflDyninst.cpp')
-rw-r--r--libAflDyninst.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libAflDyninst.cpp b/libAflDyninst.cpp
index 51fa41d..43d5d78 100644
--- a/libAflDyninst.cpp
+++ b/libAflDyninst.cpp
@@ -22,7 +22,7 @@ static unsigned short prev_id;
 static long saved_di;
 register long rdi asm("di");  // the warning is fine - we need the warning because of a bug in dyninst
 
-#define PRINT_ERROR(string) write(2, string, strlen(string))
+#define PRINT_ERROR(string) (void)(write(2, string, strlen(string))+1) // the (...+1) weirdness is so we do not get an ignoring return value warning
 
 void initAflForkServer() {
   // we can not use fprint* stdout/stderr functions here, it fucks up some programs
@@ -82,6 +82,10 @@ void bbCallback(unsigned short id) {
   }
 }
 
+void forceCleanExit() {
+  exit(0);
+}
+
 void save_rdi() {
   saved_di = rdi;
 }