From 95eed6278a57a67569911341f995dace06a9f324 Mon Sep 17 00:00:00 2001 From: k4lizen <124312252+k4lizen@users.noreply.github.com> Date: Sat, 19 Jul 2025 13:52:15 +0200 Subject: [PATCH 1/2] scroll the terminal so the screen clear doesn't delete anything --- include/afl-fuzz.h | 1 + src/afl-fuzz-stats.c | 13 +++++++++++++ src/afl-fuzz.c | 2 ++ 3 files changed, 16 insertions(+) diff --git a/include/afl-fuzz.h b/include/afl-fuzz.h index a0ee58bf73..01306cff54 100644 --- a/include/afl-fuzz.h +++ b/include/afl-fuzz.h @@ -1253,6 +1253,7 @@ void write_setup_file(afl_state_t *, u32, char **); void write_stats_file(afl_state_t *, u32, double, double, double); void maybe_update_plot_file(afl_state_t *, u32, double, double); void write_queue_stats(afl_state_t *); +void make_space_for_stats(); void show_stats(afl_state_t *); void show_stats_normal(afl_state_t *); void show_stats_pizza(afl_state_t *); diff --git a/src/afl-fuzz-stats.c b/src/afl-fuzz-stats.c index 4de2c8559f..987c2d67a1 100644 --- a/src/afl-fuzz-stats.c +++ b/src/afl-fuzz-stats.c @@ -663,6 +663,19 @@ void plot_profile_data(afl_state_t *afl, struct queue_entry *q) { } +/* Scroll the terminal so when the stats clear the screen + we don't delete anything. */ + +void make_space_for_stats() { + + struct winsize ws; + + if (ioctl(1, TIOCGWINSZ, &ws)) { return; } + + SAYF("\x1b[%dS", ws.ws_row); + +} + /* Check terminal dimensions after resize. */ static void check_term_size(afl_state_t *afl) { diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c index e5d5055d37..77b04236fb 100644 --- a/src/afl-fuzz.c +++ b/src/afl-fuzz.c @@ -2978,6 +2978,8 @@ int main(int argc, char **argv_orig, char **envp) { show_init_stats(afl); + if (!getenv("AFL_NO_UI") && !afl->not_on_tty) { make_space_for_stats(); } + if (unlikely(afl->old_seed_selection)) seek_to = find_start_position(afl); afl->start_time = get_cur_time(); From 2a2bf3243a4f6920d51d3b856fe6670cfaba6aea Mon Sep 17 00:00:00 2001 From: k4lizen <124312252+k4lizen@users.noreply.github.com> Date: Sat, 19 Jul 2025 13:53:00 +0200 Subject: [PATCH 2/2] code format other stuff --- instrumentation/SanitizerCoveragePCGUARD.so.cc | 1 + instrumentation/afl-llvm-dict2file.so.cc | 1 + instrumentation/afl-llvm-pass.so.cc | 1 + instrumentation/cmplog-instructions-pass.cc | 1 + instrumentation/injection-pass.cc | 1 + instrumentation/split-compares-pass.so.cc | 1 + utils/aflpp_driver/aflpp_driver.c | 7 ++++--- 7 files changed, 10 insertions(+), 3 deletions(-) diff --git a/instrumentation/SanitizerCoveragePCGUARD.so.cc b/instrumentation/SanitizerCoveragePCGUARD.so.cc index dfccead5a4..53e2d51241 100644 --- a/instrumentation/SanitizerCoveragePCGUARD.so.cc +++ b/instrumentation/SanitizerCoveragePCGUARD.so.cc @@ -1694,3 +1694,4 @@ std::string ModuleSanitizerCoverageAFL::getSectionEnd( return "__stop___" + Section; } + diff --git a/instrumentation/afl-llvm-dict2file.so.cc b/instrumentation/afl-llvm-dict2file.so.cc index d63c861353..5ee2f6fdf9 100644 --- a/instrumentation/afl-llvm-dict2file.so.cc +++ b/instrumentation/afl-llvm-dict2file.so.cc @@ -717,3 +717,4 @@ PreservedAnalyses AFLdict2filePass::run(Module &M, ModuleAnalysisManager &MAM) { return PA; } + diff --git a/instrumentation/afl-llvm-pass.so.cc b/instrumentation/afl-llvm-pass.so.cc index 59cf0aca08..3cff4e2896 100644 --- a/instrumentation/afl-llvm-pass.so.cc +++ b/instrumentation/afl-llvm-pass.so.cc @@ -831,3 +831,4 @@ PreservedAnalyses AFLCoverage::run(Module &M, ModuleAnalysisManager &MAM) { return PreservedAnalyses(); } + diff --git a/instrumentation/cmplog-instructions-pass.cc b/instrumentation/cmplog-instructions-pass.cc index 7cbd5553e7..fc048aafdf 100644 --- a/instrumentation/cmplog-instructions-pass.cc +++ b/instrumentation/cmplog-instructions-pass.cc @@ -579,3 +579,4 @@ PreservedAnalyses CmpLogInstructions::run(Module &M, return PreservedAnalyses(); } + diff --git a/instrumentation/injection-pass.cc b/instrumentation/injection-pass.cc index 5d584f54f6..11a89a225e 100644 --- a/instrumentation/injection-pass.cc +++ b/instrumentation/injection-pass.cc @@ -250,3 +250,4 @@ PreservedAnalyses InjectionRoutines::run(Module &M, return PreservedAnalyses(); } + diff --git a/instrumentation/split-compares-pass.so.cc b/instrumentation/split-compares-pass.so.cc index 10cfc15af8..8fc5d8e5cf 100644 --- a/instrumentation/split-compares-pass.so.cc +++ b/instrumentation/split-compares-pass.so.cc @@ -1792,3 +1792,4 @@ PreservedAnalyses SplitComparesTransform::run(Module &M, return PreservedAnalyses(); } + diff --git a/utils/aflpp_driver/aflpp_driver.c b/utils/aflpp_driver/aflpp_driver.c index 88f7413c50..c29c6aa2f6 100644 --- a/utils/aflpp_driver/aflpp_driver.c +++ b/utils/aflpp_driver/aflpp_driver.c @@ -65,9 +65,10 @@ 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"))) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy