From 4fc550bf356f71e965ef7927eb4fa28cc1efabe3 Mon Sep 17 00:00:00 2001 From: zhangzhenghsy Date: Sun, 16 Jul 2023 23:21:56 -0700 Subject: [PATCH] For Kmalloc/KZalloc, not initialize the memeory to zero to solve some FN --- lib/Core/SpecialFunctionHandler.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Core/SpecialFunctionHandler.cpp b/lib/Core/SpecialFunctionHandler.cpp index f666bb0..98feaa1 100644 --- a/lib/Core/SpecialFunctionHandler.cpp +++ b/lib/Core/SpecialFunctionHandler.cpp @@ -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 > &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 > &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,