diff options
author | vanhauser-thc <vh@thc.org> | 2021-12-27 12:51:13 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2021-12-27 12:52:16 +0100 |
commit | 7bd2899f2e911e968f2901e1f56f249492f60ff5 (patch) | |
tree | 852718940cc5d94affef990bee7bd683e8917e1a | |
parent | 43b162c222cd7f258e41fb8b7b3fc5c6dd6b0bd2 (diff) | |
download | afl++-7bd2899f2e911e968f2901e1f56f249492f60ff5.tar.gz |
fix cpu selection
-rw-r--r-- | src/afl-fuzz-init.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c index e4b83fa5..7a8bd674 100644 --- a/src/afl-fuzz-init.c +++ b/src/afl-fuzz-init.c @@ -393,15 +393,14 @@ void bind_to_free_cpu(afl_state_t *afl) { "For this platform we do not have free CPU binding code yet. If possible, please supply a PR to https://github.com/AFLplusplus/AFLplusplus" #endif - size_t cpu_start = 0; + #if !defined(__aarch64__) && !defined(__arm__) && !defined(__arm64__) - #if !defined(__ANDROID__) - - for (i = cpu_start; i < afl->cpu_core_count; i++) { + for (i = 0; i < afl->cpu_core_count; i++) { #else - /* for some reason Android goes backwards */ + /* many ARM devices have performance and efficiency cores, the slower + efficiency cores seem to always come first */ for (i = afl->cpu_core_count - 1; i > -1; i--) { @@ -419,7 +418,6 @@ void bind_to_free_cpu(afl_state_t *afl) { } WARNF("setaffinity failed to CPU %d, trying next CPU", i); - cpu_start++; } |