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

AArch64: fix overflow in immediate cmp/cmn instruction

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 11
    • 11
    • hotspot
    • b16
    • aarch64
    • linux

        The immediate cmp/cmn instruction on AArch64 has 12 bits limitation.

        This causes overflow in jtreg TestOptionsWithRanges.

        TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: 1 tests failed! (Error processing option SoftwarePrefetchHintDistance with valid value '-server -XX:+UseG1GC -XX:SoftwarePrefetchHintDistance=32760'! JVM output reports a fatal error. JVM exited with code 134 [0x86]!) : expected 1 to equal 0

        backtrace:
         Current thread (0x0000ffff70019800): JavaThread "Unknown thread" [_thread_in_vm, id=24910, stack(0x0000ffff76b8d000,0x0000ffff76d8d000)]

        Stack: [0x0000ffff76b8d000,0x0000ffff76d8d000], sp=0x0000ffff76d8ac70, free space=2039k

        Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0x1128678] VMError::report_and_die(Thread*, void*, char const*, int, char const*, char const*, std::__va_list)+0x80
        V [libjvm.so+0x757838] report_vm_error(char const*, int, char const*, char const*, ...)+0x160
        V [libjvm.so+0xd497f0] MacroAssembler::wrap_adds_subs_imm_insn(RegisterImpl*, RegisterImpl*, unsigned int, void (MacroAssembler::*)(RegisterImpl*, RegisterImpl*, unsigned int), void (MacroAssembler::*)(RegisterImpl*, RegisterImpl*, RegisterImpl*, Assembler::shift_kind, unsigned int))+0x118
        V [libjvm.so+0x2e1b20] MacroAssembler::subs(RegisterImpl*, RegisterImpl*, unsigned int)+0x44
        V [libjvm.so+0x2e03cc] MacroAssembler::cmp(RegisterImpl*, unsigned int)+0x34
        V [libjvm.so+0x101b720] StubGenerator::generate_large_array_equals()+0x3c4
        V [libjvm.so+0x101fa78] StubGenerator::generate_all()+0x178
        V [libjvm.so+0x101fe88] StubGenerator::StubGenerator(CodeBuffer*, bool)+0x60
        V [libjvm.so+0x1000f20] StubGenerator_generate(CodeBuffer*, bool)+0x34
        V [libjvm.so+0x1020b2c] StubRoutines::initialize2()+0xf4
        V [libjvm.so+0x102159c] stubRoutines_init2()+0xc
        V [libjvm.so+0x9d9c4c] init_globals()+0xec
        V [libjvm.so+0x10a5cf4] Threads::create_vm(JavaVMInitArgs*, bool*)+0x350
        V [libjvm.so+0xb0efc8] JNI_CreateJavaVM_inner(JavaVM_**, void**, void*)+0x12c
        V [libjvm.so+0xb0f310] JNI_CreateJavaVM+0x2c
        C [libjli.so+0x79c4] InitializeJVM+0x154
        C [libjli.so+0x43a4] JavaMain+0xa4
        C [libpthread.so.0+0x6fc4] start_thread+0xa4

        # after -XX: or in .hotspotrc: SuppressErrorAt=/macroAssembler_aarch64.cpp:2169

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/home/ent-user/ci-scripts/jdk_src/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp:2169), pid=71362, tid=71365
        # assert(Rd != zr) failed: overflow in immediate operand
        #
        # JRE version: (11.0) (fastdebug build )
        # Java VM: OpenJDK 64-Bit Server VM (fastdebug 11-internal+0-adhoc.entuser.jdksrc, mixed mode, tiered, compressed oops, g1 gc, linux-aarch64)
        # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P" (or dumping to /home/ent-user/ci-scripts/jtwork/scratch/18/core.71362)
        #
        # An error report file with more information is saved as:
        # /home/ent-user/ci-scripts/jtwork/scratch/18/hs_err_pid71362.log
        #
        # If you would like to submit a bug report, please visit:
        # http://bugreport.java.com/bugreport/crash.jsp
        #

              zyao Zhongwei Yao
              zyao Zhongwei Yao
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: