diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2018-07-07 21:07:32 +0100 |
---|---|---|
committer | MartinNowack <martin.nowack@gmail.com> | 2018-07-11 00:32:20 +0100 |
commit | 0804c98436d9507d9074ad9ea958d98692e3f89c (patch) | |
tree | d3f87ea84c4ccb7fd0ac75d68de42b652b91356d /lib/Core | |
parent | f30de64e0babbcc68e1611ea4f191ca20c80a837 (diff) | |
download | klee-0804c98436d9507d9074ad9ea958d98692e3f89c.tar.gz |
Removed support for klee_make_symbolic with 2 arguments. This has been deprecated for many years now and causes problems during replay. Changed and simplified affected test case.
Diffstat (limited to 'lib/Core')
-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\""); |