JDK-8233081 : C1: PatchingStub for field access copies too much
  • Type:Bug
  • Component:hotspot
  • Sub-Component:compiler
  • Affected Version:11,14
  • Priority:P4
  • Status:Resolved
  • Resolution:Fixed
  • Submitted:2019-10-28
  • Updated:2021-01-27
  • Resolved:2019-11-05
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 11JDK 13JDK 14
11.0.6Fixed 13.0.4Fixed 14 b22Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
C1's PatchingStub copies bytes from the method's regular code area to a dedicated patching template which gets copied back when the patching work is completed. Currently, C1's PatchingStub with PatchID "access_field_id" copies all bytes between the PatchingStub's instanciation and the patching_epilog call. This is not only more than necessary, it can cause _bytes_to_copy to exceed its one byte limitation: emit_int8(_bytes_to_copy). On some platforms, code for VerifyOops is part of the code which gets copied forth and back. This is unnecessary and should be avoided. Note that the template for PatchID "access_field_id" never gets executed, so there's no reason for copying more than the code to be patched. So there are basically 2 issues: - Possible size overflow (depending on platform and activated features) - Wasted code cache space 
Comments
Fix request jdk13u Applies cleanly.
29-05-2020

Fix request jdk11u Already backported to 11.0.7-oracle. We should have it in open 11u, too. Applies cleanly.
20-11-2019

URL: https://hg.openjdk.java.net/jdk/jdk/rev/8623f75be895 User: mdoerr Date: 2019-11-05 10:54:18 +0000
05-11-2019

ILW = C1 patching may overflow and/or waste code cache space, when patching field access but never showed up, no workaround = MLH = P4
29-10-2019



close