about summary refs log tree commit diff
path: root/libAflDyninst.cpp
diff options
context:
space:
mode:
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;
 }