[lilliput-jdk17u:lilliput] RFR: 8311866: [Lilliput/JDK17] Disallow accessing oop metadata vmStructs with +UCOH [v2]
Thomas Stuefe
stuefe at openjdk.org
Tue Jul 11 13:49:21 UTC 2023
On Tue, 11 Jul 2023 12:19:47 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`
>> - [ ] Linux x86_64 fastdebug `tier1 tier2`, default
>> - [ ] Linux x86_64 fastdebug `tier1 tier2`, `+UCOH`
>
> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>
> Move fakeOopDesc
Regrettable but okay.
-------------
Marked as reviewed by stuefe (Reviewer).
PR Review: https://git.openjdk.org/lilliput-jdk17u/pull/51#pullrequestreview-1524319957
More information about the lilliput-dev
mailing list