JDK-8260502 : [s390] NativeMovRegMem::verify() fails because it's too strict
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • CPU: s390x
  • Submitted: 2021-01-27
  • Updated: 2021-02-04
  • Resolved: 2021-01-28
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 17
11.0.11Fixed 17 b08Fixed
Related Reports
Relates :  
Description
We observed "fatal error: this is not a `NativeMovRegMem' site" in a test which runs without CompressedOops with debug build.
Reason is that NativeMovRegMem::verify() is too strict. With disabled CompressedOops, it checks instructions beyond the 12 Bytes for the patchable load_const. C1 patching stubs place the patching record there so there are no valid instructions. (Note that this was different before JDK-8233081.)
Code is fine, verification is wrong. NativeMovRegMem is only used for access_field_patching on s390. The affected code is the patching template which never gets executed.

Stack snippet:
V  [libjvm.so+0xf21ca0]  NativeMovRegMem::verify()+0x160
V  [libjvm.so+0x51a27a]  Runtime1::patch_code(JavaThread*, Runtime1::StubID)+0x22ba
V  [libjvm.so+0x51ada8]  Runtime1::access_field_patching(JavaThread*)+0x48
v  ~RuntimeStub::access_field_patching Runtime1 stub
J 691 c1 java.lang.String.<init>([BIILjava/nio/charset/Charset;)V

Comments
Fix Request JDK-8233081 was backported to 11u, so this follow-up fix is needed, too. Applies cleanly.
29-01-2021

Changeset: 87522573 Author: Martin Doerr <mdoerr@openjdk.org> Date: 2021-01-28 11:39:06 +0000 URL: https://git.openjdk.java.net/jdk/commit/87522573
28-01-2021