You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It does not seem to me like it is a critical error, and so I wrote this patch in order to recover and continue with the analysis:
diff --git a/lib/Analysis/ModRefAnalysis.cpp b/lib/Analysis/ModRefAnalysis.cpp
index fc154c5a..b15c6ce2 100644
--- a/lib/Analysis/ModRefAnalysis.cpp+++ b/lib/Analysis/ModRefAnalysis.cpp@@ -54,15 +55,23 @@ void ModRefAnalysis::run() {
assert(false);
}
+ vector<vector<string>::iterator> todel;
for (vector<string>::iterator i = targets.begin(); i != targets.end(); i++) {
string name = *i;
Function *f = module->getFunction(name);
if (!f) {
errs() << "function '" << name << "' is not found (or unreachable)\n";
- assert(false);+ todel.push_back(i);+ continue; // JOR: TODO: ensure safety
}
targetFunctions.push_back(f);
}
+ for (vector<vector<string>::iterator>::iterator d = todel.begin(); d != todel.end(); d++) {+ targets.erase(*d); // JOR: not sure this helps+ }
and do the same in ReachabilityAnalysis.
On larger benchmarks like bc, a lot of functions may be found unreachable when trying to skip (almost) everything:
[791b55] KLEE: Runnining mod-ref analysis...[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'yywrap' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'bc_out_long' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'usage' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'yy_delete_buffer' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'bc_str2num' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function '__sigdelset' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'yy_switch_to_buffer' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'yy_flush_buffer' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'new_yy_file' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'find_id' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'yy_scan_buffer' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'get_var' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'long_val' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'copy_array' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'pn' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'assign' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'pv' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'yy_scan_string' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'num2str' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'yy_scan_bytes' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'bc_is_near_zero' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'yy_load_buffer_state' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'yy_init_buffer' is not found (or unreachable)[8b29fc] KLEE: WARNING: [ModRefAnalysis] function 'bc_raisemod' is not found (or unreachable)
Q: Is this a safe way to proceed with this issue? Is it correct to assume that this assertion is not critical?
The text was updated successfully, but these errors were encountered:
Running vanilla Chopper on the
is_lower
benchmark from KLEE:Skipping
main
is the easiest way to trigger the assert:It does not seem to me like it is a critical error, and so I wrote this patch in order to recover and continue with the analysis:
and do the same in
ReachabilityAnalysis
.On larger benchmarks like
bc
, a lot of functions may be found unreachable when trying to skip (almost) everything:Q: Is this a safe way to proceed with this issue? Is it correct to assume that this assertion is not critical?
The text was updated successfully, but these errors were encountered: