From 2cd60b277e909a5599ca48e4561cbfbc61460186 Mon Sep 17 00:00:00 2001 From: SeungRyeol Lee Date: Tue, 24 Jul 2018 05:14:05 +0900 Subject: [PATCH] Fix using the uninitialized disassemble object. (#220) This fixes runtime crash when custom extension registers its disassembly. --- riscv/processor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/riscv/processor.cc b/riscv/processor.cc index 9fc5d5f..52f69c1 100644 --- a/riscv/processor.cc +++ b/riscv/processor.cc @@ -24,11 +24,11 @@ processor_t::processor_t(const char* isa, simif_t* sim, uint32_t id, : debug(false), halt_request(false), sim(sim), ext(NULL), id(id), halt_on_reset(halt_on_reset), last_pc(1), executions(1) { + disassembler = new disassembler_t(max_xlen); parse_isa_string(isa); register_base_instructions(); mmu = new mmu_t(sim, this); - disassembler = new disassembler_t(max_xlen); reset(); } -- 2.30.2