RFR (S) 8250844: Make sure {type, obj}ArrayOopDesc accessors check the bounds
Reingruber, Richard
richard.reingruber at sap.com
Fri Jul 31 11:37:40 UTC 2020
I noticed this too. But then I thought, the offset could be checked for every kind of java heap
object, maybe guarded by some PedanticChecks flag. On the other hand one could argue that for
instance field accesses the offset is correct by construction.
Well, I reckon your fix is a good and balanced solution.
Thanks, Richard.
-----Original Message-----
From: Aleksey Shipilev <shade at redhat.com>
Sent: Freitag, 31. Juli 2020 11:27
To: Reingruber, Richard <richard.reingruber at sap.com>; hotspot-runtime-dev at openjdk.java.net
Subject: Re: RFR (S) 8250844: Make sure {type, obj}ArrayOopDesc accessors check the bounds
On 7/31/20 11:11 AM, Reingruber, Richard wrote:
> it does make sense to add the range checks and your patch looks good to me.
> // Not Reviewer though.
Thanks!
> Maybe bounds should be checked even at a lower level, namely in HeapAccess?
I briefly considered it yesterday. But AFAIU, HeapAccess is too low-level: it does not know about
arrays, only about oop + offset. So {type,obj}ArrayOopDesc seems as low as we can get.
--
-Aleksey
More information about the hotspot-runtime-dev
mailing list