mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 11:28:08 +00:00
fix IGNORE_PROBLEMS and update qemuafl
This commit is contained in:
@ -11,6 +11,8 @@
|
||||
- add CFI sanitizer variant to gcc targets
|
||||
- llvm 16 support (thanks to @devnexen!)
|
||||
- support llvm 15 native pcguard changes
|
||||
- qemu_mode:
|
||||
- fix _RANGES envs to allow hyphens in the filenames
|
||||
- new custom module: autotoken, grammar free fuzzer for text inputs
|
||||
- LTO autoken and llvm_mode: added AFL_LLVM_DICT2FILE_NO_MAIN support
|
||||
- better sanitizer default options support for all tools
|
||||
|
@ -1539,7 +1539,9 @@ void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop) {
|
||||
if (start == stop || *start) return;
|
||||
|
||||
x = getenv("AFL_INST_RATIO");
|
||||
if (x) { inst_ratio = (u32)atoi(x); }
|
||||
if (x) {
|
||||
|
||||
inst_ratio = (u32)atoi(x);
|
||||
|
||||
if (!inst_ratio || inst_ratio > 100) {
|
||||
|
||||
@ -1548,6 +1550,8 @@ void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// If a dlopen of an instrumented library happens after the forkserver then
|
||||
// we have a problem as we cannot increase the coverage map anymore.
|
||||
if (__afl_already_initialized_forkserver) {
|
||||
@ -1568,10 +1572,16 @@ void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop) {
|
||||
|
||||
while (start < stop) {
|
||||
|
||||
if (likely(inst_ratio == 100) || R(100) < inst_ratio)
|
||||
*start = offset;
|
||||
else
|
||||
*start = 0; // write to map[0]
|
||||
if (likely(inst_ratio == 100) || R(100) < inst_ratio) {
|
||||
|
||||
*(start++) = offset;
|
||||
|
||||
} else {
|
||||
|
||||
*(start++) = 0; // write to map[0]
|
||||
|
||||
}
|
||||
|
||||
if (unlikely(++offset >= __afl_final_loc)) { offset = 4; }
|
||||
|
||||
}
|
||||
@ -1592,12 +1602,15 @@ void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop) {
|
||||
|
||||
while (start < stop) {
|
||||
|
||||
if (likely(inst_ratio == 100) || R(100) < inst_ratio)
|
||||
*start = ++__afl_final_loc;
|
||||
else
|
||||
*start = 0; // write to map[0]
|
||||
if (likely(inst_ratio == 100) || R(100) < inst_ratio) {
|
||||
|
||||
start++;
|
||||
*(start++) = ++__afl_final_loc;
|
||||
|
||||
} else {
|
||||
|
||||
*(start++) = 0; // write to map[0]
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -37,10 +37,10 @@ typedef long double max_align_t;
|
||||
#define MNAME M.getSourceFileName()
|
||||
#define FMNAME F.getParent()->getSourceFileName()
|
||||
#if LLVM_VERSION_MAJOR >= 16
|
||||
// None becomes deprecated
|
||||
// the standard std::nullopt_t is recommended instead
|
||||
// from C++17 and onwards.
|
||||
constexpr std::nullopt_t None = std::nullopt;
|
||||
// None becomes deprecated
|
||||
// the standard std::nullopt_t is recommended instead
|
||||
// from C++17 and onwards.
|
||||
constexpr std::nullopt_t None = std::nullopt;
|
||||
#endif
|
||||
#else
|
||||
#define MNAME std::string("")
|
||||
|
@ -1 +1 @@
|
||||
a8af9cbde7
|
||||
74c583b11a
|
||||
|
Submodule qemu_mode/qemuafl updated: a8af9cbde7...74c583b11a
@ -672,12 +672,11 @@ void show_stats_normal(afl_state_t *afl) {
|
||||
/* If no coverage was found yet, check whether run time is greater than
|
||||
* exit_on_time. */
|
||||
|
||||
if (unlikely(
|
||||
!afl->non_instrumented_mode && afl->afl_env.afl_exit_on_time &&
|
||||
if (unlikely(!afl->non_instrumented_mode && afl->afl_env.afl_exit_on_time &&
|
||||
((afl->last_find_time &&
|
||||
(cur_ms - afl->last_find_time) > afl->exit_on_time) ||
|
||||
(!afl->last_find_time && (cur_ms - afl->start_time)
|
||||
> afl->exit_on_time)))) {
|
||||
(!afl->last_find_time &&
|
||||
(cur_ms - afl->start_time) > afl->exit_on_time)))) {
|
||||
|
||||
afl->stop_soon = 2;
|
||||
|
||||
@ -1476,12 +1475,11 @@ void show_stats_pizza(afl_state_t *afl) {
|
||||
/* If no coverage was found yet, check whether run time is greater than
|
||||
* exit_on_time. */
|
||||
|
||||
if (unlikely(
|
||||
!afl->non_instrumented_mode && afl->afl_env.afl_exit_on_time &&
|
||||
if (unlikely(!afl->non_instrumented_mode && afl->afl_env.afl_exit_on_time &&
|
||||
((afl->last_find_time &&
|
||||
(cur_ms - afl->last_find_time) > afl->exit_on_time) ||
|
||||
(!afl->last_find_time && (cur_ms - afl->start_time)
|
||||
> afl->exit_on_time)))) {
|
||||
(!afl->last_find_time &&
|
||||
(cur_ms - afl->start_time) > afl->exit_on_time)))) {
|
||||
|
||||
afl->stop_soon = 2;
|
||||
|
||||
|
Reference in New Issue
Block a user