mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-21 21:54:25 +00:00
fix afl-frida
This commit is contained in:
@ -127,6 +127,7 @@ void __afl_manual_init();
|
||||
|
||||
// Because we do our own logging.
|
||||
extern uint8_t *__afl_area_ptr;
|
||||
static __thread guint64 previous_pc;
|
||||
|
||||
// Frida stuff below.
|
||||
typedef struct {
|
||||
@ -138,9 +139,7 @@ typedef struct {
|
||||
|
||||
inline static void afl_maybe_log(guint64 current_pc) {
|
||||
|
||||
static __thread guint64 previous_pc;
|
||||
|
||||
// fprintf(stderr, "PC: %p\n", current_pc);
|
||||
// fprintf(stderr, "PC: %p ^ %p\n", current_pc, previous_pc);
|
||||
|
||||
current_pc = (current_pc >> 4) ^ (current_pc << 8);
|
||||
current_pc &= MAP_SIZE - 1;
|
||||
@ -502,6 +501,8 @@ int main() {
|
||||
|
||||
while (__afl_persistent_loop(UINT32_MAX) != 0) {
|
||||
|
||||
previous_pc = 0; // Required!
|
||||
|
||||
#ifdef _DEBUG
|
||||
fprintf(stderr, "CLIENT crc: %016llx len: %u\n", hash64(__afl_fuzz_ptr, *__a
|
||||
fprintf(stderr, "RECV:");
|
||||
|
Reference in New Issue
Block a user