RFR: 8309405: RISC-V: is_deopt may produce unaligned memory read

Vladimir Kempik vkempik at openjdk.org
Sat Jun 3 12:42:08 UTC 2023


Please review this simple fix, a continuation of JDK-8291550.

Doing some profiling for trp_lam event (misaligned load emulation) on fpga I've found some more misaligned loads, pretty rare but still happens.
Here, is_deopt directly dereferences memory address, but with RVC enabled, a single 4-byte intruction could be 2-bytes, but not 4-bytes aligned.
So is_deopt should use ld_instr to be on safe side.

Testing: tbd, gonna test tier1 and update this PR.

-------------

Commit messages:
 - fix is_deopt to prevent misaligned access

Changes: https://git.openjdk.org/jdk/pull/14299/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14299&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8309405
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/14299.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14299/head:pull/14299

PR: https://git.openjdk.org/jdk/pull/14299


More information about the hotspot-compiler-dev mailing list