diff options
author | van Hauser <vh@thc.org> | 2023-01-12 09:55:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-12 09:55:14 +0100 |
commit | e2acba57bf22734bd8234a61ff34dae4ca933378 (patch) | |
tree | 2ac1cce9160cbdde68929e7a06575be9448036f7 /src | |
parent | e4ff0ebd56d8076abd2413ebfaeb7b5e6c07bc3a (diff) | |
parent | e4b7c4e6c9e71ff20309c66d37def67f0cbb003d (diff) | |
download | afl++-e2acba57bf22734bd8234a61ff34dae4ca933378.tar.gz |
Merge pull request #1614 from devnexen/gotcpu_macos_arm64
afl-gotcpu disable thread_affinity api on macos arm64.
Diffstat (limited to 'src')
-rw-r--r-- | src/afl-gotcpu.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/afl-gotcpu.c b/src/afl-gotcpu.c index 144ec9c9..c5b8a27a 100644 --- a/src/afl-gotcpu.c +++ b/src/afl-gotcpu.c @@ -174,7 +174,12 @@ int main(int argc, char **argv) { if (c == NULL) PFATAL("cpuset_create failed"); cpuset_set(i, c); - #elif defined(__APPLE__) + #elif defined(__APPLE__) && defined(__x86_64__) + // the api is not workable on arm64, core's principle + // differs significantly hive of core per type vs individual ones. + // Possible TODO: For arm64 is to slightly change the meaning + // of gotcpu since it makes no sense on this platform + // but rather just displaying current policy ? thread_affinity_policy_data_t c = {i}; thread_port_t native_thread = pthread_mach_thread_np(pthread_self()); if (thread_policy_set(native_thread, THREAD_AFFINITY_POLICY, |