mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-17 04:18:06 +00:00
shm debug and fixes
This commit is contained in:
@ -32,6 +32,7 @@
|
||||
#include "common.h"
|
||||
#include "list.h"
|
||||
#include "forkserver.h"
|
||||
#include "hash.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
@ -837,8 +838,17 @@ void afl_fsrv_write_to_testcase(afl_forkserver_t *fsrv, u8 *buf, size_t len) {
|
||||
|
||||
*fsrv->shmem_fuzz_len = len;
|
||||
memcpy(fsrv->shmem_fuzz, buf, len);
|
||||
// fprintf(stderr, "FS crc: %08x len: %u\n", hash32(fsrv->shmem_fuzz,
|
||||
// *fsrv->shmem_fuzz_len, 0xa5b35705), *fsrv->shmem_fuzz_len);
|
||||
#ifdef _DEBUG
|
||||
fprintf(stderr, "FS crc: %08x len: %u\n", hash32(fsrv->shmem_fuzz,
|
||||
*fsrv->shmem_fuzz_len, 0xa5b35705), *fsrv->shmem_fuzz_len);
|
||||
fprintf(stderr, "SHM :");
|
||||
for (int i = 0; i < *fsrv->shmem_fuzz_len; i++)
|
||||
fprintf(stderr, "%02x", fsrv->shmem_fuzz[i]);
|
||||
fprintf(stderr, "\nORIG:");
|
||||
for (int i = 0; i < *fsrv->shmem_fuzz_len; i++)
|
||||
fprintf(stderr, "%02x", buf[i]);
|
||||
fprintf(stderr, "\n");
|
||||
#endif
|
||||
|
||||
} else {
|
||||
|
||||
|
Reference in New Issue
Block a user