mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-06 15:21:32 +00:00
code format
This commit is contained in:
parent
7f7d5ff29b
commit
3ee3b5c384
@ -299,14 +299,18 @@ static void __afl_map_shm_fuzz() {
|
||||
size_t shm_fuzz_map_size = SHM_FUZZ_MAP_SIZE_DEFAULT;
|
||||
char *map_size_env = getenv(SHM_FUZZ_MAP_SIZE_ENV_VAR);
|
||||
if (map_size_env != NULL) {
|
||||
char* endptr;
|
||||
|
||||
char *endptr;
|
||||
errno = 0;
|
||||
shm_fuzz_map_size = (size_t)strtoul(map_size_env, &endptr, 10);
|
||||
if (errno != 0 || shm_fuzz_map_size == 0) {
|
||||
|
||||
perror("shm_fuzz mapping size parsing");
|
||||
send_forkserver_error(FS_ERROR_SHM_OPEN);
|
||||
_exit(1);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const char *shm_file_path = id_str;
|
||||
@ -322,8 +326,7 @@ static void __afl_map_shm_fuzz() {
|
||||
|
||||
}
|
||||
|
||||
map =
|
||||
(u8 *)mmap(0, shm_fuzz_map_size, PROT_READ, MAP_SHARED, shm_fd, 0);
|
||||
map = (u8 *)mmap(0, shm_fuzz_map_size, PROT_READ, MAP_SHARED, shm_fd, 0);
|
||||
|
||||
#else
|
||||
u32 shm_id = atoi(id_str);
|
||||
|
@ -1412,7 +1412,6 @@ void perform_dry_run(afl_state_t *afl) {
|
||||
|
||||
q = afl->queue_buf[idx];
|
||||
if (!q || q->disabled || q->cal_failed || !q->exec_cksum) { continue; }
|
||||
u32 done = 0;
|
||||
|
||||
for (i = idx + 1; likely(i < afl->queued_items && afl->queue_buf[i]); ++i) {
|
||||
|
||||
|
@ -65,9 +65,12 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
#define SECTION_RODATA __attribute__((used, retain)) __attribute__((section ("__RODATA,__rodata")))
|
||||
#define SECTION_RODATA \
|
||||
__attribute__((used, retain)) __attribute__((section("__RODATA,__" \
|
||||
"rodata")))
|
||||
#else
|
||||
#define SECTION_RODATA __attribute__((used, retain)) __attribute__((section (".rodata")))
|
||||
#define SECTION_RODATA \
|
||||
__attribute__((used, retain)) __attribute__((section(".rodata")))
|
||||
#endif
|
||||
|
||||
// AFL++ shared memory fuzz cases
|
||||
@ -112,8 +115,7 @@ __attribute__((weak)) void __asan_unpoison_memory_region(
|
||||
__attribute__((weak)) void *__asan_region_is_poisoned(void *beg, size_t size);
|
||||
|
||||
// Notify AFL about persistent mode.
|
||||
SECTION_RODATA static const char AFL_PERSISTENT[] =
|
||||
"##SIG_AFL_PERSISTENT##";
|
||||
SECTION_RODATA static const char AFL_PERSISTENT[] = "##SIG_AFL_PERSISTENT##";
|
||||
int __afl_persistent_loop(unsigned int);
|
||||
|
||||
// Notify AFL about deferred forkserver.
|
||||
|
Loading…
x
Reference in New Issue
Block a user