Skip to content

Commit

Permalink
8309405: RISC-V: is_deopt may produce unaligned memory read
Browse files Browse the repository at this point in the history
Reviewed-by: fyang, luhenry
  • Loading branch information
Vladimir Kempik committed Jun 5, 2023
1 parent 3fa776d commit a02d800
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hotspot/cpu/riscv/nativeInst_riscv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

1 comment on commit a02d800

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.