RFR: 8279219: [REDO] C2 crash when allocating array of size too large [v3]

Vladimir Ivanov vlivanov at openjdk.java.net
Fri Feb 11 10:26:09 UTC 2022


On Fri, 11 Feb 2022 09:01:20 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> Thinking more about it, it seems like a bug. For a large enough allocation, it may erroneously classify it as erroneous. Will it trigger wrong exception being thrown?
>
> Thanks for looking at this.
> That's not what I observe. bt = T_BYTE for new byte[..].

You are right. (Was looking at it in the context of #6717.)

I missed that it is `ciArrayKlass::element_type()` which returns `ciType*` (instead of `Type*`) and `ciTypeArrayKlass::element_type()` relies on `Klass::layout_helper_element_type` to acquire proper element type. 

Sorry for the noise.

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

PR: https://git.openjdk.java.net/jdk/pull/6952


More information about the hotspot-compiler-dev mailing list