mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 02:58:08 +00:00
not all CPUs know ondemand
This commit is contained in:
@ -113,6 +113,7 @@ static unsigned int ext_call_instrument(function *fun) {
|
|||||||
DECL_EXTERNAL(fndecl) = 1; /* External linkage */
|
DECL_EXTERNAL(fndecl) = 1; /* External linkage */
|
||||||
DECL_ARTIFICIAL(fndecl) = 1; /* Injected by compiler */
|
DECL_ARTIFICIAL(fndecl) = 1; /* Injected by compiler */
|
||||||
|
|
||||||
|
printf("NEW FUNC %s\n", function_name(fun));
|
||||||
FOR_EACH_BB_FN(bb, fun) {
|
FOR_EACH_BB_FN(bb, fun) {
|
||||||
|
|
||||||
gimple_seq fcall;
|
gimple_seq fcall;
|
||||||
@ -128,24 +129,40 @@ static unsigned int ext_call_instrument(function *fun) {
|
|||||||
int more_than_one = -1;
|
int more_than_one = -1;
|
||||||
edge ep;
|
edge ep;
|
||||||
edge_iterator eip;
|
edge_iterator eip;
|
||||||
|
int foo = 0;
|
||||||
|
if (ep->flags & EDGE_FALLTHRU)
|
||||||
|
printf("pred %d fallthough\n", foo);
|
||||||
FOR_EACH_EDGE(ep, eip, bb->preds) {
|
FOR_EACH_EDGE(ep, eip, bb->preds) {
|
||||||
|
|
||||||
|
int item = 0;
|
||||||
|
foo++;
|
||||||
|
printf("pred %d\n", foo);
|
||||||
|
if (ep->flags & EDGE_FALLTHRU)
|
||||||
|
printf("pred %d fallthough\n", foo);
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
if (ep->flags & EDGE_FALLTHRU)
|
||||||
if (more_than_one == -1) more_than_one = 0;
|
if (more_than_one == -1) more_than_one = 0;
|
||||||
|
|
||||||
basic_block Pred = ep->src;
|
basic_block Pred = ep->src;
|
||||||
edge es;
|
edge es;
|
||||||
edge_iterator eis;
|
edge_iterator eis;
|
||||||
FOR_EACH_EDGE(es, eis, Pred->succs) {
|
FOR_EACH_EDGE(es, eis, Pred->succs) {
|
||||||
|
item++;
|
||||||
|
|
||||||
|
if (es->flags & EDGE_FALLTHRU)
|
||||||
|
printf("item %d fallthough\n", item);
|
||||||
|
|
||||||
basic_block Succ = es->dest;
|
basic_block Succ = es->dest;
|
||||||
if (Succ != NULL) count++;
|
if (Succ != NULL) count++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
printf("total items: %d\n", item);
|
||||||
|
|
||||||
if (count > 1) more_than_one = 1;
|
if (count > 1) more_than_one = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
printf("result: %d\n", more_than_one);
|
||||||
|
|
||||||
if (more_than_one != 1) continue;
|
if (more_than_one != 1) continue;
|
||||||
|
|
||||||
|
@ -1562,11 +1562,10 @@ void check_cpu_governor(void) {
|
|||||||
" echo performance | tee cpu*/cpufreq/scaling_governor\n\n"
|
" echo performance | tee cpu*/cpufreq/scaling_governor\n\n"
|
||||||
|
|
||||||
" You can later go back to the original state by replacing "
|
" You can later go back to the original state by replacing "
|
||||||
"'performance' with\n"
|
"'performance'\n"
|
||||||
" 'ondemand'. If you don't want to change the settings, set "
|
" with 'ondemand' or 'powersave'. If you don't want to change the settings,\n"
|
||||||
"AFL_SKIP_CPUFREQ\n"
|
" set AFL_SKIP_CPUFREQ to make afl-fuzz skip this check - but expect some\n"
|
||||||
" to make afl-fuzz skip this check - but expect some performance "
|
" performance drop.\n",
|
||||||
"drop.\n",
|
|
||||||
min / 1024, max / 1024);
|
min / 1024, max / 1024);
|
||||||
FATAL("Suboptimal CPU scaling governor");
|
FATAL("Suboptimal CPU scaling governor");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user