From ed8f5cbc67a026537c628335b32eb6b628187679 Mon Sep 17 00:00:00 2001 From: Yizhi Liu Date: Sun, 21 Jun 2020 13:28:10 -0700 Subject: [PATCH] [BACKPORT-0.6][Fix][VM] Fix copy constructor Co-authored-by: ga --- src/runtime/vm/vm.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/vm/vm.cc b/src/runtime/vm/vm.cc index 333dd1e44506..d263fd97e0fc 100644 --- a/src/runtime/vm/vm.cc +++ b/src/runtime/vm/vm.cc @@ -168,7 +168,7 @@ Instruction& Instruction::operator=(const Instruction& instr) { this->result = instr.result; return *this; case Opcode::AllocTensor: - this->alloc_tensor.storage = this->alloc_tensor.storage; + this->alloc_tensor.storage = instr.alloc_tensor.storage; this->alloc_tensor.ndim = instr.alloc_tensor.ndim; this->alloc_tensor.shape = Duplicate(instr.alloc_tensor.shape, instr.alloc_tensor.ndim);