From: SeungRyeol Lee Date: Mon, 23 Jul 2018 20:14:05 +0000 (+0900) Subject: Fix using the uninitialized disassemble object. (#220) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2cd60b277e909a5599ca48e4561cbfbc61460186;p=riscv-isa-sim.git Fix using the uninitialized disassemble object. (#220) This fixes runtime crash when custom extension registers its disassembly. --- 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(); }