Skip to content

Commit

Permalink
Merge pull request #37 from NilFoundation/36-store-segfault
Browse files Browse the repository at this point in the history
Fix segfault in store handling
  • Loading branch information
nkaskov authored Apr 19, 2023
2 parents 14c4c68 + a5dd243 commit b85eff1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/nil/blueprint/parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ namespace nil {
auto *store_inst = llvm::cast<llvm::StoreInst>(inst);
Pointer<var> ptr = resolve_pointer(frame, store_inst->getPointerOperand());
const llvm::Value *val = store_inst->getValueOperand();
llvm::Type *store_type = store_inst->getType();
llvm::Type *store_type = val->getType();
if (store_type->isPointerTy()) {
ptr.store_pointer(frame.pointers[val]);
} else if (store_type->isIntegerTy() ||
Expand Down Expand Up @@ -620,6 +620,7 @@ namespace nil {
std::cerr << inst->getOpcodeName() << std::endl;
assert(1 == 0 && "unsupported opcode type");
}
return nullptr;
}

public:
Expand Down

0 comments on commit b85eff1

Please sign in to comment.