[lilliput-jdk17u:lilliput] RFR: 8311866: [Lilliput/JDK17] Disallow accessing oop metadata vmStructs with +UCOH [v2]
Aleksey Shipilev
shade at openjdk.org
Tue Jul 11 12:19:47 UTC 2023
> 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
-------------
Changes:
- all: https://git.openjdk.org/lilliput-jdk17u/pull/51/files
- new: https://git.openjdk.org/lilliput-jdk17u/pull/51/files/051188ae..63fe9746
Webrevs:
- full: https://webrevs.openjdk.org/?repo=lilliput-jdk17u&pr=51&range=01
- incr: https://webrevs.openjdk.org/?repo=lilliput-jdk17u&pr=51&range=00-01
Stats: 20 lines in 2 files changed: 10 ins; 10 del; 0 mod
Patch: https://git.openjdk.org/lilliput-jdk17u/pull/51.diff
Fetch: git fetch https://git.openjdk.org/lilliput-jdk17u.git pull/51/head:pull/51
PR: https://git.openjdk.org/lilliput-jdk17u/pull/51
More information about the lilliput-dev
mailing list