mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-08 16:21:32 +00:00
add introspection
This commit is contained in:
parent
eda1ee0807
commit
1edc3ece61
@ -2376,8 +2376,7 @@ havoc_stage:
|
|||||||
|
|
||||||
#ifdef INTROSPECTION
|
#ifdef INTROSPECTION
|
||||||
snprintf(afl->m_tmp, sizeof(afl->m_tmp), " CLONE-%s-%u-%u-%u",
|
snprintf(afl->m_tmp, sizeof(afl->m_tmp), " CLONE-%s-%u-%u-%u",
|
||||||
actually_clone ? "clone" : "insert", clone_from, clone_to,
|
"clone", clone_from, clone_to, clone_len);
|
||||||
clone_len);
|
|
||||||
strcat(afl->mutation, afl->m_tmp);
|
strcat(afl->mutation, afl->m_tmp);
|
||||||
#endif
|
#endif
|
||||||
u8 *new_buf =
|
u8 *new_buf =
|
||||||
@ -2416,9 +2415,8 @@ havoc_stage:
|
|||||||
u32 clone_to = rand_below(afl, temp_len);
|
u32 clone_to = rand_below(afl, temp_len);
|
||||||
|
|
||||||
#ifdef INTROSPECTION
|
#ifdef INTROSPECTION
|
||||||
snprintf(afl->m_tmp, sizeof(afl->m_tmp), " CLONE-%s-%u-%u-%u",
|
snprintf(afl->m_tmp, sizeof(afl->m_tmp), " CLONE-%s-%u-%u",
|
||||||
actually_clone ? "clone" : "insert", clone_from, clone_to,
|
"insert", clone_to, clone_len);
|
||||||
clone_len);
|
|
||||||
strcat(afl->mutation, afl->m_tmp);
|
strcat(afl->mutation, afl->m_tmp);
|
||||||
#endif
|
#endif
|
||||||
u8 *new_buf =
|
u8 *new_buf =
|
||||||
@ -2485,8 +2483,8 @@ havoc_stage:
|
|||||||
u32 copy_to = rand_below(afl, temp_len - copy_len + 1);
|
u32 copy_to = rand_below(afl, temp_len - copy_len + 1);
|
||||||
|
|
||||||
#ifdef INTROSPECTION
|
#ifdef INTROSPECTION
|
||||||
snprintf(afl->m_tmp, sizeof(afl->m_tmp), " OVERWRITE_FIXED-%u-%u-%u",
|
snprintf(afl->m_tmp, sizeof(afl->m_tmp), " OVERWRITE_FIXED-%u-%u",
|
||||||
copy_from, copy_to, copy_len);
|
copy_to, copy_len);
|
||||||
strcat(afl->mutation, afl->m_tmp);
|
strcat(afl->mutation, afl->m_tmp);
|
||||||
#endif
|
#endif
|
||||||
memset(out_buf + copy_to,
|
memset(out_buf + copy_to,
|
||||||
@ -2600,8 +2598,8 @@ havoc_stage:
|
|||||||
|
|
||||||
u32 insert_at = rand_below(afl, temp_len - extra_len + 1);
|
u32 insert_at = rand_below(afl, temp_len - extra_len + 1);
|
||||||
#ifdef INTROSPECTION
|
#ifdef INTROSPECTION
|
||||||
snprintf(afl->m_tmp, sizeof(afl->m_tmp), " AUTO_EXTRA_OVERWRITE-%u-%u",
|
snprintf(afl->m_tmp, sizeof(afl->m_tmp),
|
||||||
insert_at, extra_len);
|
" AUTO_EXTRA_OVERWRITE-%u-%u", insert_at, extra_len);
|
||||||
strcat(afl->mutation, afl->m_tmp);
|
strcat(afl->mutation, afl->m_tmp);
|
||||||
#endif
|
#endif
|
||||||
memcpy(out_buf + insert_at, afl->a_extras[use_extra].data,
|
memcpy(out_buf + insert_at, afl->a_extras[use_extra].data,
|
||||||
@ -2618,8 +2616,8 @@ havoc_stage:
|
|||||||
u8 *ptr = afl->a_extras[use_extra].data;
|
u8 *ptr = afl->a_extras[use_extra].data;
|
||||||
u32 insert_at = rand_below(afl, temp_len + 1);
|
u32 insert_at = rand_below(afl, temp_len + 1);
|
||||||
#ifdef INTROSPECTION
|
#ifdef INTROSPECTION
|
||||||
snprintf(afl->m_tmp, sizeof(afl->m_tmp), " AUTO_EXTRA_INSERT-%u-%u",
|
snprintf(afl->m_tmp, sizeof(afl->m_tmp),
|
||||||
insert_at, extra_len);
|
" AUTO_EXTRA_INSERT-%u-%u", insert_at, extra_len);
|
||||||
strcat(afl->mutation, afl->m_tmp);
|
strcat(afl->mutation, afl->m_tmp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1980,6 +1980,13 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef INTROSPECTION
|
||||||
|
fprintf(afl->introspection_file,
|
||||||
|
"CYCLE cycle=%llu cycle_wo_finds=%llu expand_havoc=%u queue=%u\n",
|
||||||
|
afl->queue_cycle, afl->cycles_wo_finds, afl->expand_havoc,
|
||||||
|
afl->queued_paths);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (afl->cycle_schedules) {
|
if (afl->cycle_schedules) {
|
||||||
|
|
||||||
/* we cannot mix non-AFLfast schedules with others */
|
/* we cannot mix non-AFLfast schedules with others */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user