about summary refs log tree commit diff
path: root/src/afl-gotcpu.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2023-01-27 11:46:59 +0100
committerGitHub <noreply@github.com>2023-01-27 11:46:59 +0100
commit3e8a691a81c08c174467e3d7ae04328a4d6be29e (patch)
treedcb91017e71b3390e8387d7295ee13012dba344b /src/afl-gotcpu.c
parent3b6fcd911a860a8c823c912c4b08b423734e4cfe (diff)
parent33eba1fc5652060e8d877b02135fce2325813d0c (diff)
downloadafl++-3e8a691a81c08c174467e3d7ae04328a4d6be29e.tar.gz
Merge pull request #1627 from AFLplusplus/dev
push to stable
Diffstat (limited to 'src/afl-gotcpu.c')
-rw-r--r--src/afl-gotcpu.c7
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,