RFR[S] : JDK-8244867 : 2 vector api tests crash with assert(is_reference_type(basic_type())) failed: wrong type
Paul Sandoz
paul.sandoz at oracle.com
Thu Jun 18 23:54:42 UTC 2020
Approach looks good to me, but I defer to Vladimir.
Paul.
> On Jun 18, 2020, at 5:44 AM, Bhateja, Jatin <jatin.bhateja at intel.com> wrote:
>
> Hi All,
>
> Following patch fixes the failing jtreg regressions
>
> JBS : https://bugs.openjdk.java.net/browse/JDK-8244867
> Webrev: http://cr.openjdk.java.net/~jbhateja/vectorIntrinsics/BUGS/JDK-8244867/webrev.02/
>
> As per JVM specification section 5.5[1] a meager reference of class passed as parameter (ldc #class.ref)
> to a method invocation does not trigger class initialization.
>
> In this case since JVM flags -Xcomp and -XX:-TieredCompilation are used compilation is triggered at first invocation of the method.
> For gather operation a vector comparison is performed to check if indices are in the valid range
>
> @Override
> @ForceInline
> public final IntMaxMask compare(Comparison op, Vector<Integer> v) {
> return super.compareTemplate(IntMaxMask.class, op, v); // specialize
> }
>
> In above vector compare API a mask class is passed as a parameter, eager compilation(-Xcomp) gets triggered and compiler receives an
> uninitialized class as an argument. This causes an assertion failure while validating static fields (ETYPE and LENGTH)
> Of this un-initialized mask class.
>
> Values of these static fields are used during vector object re-construction in case of deoptimization. Adding safety checks
> to prevent intrincifiation if class arguments of non-primitive types are uninitialized.
>
> Thanks,
> Jatin
>
> [1] : https://docs.oracle.com/javase/specs/jvms/se14/html/jvms-5.html#jvms-5.5
>
More information about the panama-dev
mailing list