RFR: 8284760: Correct type/array element offset in LibraryCallKit::get_state_from_digest_object()

Roland Westrelin roland at openjdk.java.net
Wed Apr 13 07:24:17 UTC 2022


On Tue, 12 Apr 2022 15:56:15 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

> In LibraryCallKit::get_state_from_digest_object() we call array_element_address() with T_INT, even though the input array might also be T_BYTE or T_LONG. This doesn't currently matter much: array elements always start at the same offset regardless of the element type. In Lilliput I'm trying to tighten the start of array elements though, and this causes problems because I can do smaller alignments for T_BYTE and T_INT, but not for T_LONG.
> 
> See also: https://github.com/openjdk/lilliput/pull/41
> 
> Let's just use the correct type in array_element_address().
> 
> Testing:
>  - [x] tier1
>  - [x] jdk_security (includes relevant cipher tests)

Looks reasonable to me.

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

Marked as reviewed by roland (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/8208


More information about the hotspot-compiler-dev mailing list