aboutsummaryrefslogtreecommitdiff
path: root/frida_mode/src/stats
diff options
context:
space:
mode:
authorYour Name <you@example.com>2021-11-09 18:29:25 +0000
committerYour Name <you@example.com>2021-11-10 05:25:29 +0000
commit02e8919cbc744064510f6cd99539f7662343073f (patch)
tree9f9a8fc6346242b793ce7e671813168ccec72a8e /frida_mode/src/stats
parent8578b6b01c5f41d8a75ae83cb2c058fe89bf90df (diff)
downloadafl++-02e8919cbc744064510f6cd99539f7662343073f.tar.gz
Suppress spurious output
Diffstat (limited to 'frida_mode/src/stats')
-rw-r--r--frida_mode/src/stats/stats.c15
-rw-r--r--frida_mode/src/stats/stats_arm32.c8
-rw-r--r--frida_mode/src/stats/stats_arm64.c6
-rw-r--r--frida_mode/src/stats/stats_x86_64.c16
4 files changed, 19 insertions, 26 deletions
diff --git a/frida_mode/src/stats/stats.c b/frida_mode/src/stats/stats.c
index 7972b881..a61834d6 100644
--- a/frida_mode/src/stats/stats.c
+++ b/frida_mode/src/stats/stats.c
@@ -8,7 +8,6 @@
#include "frida-gumjs.h"
#include "config.h"
-#include "debug.h"
#include "util.h"
#include "entry.h"
@@ -330,12 +329,12 @@ void stats_config(void) {
void stats_init(void) {
- OKF("Stats - file [%s]", stats_filename);
- OKF("Stats - interval [%" G_GINT64_MODIFIER "u]", stats_interval);
+ FOKF("Stats - file [%s]", stats_filename);
+ FOKF("Stats - interval [%" G_GINT64_MODIFIER "u]", stats_interval);
if (stats_interval != 0 && stats_filename == NULL) {
- FATAL(
+ FFATAL(
"AFL_FRIDA_STATS_FILE must be specified if "
"AFL_FRIDA_STATS_INTERVAL is");
@@ -348,18 +347,18 @@ void stats_init(void) {
char *path = g_canonicalize_filename(stats_filename, g_get_current_dir());
- OKF("Stats - path [%s]", path);
+ FOKF("Stats - path [%s]", path);
stats_fd = open(path, O_RDWR | O_CREAT | O_TRUNC,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
- if (stats_fd < 0) { FATAL("Failed to open stats file '%s'", path); }
+ if (stats_fd < 0) { FFATAL("Failed to open stats file '%s'", path); }
g_free(path);
int shm_id =
shmget(IPC_PRIVATE, sizeof(stats_data_t), IPC_CREAT | IPC_EXCL | 0600);
- if (shm_id < 0) { FATAL("shm_id < 0 - errno: %d\n", errno); }
+ if (shm_id < 0) { FFATAL("shm_id < 0 - errno: %d\n", errno); }
stats_data = shmat(shm_id, NULL, 0);
g_assert(stats_data != MAP_FAILED);
@@ -372,7 +371,7 @@ void stats_init(void) {
*/
if (shmctl(shm_id, IPC_RMID, NULL) < 0) {
- FATAL("shmctl (IPC_RMID) < 0 - errno: %d\n", errno);
+ FFATAL("shmctl (IPC_RMID) < 0 - errno: %d\n", errno);
}
diff --git a/frida_mode/src/stats/stats_arm32.c b/frida_mode/src/stats/stats_arm32.c
index 5860d33b..bd652aa3 100644
--- a/frida_mode/src/stats/stats_arm32.c
+++ b/frida_mode/src/stats/stats_arm32.c
@@ -1,7 +1,5 @@
#include "frida-gumjs.h"
-#include "debug.h"
-
#include "stats.h"
#include "util.h"
@@ -9,13 +7,13 @@
void starts_arch_init(void) {
- FATAL("Stats not supported on this architecture");
+ FFATAL("Stats not supported on this architecture");
}
void stats_write_arch(stats_data_t *data) {
- FATAL("Stats not supported on this architecture");
+ FFATAL("Stats not supported on this architecture");
}
@@ -23,7 +21,7 @@ void stats_collect_arch(const cs_insn *instr, gboolean begin) {
UNUSED_PARAMETER(instr);
UNUSED_PARAMETER(begin);
- FATAL("Stats not supported on this architecture");
+ FFATAL("Stats not supported on this architecture");
}
diff --git a/frida_mode/src/stats/stats_arm64.c b/frida_mode/src/stats/stats_arm64.c
index 54b3faf1..313ab47a 100644
--- a/frida_mode/src/stats/stats_arm64.c
+++ b/frida_mode/src/stats/stats_arm64.c
@@ -3,8 +3,6 @@
#include "frida-gumjs.h"
-#include "debug.h"
-
#include "ranges.h"
#include "stats.h"
#include "util.h"
@@ -48,7 +46,7 @@ void starts_arch_init(void) {
int shm_id = shmget(IPC_PRIVATE, sizeof(stats_data_arch_t),
IPC_CREAT | IPC_EXCL | 0600);
- if (shm_id < 0) { FATAL("shm_id < 0 - errno: %d\n", errno); }
+ if (shm_id < 0) { FFATAL("shm_id < 0 - errno: %d\n", errno); }
stats_data_arch = shmat(shm_id, NULL, 0);
g_assert(stats_data_arch != MAP_FAILED);
@@ -58,7 +56,7 @@ void starts_arch_init(void) {
*/
if (shmctl(shm_id, IPC_RMID, NULL) < 0) {
- FATAL("shmctl (IPC_RMID) < 0 - errno: %d\n", errno);
+ FFATAL("shmctl (IPC_RMID) < 0 - errno: %d\n", errno);
}
diff --git a/frida_mode/src/stats/stats_x86_64.c b/frida_mode/src/stats/stats_x86_64.c
index ab914951..0bfe3baa 100644
--- a/frida_mode/src/stats/stats_x86_64.c
+++ b/frida_mode/src/stats/stats_x86_64.c
@@ -3,8 +3,6 @@
#include "frida-gumjs.h"
-#include "debug.h"
-
#include "ranges.h"
#include "stats.h"
#include "util.h"
@@ -50,7 +48,7 @@ void starts_arch_init(void) {
int shm_id = shmget(IPC_PRIVATE, sizeof(stats_data_arch_t),
IPC_CREAT | IPC_EXCL | 0600);
- if (shm_id < 0) { FATAL("shm_id < 0 - errno: %d\n", errno); }
+ if (shm_id < 0) { FFATAL("shm_id < 0 - errno: %d\n", errno); }
stats_data_arch = shmat(shm_id, NULL, 0);
g_assert(stats_data_arch != MAP_FAILED);
@@ -60,7 +58,7 @@ void starts_arch_init(void) {
*/
if (shmctl(shm_id, IPC_RMID, NULL) < 0) {
- FATAL("shmctl (IPC_RMID) < 0 - errno: %d\n", errno);
+ FFATAL("shmctl (IPC_RMID) < 0 - errno: %d\n", errno);
}
@@ -255,8 +253,8 @@ static x86_op_type stats_get_operand_type(const cs_insn *instr) {
if (x86->op_count != 1) {
- FATAL("Unexpected operand count (%d): %s %s\n", x86->op_count,
- instr->mnemonic, instr->op_str);
+ FFATAL("Unexpected operand count (%d): %s %s\n", x86->op_count,
+ instr->mnemonic, instr->op_str);
}
@@ -295,7 +293,7 @@ static void stats_collect_call_arch(const cs_insn *instr) {
stats_data_arch->num_call_mem++;
break;
default:
- FATAL("Invalid operand type: %s %s\n", instr->mnemonic, instr->op_str);
+ FFATAL("Invalid operand type: %s %s\n", instr->mnemonic, instr->op_str);
}
@@ -316,7 +314,7 @@ static void stats_collect_jump_arch(const cs_insn *instr) {
stats_data_arch->num_jmp_mem++;
break;
default:
- FATAL("Invalid operand type: %s %s\n", instr->mnemonic, instr->op_str);
+ FFATAL("Invalid operand type: %s %s\n", instr->mnemonic, instr->op_str);
}
@@ -337,7 +335,7 @@ static void stats_collect_jump_cond_arch(const cs_insn *instr) {
stats_data_arch->num_jmp_cond_mem++;
break;
default:
- FATAL("Invalid operand type: %s %s\n", instr->mnemonic, instr->op_str);
+ FFATAL("Invalid operand type: %s %s\n", instr->mnemonic, instr->op_str);
}