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

riscv: Fix MachNode size mismatch for MacroAssembler::verify_oops*

    XMLWordPrintable

Details

    • 19
    • b20
    • riscv
    • linux

    Backports

      Description

        Same as JDK-8283737: in fastdebug build, MacroAssembler::verify_oop is used in match rules encodeHeapOop and decodeHeapOop, which also requires a fixed length.

        Could be reproduced by -XX:+VerifyOops:

        > jdk/bin/java -XX:+VerifyOops -jar demo-0.0.1-SNAPSHOT.jar
        # To suppress the following error report, specify this argument
        # after -XX: or in .hotspotrc: SuppressErrorAt=/output.cpp:1780
        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/jdk19/src/hotspot/share/opto/output.cpp:1780), pid=437, tid=452
        # guarantee((int)(blk_starts[i+1] - blk_starts[i]) >= (current_offset - blk_offset)) failed: shouldn't increase block size
        #
        # JRE version: OpenJDK Runtime Environment (19.0) (fastdebug build 19-internal-adhoc..jdk19)
        # Java VM: OpenJDK 64-Bit Server VM (fastdebug 19-internal-adhoc..jdk19, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-riscv64)
        # Problematic frame:
        # V [libjvm.so+0xf93f04] PhaseOutput::fill_buffer(CodeBuffer*, unsigned int*)+0x19c0
        #
        # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
        #
        # An error report file with more information is saved as:
        # /jdk19/hs_err_pid437.log
        #
        # Compiler replay data is saved as:
        # /jdk19/replay_pid437.log
        #
        # If you would like to submit a bug report, please visit:
        # https://bugreport.java.com/bugreport/crash.jsp
        #
        Aborted



        > jdk/bin/java -XX:+VerifyOops -jar demo-0.0.1-SNAPSHOT.jar
         2277 decodeHeapOop === _ 2278 [[ 2298 ]] jdk/internal/ref/CleanerImpl:exact * Oop:jdk/internal/ref/CleanerImpl:exact * !jvms: JarFile::<init> @ bci:5 (line 117) JarURLConnection::get @ bci:183 (line 269)
        decode_heap_oop R7, R7 #@decodeHeapOop n_size (72), current_offset (4420), instr_offset (4344)
        --------------------------------------------------------------------------------
        BFD: unrecognized disassembler option:
          0x00000040137a3cb8: slli t2,t2,0x3
          0x00000040137a3cbc: addi sp,sp,-32
          0x00000040137a3cc0: sd ra,0(sp)
          0x00000040137a3cc4: sd t0,8(sp)
          0x00000040137a3cc8: sd t1,16(sp)
          0x00000040137a3ccc: sd a0,24(sp)
          0x00000040137a3cd0: mv a0,t2
          0x00000040137a3cd4: lui t0,0x2094
          0x00000040137a3cd8: addiw t0,t0,467
          0x00000040137a3cdc: slli t0,t0,0xd
          0x00000040137a3ce0: addi t0,t0,-1680 # 0x0000000002093970
          0x00000040137a3ce4: auipc t1,0xef9ca
          0x00000040137a3ce8: ld t1,124(t1) # 0x000000400316dd60
          0x00000040137a3cec: jalr t1
          0x00000040137a3cf0: ld ra,0(sp)
          0x00000040137a3cf4: ld t0,8(sp)
          0x00000040137a3cf8: ld t1,16(sp)
          0x00000040137a3cfc: ld a0,24(sp)
          0x00000040137a3d00: addi sp,sp,32
          0x00000040137a3d04: Address 0x00000040137a3d04 is out of bounds.
        --------------------------------------------------------------------------------
         -------------------
        --------------------------------------------------------------------------------
        BFD: unrecognized disassembler option:
          0x00000040137d2d40: slli t2,t2,0x3
          0x00000040137d2d44: addi sp,sp,-32
          0x00000040137d2d48: sd ra,0(sp)
          0x00000040137d2d4c: sd t0,8(sp)
          0x00000040137d2d50: sd t1,16(sp)
          0x00000040137d2d54: sd a0,24(sp)
          0x00000040137d2d58: mv a0,t2
          0x00000040137d2d5c: lui t0,0x4128
          0x00000040137d2d60: addiw t0,t0,2015
          0x00000040137d2d64: slli t0,t0,0xc
          0x00000040137d2d68: auipc t1,0xef99b
          0x00000040137d2d6c: ld t1,-8(t1) # 0x000000400316dd60
          0x00000040137d2d70: jalr t1
          0x00000040137d2d74: ld ra,0(sp)
          0x00000040137d2d78: ld t0,8(sp)
          0x00000040137d2d7c: ld t1,16(sp)
          0x00000040137d2d80: ld a0,24(sp)
          0x00000040137d2d84: addi sp,sp,32
          0x00000040137d2d88: Address 0x00000040137d2d88 is out of bounds.
        --------------------------------------------------------------------------------
        # To suppress the following error report, specify this argument
        # after -XX: or in .hotspotrc: SuppressErrorAt=/output.cpp:1704
        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/jdk19/src/hotspot/share/opto/output.cpp:1704), pid=467, tid=497
        # assert(false) failed: wrong size of mach node
        #
        # JRE version: OpenJDK Runtime Environment (19.0) (fastdebug build 19-internal-adhoc..jdk19)
        # Java VM: OpenJDK 64-Bit Server VM (fastdebug 19-internal-adhoc..jdk19, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-riscv64)
        # Problematic frame:
        # V [libjvm.so+0xf93488] PhaseOutput::fill_buffer(CodeBuffer*, unsigned int*)+0xf44
        #
        # No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
        #
        # An error report file with more information is saved as:
        # /jdk19/hs_err_pid467.log
        #
        # Compiler replay data is saved as:
        # /jdk19/replay_pid467.log
        #
        # If you would like to submit a bug report, please visit:
        # https://bugreport.java.com/bugreport/crash.jsp
        #
        Aborted

        Attachments

          Issue Links

            Activity

              People

                xlinzheng Xiaolin Zheng
                xlinzheng Xiaolin Zheng
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: