mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 02:58:08 +00:00
fuzz init same fails and tries approach as Linux/Android.
This commit is contained in:
@ -237,15 +237,32 @@ void bind_to_free_cpu(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||||
if (pthread_setaffinity_np(pthread_self(), sizeof(c), &c))
|
if (pthread_setaffinity_np(pthread_self(), sizeof(c), &c)) {
|
||||||
PFATAL("pthread_setaffinity failed");
|
|
||||||
|
if (cpu_start == cpu_core_count)
|
||||||
|
PFATAL("pthread_setaffinity failed for cpu %d, exit", i);
|
||||||
|
WARNF("pthread_setaffinity failed to CPU %d, trying next CPU", i);
|
||||||
|
cpu_start++;
|
||||||
|
goto try
|
||||||
|
;
|
||||||
|
|
||||||
|
}
|
||||||
#elif defined(__NetBSD__)
|
#elif defined(__NetBSD__)
|
||||||
if (pthread_setaffinity_np(pthread_self(), cpuset_size(c), c))
|
if (pthread_setaffinity_np(pthread_self(), cpuset_size(c), c)) {
|
||||||
PFATAL("pthread_setaffinity failed");
|
|
||||||
|
if (cpu_start == cpu_core_count)
|
||||||
|
PFATAL("pthread_setaffinity failed for cpu %d, exit", i);
|
||||||
|
WARNF("pthread_setaffinity failed to CPU %d, trying next CPU", i);
|
||||||
|
cpu_start++;
|
||||||
|
goto try
|
||||||
|
;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
cpuset_destroy(c);
|
cpuset_destroy(c);
|
||||||
#else
|
#else
|
||||||
// this will need something for other platforms
|
// this will need something for other platforms
|
||||||
|
// TODO: Solaris/Illumos has processor_bind ... might worth a try
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user