@@ -75,7 +75,6 @@ cl::opt<bool> SimplifySymIndices("simplify-sym-indices", cl::init(true));
7575
7676cl::opt<bool > SuppressExternalWarnings (" suppress-external-warnings" , cl::init(true ));
7777
78- cl::opt<bool > NoExternals (" no-externals" , cl::desc(" Do not allow external functin calls" ));
7978} // namespace
8079
8180namespace klee {
@@ -1598,24 +1597,15 @@ void Executor::terminateState(ExecutionState &state, const std::string &reason)
15981597 terminateState (state);
15991598}
16001599
1601- // XXX shoot me
1602- static const char *okExternalsList[] = {" printf" , " fprintf" , " puts" , " getpid" };
1603- static std::set<std::string> okExternals (okExternalsList,
1604- okExternalsList + (sizeof (okExternalsList) / sizeof (okExternalsList[0 ])));
1605-
16061600extern " C" {
16071601typedef uint64_t (*external_fcn_t )(...);
16081602}
16091603
16101604void Executor::callExternalFunction (ExecutionState &state, KInstruction *target, Function *function,
16111605 std::vector<ref<Expr>> &arguments) {
16121606 // check if specialFunctionHandler wants it
1613- if (m_specialFunctionHandler->handle (state, function, target, arguments))
1607+ if (m_specialFunctionHandler->handle (state, function, target, arguments)) {
16141608 return ;
1615-
1616- if (NoExternals && !okExternals.count (function->getName ().str ())) {
1617- llvm::errs () << " KLEE:ERROR: Calling not-OK external function : " << function->getName () << " \n " ;
1618- throw LLVMExecutorException (" externals disallowed" );
16191609 }
16201610
16211611 ExternalDispatcher::Arguments cas;
0 commit comments