> The raw `Method*` stored in `_all_mirandas` were unsafe as the `Method` could 
> be reclaimed when class redefinition occurs. Using the code from 
> `JfrMethodProcessor` we extracted a new helper class, `ProtectedMethods` to 
> preserve the lifetime of the `Method`s whilst they are in use. This is used 
> across classfile parsing, and was also needed in 
> `JfrClassTransformer::create_new_instance_klass`.
> 
> The new test easily demonstrated the crash prior to the fix, running 
> concurrent loads and redefinitions, over a 60 second timeframe. Due to the 
> length of the test it is not run in tier1 but in tier2.
> 
> Testing:
>  - tiers 1-3 general testing
>  - tier 5 for JFR
>  - local testing
> 
> I ran some of the classloading microbenchmarks and did not see any signs of 
> there being additional overhead associated with the new code - of course it 
> will be highly dependent on the number of interfaces encountered with default 
> methods. I'm also running some tests through our performance system.
> 
> Thanks
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

David Holmes has updated the pull request incrementally with two additional 
commits since the last revision:

 - 8396943: SIGSEGV in DefaultMethods::generate_default_methods while 
redefining a
   default method
   - version 2
 - Revert "8396943: SIGSEGV in DefaultMethods::generate_default_methods while 
redefining a default method"
   
   This reverts commit daf327045a25a354ae243299aba54caf007deb4c.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/34016/files
  - new: https://git.openjdk.org/jdk/pull/34016/files/daf32704..d075f63b

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=34016&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=34016&range=00-01

  Stats: 177 lines in 12 files changed: 60 ins; 95 del; 22 mod
  Patch: https://git.openjdk.org/jdk/pull/34016.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/34016/head:pull/34016

PR: https://git.openjdk.org/jdk/pull/34016

Reply via email to