RFR: 8276314: [JVMCI] check alignment of call displacement during code installation
Vladimir Kozlov
kvn at openjdk.java.net
Tue Nov 2 22:45:10 UTC 2021
On Tue, 2 Nov 2021 21:31:25 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
> This PR add verification of code alignment invariants related to x64 call instructions during code installation.
> This in turn allows a JVMCI compilation that generates a misaligned call to fail gracefully (i.e. bailout) instead of the VM crashing when it checks alignment before patching the displacement of a call instruction.
src/hotspot/cpu/x86/jvmciCodeInstaller_x86.cpp line 191:
> 189: }
> 190: default:
> 191: JVMCI_ERROR("invalid _next_call_type value");
May be print `%d` invalid call type here too since you are changing code around.
src/hotspot/cpu/x86/jvmciCodeInstaller_x86.cpp line 194:
> 192: return;
> 193: }
> 194: if (os::is_MP() && !call->is_displacement_aligned()) {
You are checking for `MP` in current era? Why not always require alignment?
-------------
PR: https://git.openjdk.java.net/jdk/pull/6218
More information about the hotspot-compiler-dev
mailing list