RFR: 7124710: interleaved RedefineClasses() and RetransformClasses() calls may have a problem [v8]
Alex Menkov
amenkov at openjdk.org
Fri Oct 7 19:44:33 UTC 2022
> The problem is RedefineClasses does not update cached_class_bytes, so subsequent RetransformClasses gets obsolete class bytes (this are testcases 3-6 from the new test)
>
> cached_class_bytes are set when an agent instruments the class from ClassFileLoadHook.
> After successful RedefineClasses it should be reset.
> The fix updates ClassFileLoadHook caller to not use old cached_class_bytes with RedefineClasses (if some agent instruments the class, new cached_class_bytes are allocated for scratch_class) and updates cached_class_bytes after successful RedefineClasses or RetransformClasses.
Alex Menkov has updated the pull request incrementally with one additional commit since the last revision:
Updated comments per Dan's request
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/10032/files
- new: https://git.openjdk.org/jdk/pull/10032/files/36c4ba60..63b5589f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=10032&range=07
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=10032&range=06-07
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/10032.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10032/head:pull/10032
PR: https://git.openjdk.org/jdk/pull/10032
More information about the serviceability-dev
mailing list