[lilliput-jdk17u:lilliput] Integrated: 8311866: [Lilliput/JDK17] Disallow accessing oop metadata vmStructs with +UCOH

Aleksey Shipilev shade at openjdk.org
Wed Jul 12 15:33:31 UTC 2023


On Tue, 11 Jul 2023 10:51:53 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Allowing external tools to access e.g. `oopDesc::_metadata._klass` with `+UCOH` is error-prone. We have seen async-profiler poking into this field to resolve classes: https://github.com/async-profiler/async-profiler/blob/117594bb4d1ce61b073c8a9cea438b33f3f09c81/src/vmStructs.cpp#L158-L161
> 
> This hides the fields from vmStructs with +UCOH. This is the least intrusive way of achieving this I can come up with.
> 
> Additional testing:
>  - [x] Eyeballing instrumented async-profiler initialization path
>  - [x] Linux x86_64 fastdebug `serviceability/sa`, default
>  - [x] Linux x86_64 fastdebug `serviceability/sa`, `+UCOH`
>  - [x] Linux x86_64 fastdebug `tier1 tier2`, default
>  - [x] Linux x86_64 fastdebug `tier1 tier2`, `+UCOH`

This pull request has now been integrated.

Changeset: c4cda3ce
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.org/lilliput-jdk17u/commit/c4cda3ce9011a6e647a5b5bbe7cefef521c95c59
Stats:     51 lines in 3 files changed: 51 ins; 0 del; 0 mod

8311866: [Lilliput/JDK17] Disallow accessing oop metadata vmStructs with +UCOH

Reviewed-by: rkennke, stuefe

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

PR: https://git.openjdk.org/lilliput-jdk17u/pull/51


More information about the lilliput-dev mailing list