RFR: 8355915: [leyden] Crash in MDO clearing the unloaded array type [v2]

Aleksey Shipilev shade at openjdk.org
Wed Apr 30 10:01:58 UTC 2025


On Wed, 30 Apr 2025 09:18:43 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Caught this when doing benchmarks with Spring Boot. See the bug for reproducer.
>> 
>> The lifecycle of array types of `T` is bound to the lifecycle of `T` themselves. So the fix does similar thing to `is_excluded` and other code: when we encounter the `T[]`, we ask if its bottom component classes is not yet initialized. This fits nicely with our current uses, which skip such classes, and ever touch their (potentially nullptr) CLDs.
>> 
>> Additional testing:
>>  - [x] Ad-hoc testing with most recent spring-boot-petclinic
>>  - [x] Linux x86_64 server fastdebug, `runtime/cds`
>
> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   More robust fix

I now see @veresov had a similar trouble: https://github.com/shipilev/leyden/commit/a77cc17caa039a862b62cd64c67e35e666b66a48. I think we can both a bit cleaner by introducing an utility method straight in `Klass`.

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

PR Comment: https://git.openjdk.org/leyden/pull/64#issuecomment-2841448870


More information about the leyden-dev mailing list