On Wed, 1 Apr 2026 20:08:32 GMT, Igor Veresov <[email protected]> wrote:
>> The problem here is that after method redefinition we still retain an MTD >> object pointing to the old `Method*`. When this old method is eventually >> GCed we end up with a dangling pointer, which when dereferenced leads >> potentially to a crash if this area of metaspace has been overwritten by >> something else. >> >> The solution is to remove pointers to redefined Methods and Klasses from the >> training data after redefinition and preventing the re-addition of those >> again. I also added some verification to check the training data stays clean. >> >> This change will go in after #30517 is pushed. > > Igor Veresov has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains four additional > commits since the last revision: > > - Add test by Ioi > - Merge branch 'master' into 8379819-cleanup-td-redef > - Fix no-CDS build > - Cleanup TD after redefinition Ok, internal testing looks good, I'm going to push it. ------------- PR Comment: https://git.openjdk.org/jdk/pull/30540#issuecomment-4173716872
