RFR: 8274024: Use regular accessors to internal fields of oopDesc

Kim Barrett kbarrett at openjdk.java.net
Sat Sep 25 22:42:50 UTC 2021


On Mon, 20 Sep 2021 18:59:34 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

> Currently, we are using 'raw' accessors to initialize the mark, Klass*, (array-)length and klass_gap of oops. This is ugly and confusing and we should just use the regular accessors.
> 
> Testing:
>  - [ ] tier1
>  - [ ] tier2
>  - [ ] hotspot_gc

I agree with Stefan and David - don't treat the values as oops until they are well-formed.

It turns out there's a pre-existing problem about that; both the proposed changes here and pre-existing code technically invoke UB.  See JDK-8274322.

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

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


More information about the hotspot-dev mailing list