RFR: 8320308: C2 compilation crashes in LibraryCallKit::inline_unsafe_access

Tobias Holenstein tholenstein at openjdk.org
Thu Aug 15 12:09:53 UTC 2024


On Wed, 10 Jul 2024 21:25:47 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

> > } else if (_gvn.type(base->uncast()) == TypePtr::NULL_PTR) {
> 
> IMO a better alternative is to drop speculative part before performing the comparison:
> 
> ```
> } else if (base_type->remove_speculative() == TypePtr::NULL_PTR) {
> ```

This does not work unfortunately. 

<img width="470" alt="type" src="https://github.com/user-attachments/assets/bbb89e76-6708-4ad3-bc89-7ee417ad2aa2">

`LibraryCallKit::classify_unsafe_addr(Node* &base, ...` is called with `base` = `147  CheckCastPP` 
and then `base_type` is `java/lang/Object * (speculative=byte[int:>=0] (java/lang/Cloneable,java/io/Serializable):NotNull:exact * (inline_depth=2))`

`base_type->remove_speculative()` results in `java/lang/Object *`

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

PR Comment: https://git.openjdk.org/jdk/pull/20033#issuecomment-2291151246


More information about the hotspot-compiler-dev mailing list