diff options
Diffstat (limited to 'lib/Core/SpecialFunctionHandler.cpp')
-rw-r--r-- | lib/Core/SpecialFunctionHandler.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/Core/SpecialFunctionHandler.cpp b/lib/Core/SpecialFunctionHandler.cpp index 62526c94..3b281d66 100644 --- a/lib/Core/SpecialFunctionHandler.cpp +++ b/lib/Core/SpecialFunctionHandler.cpp @@ -755,19 +755,13 @@ void SpecialFunctionHandler::handleMakeSymbolic(ExecutionState &state, std::vector<ref<Expr> > &arguments) { std::string name; - // FIXME: For backwards compatibility. We should eventually enforce the - // correct arguments and types. - switch (arguments.size()) { - case 2: - klee_warning("klee_make_symbolic: deprecated number of arguments (2 instead of 3)"); - break; - case 3: - name = arguments[2]->isZero() ? "" : readStringAtAddress(state, arguments[2]); - break; - default: - executor.terminateStateOnError(state, "illegal number of arguments to klee_make_symbolic(void*, size_t, char*)", Executor::User); - return; + if (arguments.size() != 3) { + executor.terminateStateOnError(state, "Incorrect number of arguments to klee_make_symbolic(void*, size_t, char*)", Executor::User); + return; } + + name = arguments[2]->isZero() ? "" : readStringAtAddress(state, arguments[2]); + if (name.length() == 0) { name = "unnamed"; klee_warning("klee_make_symbolic: renamed empty name to \"unnamed\""); |