JDK-8273020 : LibraryCallKit::sharpen_unsafe_type does not handle narrow oop array
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,17,18
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-08-26
  • Updated: 2021-09-28
  • Resolved: 2021-08-27
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 18
18 b13Fixed
Related Reports
Relates :  
Description
The following code in LibraryCallKit::sharpen_unsafe_type sets elem_type to NULL if the array element is a narrow oop:

const TypeOopPtr *elem_type = adr_type->is_aryptr()->elem()->isa_oopptr();

Comments
Changeset: c925c7f3 Author: Tobias Hartmann <thartmann@openjdk.org> Date: 2021-08-27 05:38:24 +0000 URL: https://git.openjdk.java.net/jdk/commit/c925c7f3e8e1470d0a157ca3387d11137366706f
27-08-2021

ILW = Type not sharpened in C2 (should not have any impact with current code), with unsafe array accesses, no workaround = LLH = P5
26-08-2021