Skip to content

Commit

Permalink
For Kmalloc/KZalloc, not initialize the memeory to zero to solve some FN
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzhenghsy committed Jul 17, 2023
1 parent b17ae18 commit 4fc550b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Core/SpecialFunctionHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -982,21 +982,21 @@ void SpecialFunctionHandler::handleDivRemOverflow(ExecutionState &state,
}

// yu hao: handle kernel function
// set the memory to zero
// Not set the memory to zero (under-constraint feature)
void SpecialFunctionHandler::handleKmalloc(ExecutionState &state,
KInstruction *target,
std::vector<ref<Expr> > &arguments) {
// XXX should type check args
//assert(arguments.size()==2 && "invalid number of arguments to kmalloc");
executor.executeAlloc(state, arguments[0], false, target, true);
executor.executeAlloc(state, arguments[0], false, target, false);
}

// Not set the memory to zero (under-constraint feature)
void SpecialFunctionHandler::handlekmem_cache_alloc_trace(ExecutionState &state,
KInstruction *target,
std::vector<ref<Expr> > &arguments) {
// XXX should type check args
//assert(arguments.size()==2 && "invalid number of arguments to kmalloc");
executor.executeAlloc(state, arguments[2], false, target, true);
executor.executeAlloc(state, arguments[2], false, target, false);
}

void SpecialFunctionHandler::handleIminor(ExecutionState &state,
Expand Down

0 comments on commit 4fc550b

Please sign in to comment.