Skip to content

Commit

Permalink
[] to remove
Browse files Browse the repository at this point in the history
  • Loading branch information
ocelaiwo committed Oct 12, 2023
1 parent 110aa91 commit 68180ab
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/Core/Executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,7 @@ MemoryObject *Executor::addExternalObject(ExecutionState &state, void *addr,
bool isReadOnly) {
auto mo = memory->allocateFixed(reinterpret_cast<std::uint64_t>(addr), size,
nullptr);
llvm::errs() << "[constantSource] ExternalObject\n";
auto array = makeArray(ConstantExpr::createPointer(size),
SourceBuilder::constant(SparseStorage(
ConstantExpr::create(0, Expr::Int8))));
Expand Down Expand Up @@ -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))));
Expand Down Expand Up @@ -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))));
Expand Down Expand Up @@ -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))));
Expand Down Expand Up @@ -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))));
Expand Down Expand Up @@ -5138,6 +5141,7 @@ void Executor::executeAlloc(ExecutionState &state, ref<Expr> size, bool isLocal,
} else {
ref<SymbolicSource> 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);
Expand Down Expand Up @@ -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))));
Expand Down Expand Up @@ -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))));
Expand All @@ -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))));
Expand Down
1 change: 1 addition & 0 deletions lib/Core/Memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ const UpdateList &ObjectState::getUpdates() const {
auto value = knownSymbolics.load(i);
values.store(i, cast<ConstantExpr>(value));
}
llvm::errs() << "[constantSource] getUpdates\n";
auto array = getArrayCache()->CreateArray(
updates.root->size, SourceBuilder::constant(values));
updates = UpdateList(array, nullptr);
Expand Down
1 change: 1 addition & 0 deletions lib/Core/SpecialFunctionHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))));
Expand Down
1 change: 1 addition & 0 deletions lib/Expr/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ SourceResult ParserImpl::ParseConstantSource() {
}

SparseStorage<ref<ConstantExpr>> Values(storage, defaultValue);
llvm::errs() << "[constantSource] Parser\n";
return SourceBuilder::constant(Values);
}

Expand Down

0 comments on commit 68180ab

Please sign in to comment.