Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8279300

[arm32] SIGILL when running GetObjectSizeIntrinsicsTest

XMLWordPrintable

    • b05
    • arm
    • linux

        Synopsis:
        1. Release runtime crashes with SIGILL when executing JITed code
        2. Debug runtime asserts at C1 thread
        # Internal Error (/home/jenkins/18.04/workspace/jdk17/linux/armhf/c2/build/generic/sa/release/crossbuild/jdk17/src/hotspot/cpu/arm/assembler_arm_32.cpp:77), pid=32041, tid=32056
        # assert((imm & 0x0ffffff0) == 0) failed: too complicated constant: -8 (fffffff8)

        Investigation:
        Both crashes are caused by the constant supplied to ARM32 logic instruction. C1 assembler doesn't guard incoming parameter with verification procedure as it is done for arithmetic ops or long arguments.

        The fix:
        void LIR_Assembler::logic_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr dest) {
        ...
              assert(right->is_constant(), "must be");
              const uint c = (uint)right->as_constant_ptr()->as_jint();
        + if (!Assembler::is_arith_imm_in_range(c)) {
        + BAILOUT("illegal arithmetic operand");
        + }
              switch (code) {
                case lir_logic_and: __ and_32(res, lreg, c); break;
                case lir_logic_or: __ orr_32(res, lreg, c); break;
                case lir_logic_xor: __ eor_32(res, lreg, c); break;
                default: ShouldNotReachHere();
              }
        ....

        Workaround:
        Disable tiered compilation

              snazarki Sergey Nazarkin
              snazarki Sergey Nazarkin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: