From 68180ab68849913c36898574997fde1c4304c840 Mon Sep 17 00:00:00 2001 From: Aleksei Babushkin Date: Thu, 12 Oct 2023 17:35:22 +0300 Subject: [PATCH] [] to remove --- lib/Core/Executor.cpp | 11 +++++++++-- lib/Core/Memory.cpp | 1 + lib/Core/SpecialFunctionHandler.cpp | 1 + lib/Expr/Parser.cpp | 1 + 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp index 1f4d05db0e..56b21e00dd 100644 --- a/lib/Core/Executor.cpp +++ b/lib/Core/Executor.cpp @@ -677,6 +677,7 @@ MemoryObject *Executor::addExternalObject(ExecutionState &state, void *addr, bool isReadOnly) { auto mo = memory->allocateFixed(reinterpret_cast(addr), size, nullptr); + llvm::errs() << "[constantSource] ExternalObject\n"; auto array = makeArray(ConstantExpr::createPointer(size), SourceBuilder::constant(SparseStorage( ConstantExpr::create(0, Expr::Int8)))); @@ -747,6 +748,7 @@ void Executor::allocateGlobalObjects(ExecutionState &state) { true, nullptr, 8); errnoObj->isFixed = true; + llvm::errs() << "[constantSource] errno\n"; auto array = makeArray(Expr::createPointer(sizeof(*errno_addr)), SourceBuilder::constant(SparseStorage( ConstantExpr::create(0, Expr::Int8)))); @@ -905,8 +907,7 @@ void Executor::initializeGlobalObjects(ExecutionState &state) { for (const GlobalVariable &v : m->globals()) { MemoryObject *mo = globalObjects.find(&v)->second; - // auto array = - // makeArray(Expr::createPointer(mo->size), SourceBuilder::global(v)); + llvm::errs() << "[constantSource] Global\n"; auto array = makeArray(Expr::createPointer(mo->size), SourceBuilder::constant(SparseStorage( ConstantExpr::create(0, Expr::Int8)))); @@ -1773,6 +1774,7 @@ MemoryObject *Executor::serializeLandingpad(ExecutionState &state, MemoryObject *mo = allocate(state, Expr::createPointer(serialized.size()), true, false, nullptr, 1); + llvm::errs() << "[constantSource] Landingpad\n"; auto array = makeArray(Expr::createPointer(serialized.size()), SourceBuilder::constant(SparseStorage( ConstantExpr::create(0, Expr::Int8)))); @@ -2335,6 +2337,7 @@ void Executor::executeCall(ExecutionState &state, KInstruction *ki, Function *f, 0, "While allocating varargs: malloc did not align to 16 bytes."); } + llvm::errs() << "[constantSource] Varargs\n"; auto array = makeArray(Expr::createPointer(mo->size), SourceBuilder::constant(SparseStorage( ConstantExpr::create(0, Expr::Int8)))); @@ -5138,6 +5141,7 @@ void Executor::executeAlloc(ExecutionState &state, ref size, bool isLocal, } else { ref source = nullptr; if (zeroMemory) { + llvm::errs() << "[constantSource] Zeroed-memory alloca\n"; source = SourceBuilder::constant(SparseStorage(ConstantExpr::create(0, Expr::Int8))); } else { source = SourceBuilder::uninitialized(allocations++, target); @@ -6543,6 +6547,7 @@ void Executor::executeMakeSymbolic(ExecutionState &state, } } } else { + llvm::errs() << "[constantSource] Replay\n"; auto array = makeArray(Expr::createPointer(mo->size), SourceBuilder::constant(SparseStorage( ConstantExpr::create(0, Expr::Int8)))); @@ -6629,6 +6634,7 @@ ExecutionState *Executor::formState(Function *f, int argc, char **argv, llvm::Type *argvType = llvm::ArrayType::get(argumentType, 1); + llvm::errs() << "[constantSource] argvMO\n"; auto array = makeArray(Expr::createPointer(argvMO->size), SourceBuilder::constant(SparseStorage( ConstantExpr::create(0, Expr::Int8)))); @@ -6652,6 +6658,7 @@ ExecutionState *Executor::formState(Function *f, int argc, char **argv, if (!arg) klee_error("Could not allocate memory for function arguments"); + llvm::errs() << "[constantSource] Args\n"; auto array = makeArray(Expr::createPointer(arg->size), SourceBuilder::constant(SparseStorage( ConstantExpr::create(0, Expr::Int8)))); diff --git a/lib/Core/Memory.cpp b/lib/Core/Memory.cpp index 8b06ef7afb..3e6cc1e7af 100644 --- a/lib/Core/Memory.cpp +++ b/lib/Core/Memory.cpp @@ -111,6 +111,7 @@ const UpdateList &ObjectState::getUpdates() const { auto value = knownSymbolics.load(i); values.store(i, cast(value)); } + llvm::errs() << "[constantSource] getUpdates\n"; auto array = getArrayCache()->CreateArray( updates.root->size, SourceBuilder::constant(values)); updates = UpdateList(array, nullptr); diff --git a/lib/Core/SpecialFunctionHandler.cpp b/lib/Core/SpecialFunctionHandler.cpp index a81fbbd819..582f5a95d6 100644 --- a/lib/Core/SpecialFunctionHandler.cpp +++ b/lib/Core/SpecialFunctionHandler.cpp @@ -866,6 +866,7 @@ void SpecialFunctionHandler::handleDefineFixedObject( MemoryObject *mo = executor.memory->allocateFixed(address, size, state.prevPC->inst); + llvm::errs() << "[constantSource] handleDefineFixedObject\n"; auto array = executor.makeArray(ConstantExpr::createPointer(size), SourceBuilder::constant(SparseStorage( ConstantExpr::create(0, Expr::Int8)))); diff --git a/lib/Expr/Parser.cpp b/lib/Expr/Parser.cpp index df12ca33b4..0be7629844 100644 --- a/lib/Expr/Parser.cpp +++ b/lib/Expr/Parser.cpp @@ -557,6 +557,7 @@ SourceResult ParserImpl::ParseConstantSource() { } SparseStorage> Values(storage, defaultValue); + llvm::errs() << "[constantSource] Parser\n"; return SourceBuilder::constant(Values); }