Get<Primitive>ArrayElements and zero-sized arrays

David Holmes david.holmes at oracle.com
Wed Aug 18 04:54:20 UTC 2021


Hi Thomas,

On 18/08/2021 2:29 pm, Thomas Stüfe wrote:
> Hi,
> 
> in jni.cpp, in DEFINE_GETSCALARARRAYELEMENTS, we return a non-NULL write
> protected special marker address in case the array was zero sized.
> 
> Is there a particular reason to still allow read access from that address?
> The change history does not tell since the code seems to be older than the
> mercurial history.

It was introduced by this issue:

https://bugs.openjdk.java.net/browse/JDK-4804447

Is there a reason to not return a readable address?

Cheers,
David

> Thanks, Thomas
> 


More information about the hotspot-runtime-dev mailing list