mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-17 12:18:08 +00:00
afl-gotcpu disable thread_affinity api on macos arm64.
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user