Integrated: 8316414: C2: large byte array clone triggers "failed: malformed control flow" assertion failure on linux-x86
Roland Westrelin
roland at openjdk.org
Wed Oct 4 12:09:49 UTC 2023
On Tue, 26 Sep 2023 08:46:40 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> `GraphKit::new_array()` computes the maximum array length as:
>
>
> BasicType bt = ary_type->isa_aryptr()->elem()->array_element_basic_type();
> jint max = TypeAryPtr::max_array_length(bt);
>
>
> while `AllocateArrayNode::make_ideal_length()` calls
> `TypeAryPtr::narrow_size_type()` which in turn uses:
>
>
> jint max_hi = max_array_length(elem()->basic_type());
>
>
> That is, one uses `elem()->array_element_basic_type()` and the other
> `elem()->basic_type()`. As a result, the test that guarantees a new
> array allocation doesn't exceed the maximum array size and the
> `CastII` that narrows the length on the success path for the
> allocation don't use the same maximum array size values. The `CastII`
> one is lower and it is transformed to top. The fallthrough path should
> die but doesn't.
This pull request has now been integrated.
Changeset: 0a3a925a
Author: Roland Westrelin <roland at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/0a3a925ad88921d387aa851157f54ac0054d347b
Stats: 49 lines in 2 files changed: 48 ins; 0 del; 1 mod
8316414: C2: large byte array clone triggers "failed: malformed control flow" assertion failure on linux-x86
Co-authored-by: Roberto Castañeda Lozano <rcastanedalo at openjdk.org>
Reviewed-by: thartmann
-------------
PR: https://git.openjdk.org/jdk/pull/15914
More information about the hotspot-compiler-dev
mailing list