From a02d8001fa43b379bee3803cda06a15a64d99ac2 Mon Sep 17 00:00:00 2001 From: Vladimir Kempik Date: Mon, 5 Jun 2023 07:30:28 +0000 Subject: [PATCH] 8309405: RISC-V: is_deopt may produce unaligned memory read Reviewed-by: fyang, luhenry --- src/hotspot/cpu/riscv/nativeInst_riscv.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hotspot/cpu/riscv/nativeInst_riscv.hpp b/src/hotspot/cpu/riscv/nativeInst_riscv.hpp index bc575530e2177..3c6ec1cf588b3 100644 --- a/src/hotspot/cpu/riscv/nativeInst_riscv.hpp +++ b/src/hotspot/cpu/riscv/nativeInst_riscv.hpp @@ -624,7 +624,7 @@ class NativeDeoptInstruction: public NativeInstruction { static bool is_deopt_at(address instr) { assert(instr != nullptr, ""); - uint32_t value = *(uint32_t *) instr; + uint32_t value = Assembler::ld_instr(instr); // 0xc0201073 encodes CSRRW x0, instret, x0 return value == 0xc0201073; }