Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions lib/Core/TxDependency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1072,13 +1072,15 @@ TxDependency::bindReturnValue(llvm::CallInst *site,
std::vector<llvm::Instruction *> &callHistory,
llvm::Instruction *i, ref<Expr> returnValue) {
llvm::ReturnInst *retInst = llvm::dyn_cast<llvm::ReturnInst>(i);
if (site && retInst &&
retInst->getReturnValue() // For functions returning void
) {
ref<TxStateValue> value =
getLatestValue(retInst->getReturnValue(), callHistory, returnValue);
if (site && retInst) {
ref<TxStateValue> value;
if (!callHistory.empty()) {
callHistory.pop_back();
}else{
klee_error("Encountered an unexpected mismatch between function calls and returns on the stack");
}
if(retInst->getReturnValue()) {
value = getLatestValue(retInst->getReturnValue(), callHistory, returnValue);
}
if (!value.isNull())
addDependency(value, getNewTxStateValue(site, callHistory, returnValue));
Expand Down