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

ARM32: C1: PatchingStub for field access: not enough bytes

    Details

    • Subcomponent:
    • Resolved In Build:
      b26
    • CPU:
      aarch32
    • OS:
      generic

      Backports

        Description

        While executing the jtreg test "compiler.c2.Test6877254" in a debug VM, the VM hits the following assert:

        # Internal Error (src/hotspot/share/c1/c1_CodeStubs.hpp:433), pid=14536, tid=14542
        # assert(_bytes_to_copy <= (masm->pc() - pc_start())) failed: not enough bytes

        GDB shows the following backtrace:

        #0 0x7624008e in PatchingStub::install (this=0x636132e8, masm=0x63612668, patch_code=lir_patch_low, obj=0x0, info=0x635edd00)
            at src/hotspot/share/c1/c1_CodeStubs.hpp:433
        #1 0x7623d6a2 in LIR_Assembler::patching_epilog (this=0x640ae3e8, patch=0x636132e8, patch_code=lir_patch_low, obj=0x0, info=0x635edd00)
            at src/hotspot/share/c1/c1_LIRAssembler.cpp:44
        #2 0x76243b0e in LIR_Assembler::mem2reg (this=0x640ae3e8, src=0x635edd80, dest=0x2810093, type=T_LONG, patch_code=lir_patch_normal, info=0x635edd00, wide=false, unaligned=false)
            at src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp:810
        #3 0x7623f5a2 in LIR_Assembler::move_op (this=0x640ae3e8, src=0x635edd80, dest=0x2810093, type=T_LONG, patch_code=lir_patch_normal, info=0x635edd00, pop_fpu_stack=false, unaligned=false, wide=false)
            at src/hotspot/share/c1/c1_LIRAssembler.cpp:835
        #4 0x7623e924 in LIR_Assembler::emit_op1 (this=0x640ae3e8, op=0x635edd98)
            at src/hotspot/share/c1/c1_LIRAssembler.cpp:514
        #5 0x76237902 in LIR_Op1::emit_code (this=0x635edd98, masm=0x640ae3e8)
            at src/hotspot/share/c1/c1_LIR.cpp:1005
        #6 0x7623e0e8 in LIR_Assembler::emit_lir_list (this=0x640ae3e8, list=0x635edb78)
            at src/hotspot/share/c1/c1_LIRAssembler.cpp:299
        #7 0x7623df98 in LIR_Assembler::emit_block (this=0x640ae3e8, block=0x63883f18)
            at src/hotspot/share/c1/c1_LIRAssembler.cpp:264
        #8 0x7623de3c in LIR_Assembler::emit_code (this=0x640ae3e8, hir=0x635ebf20)
            at src/hotspot/share/c1/c1_LIRAssembler.cpp:223
        #9 0x762074c0 in Compilation::emit_code_body (this=0x640ae60c)
            at src/hotspot/share/c1/c1_Compilation.cpp:352
        #10 0x762076d4 in Compilation::compile_java_method (this=0x640ae60c)
            at src/hotspot/share/c1/c1_Compilation.cpp:404
        #11 0x76207932 in Compilation::compile_method (this=0x640ae60c)
            at src/hotspot/share/c1/c1_Compilation.cpp:460
        #12 0x76207e48 in Compilation::Compilation (this=0x640ae60c, compiler=0x75feb9b8, env=0x640ae8d0, method=0x638f6860, osr_bci=-1, buffer_blob=0x73d8a448, directive=0x75fcfc00)
            at src/hotspot/share/c1/c1_Compilation.cpp:583
        #13 0x7620b000 in Compiler::compile_method (this=0x75feb9b8, env=0x640ae8d0, method=0x638f6860, entry_bci=-1, directive=0x75fcfc00)
            at src/hotspot/share/c1/c1_Compiler.cpp:247
        #14 0x7634119c in CompileBroker::invoke_compiler_on_method (task=0x6413f820)
            at src/hotspot/share/compiler/compileBroker.cpp:2115
        #15 0x763404be in CompileBroker::compiler_thread_loop ()
            at src/hotspot/share/compiler/compileBroker.cpp:1800
        #16 0x767f5c18 in compiler_thread_entry (thread=0x6413bc00, __the_thread__=0x6413bc00)
            at src/hotspot/share/runtime/thread.cpp:3445
        #17 0x767f2030 in JavaThread::thread_main_inner (this=0x6413bc00)
            at src/hotspot/share/runtime/thread.cpp:1960
        #18 0x767f1f10 in JavaThread::run (this=0x6413bc00)
            at src/hotspot/share/runtime/thread.cpp:1943
        #19 0x767ef334 in Thread::call_run (this=0x6413bc00)
            at src/hotspot/share/runtime/thread.cpp:398
        #20 0x766f34fa in thread_native_entry (thread=0x6413bc00)
            at src/hotspot/os/linux/os_linux.cpp:790
        #21 0x76f82568 in start_thread () from /usr/lib/libpthread.so.0
        #22 0x76ec9ac8 in ?? () from /usr/lib/libc.so.6

        In a release VM, the same test crashes with a SIGSEGV (at least if the test is executed using the JTreg harness. Executing the tests manually does not result in a crash for me):

        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # SIGSEGV (0xb) at pc=0x744d19bc, pid=14743, tid=14744
        #
        # JRE version: OpenJDK Runtime Environment (14.0) (build 14-internal+0-experimental-microdoc-internal-linux-armv7a-le-gcc494-gnueabihf)
        # Java VM: OpenJDK Client VM (14-internal+0-experimental-microdoc-internal-linux-armv7a-le-gcc494-gnueabihf, compiled mode, serial gc, linux-arm)
        # Problematic frame:
        # J 859 c1 java.util.jar.JarFile.getManEntry()Ljava/util/jar/JarEntry; java.base@14-internal (93 bytes) @ 0x744d19bc [0x744d1900+0x000000bc]
        #
        # Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %e" (or dumping to /home/microdoc/cgo/jtreg_test_hotspot_jtreg_tier1/scratch/0/core.14743)
        #
        # An error report file with more information is saved as:
        # /home/microdoc/cgo/jtreg_test_hotspot_jtreg_tier1/scratch/0/hs_err_pid14743.log
        #
        # If you would like to submit a bug report, please visit:
        # https://bugreport.java.com/bugreport/crash.jsp
        #

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mdoerr Martin Doerr
                  Reporter:
                  cgo Christoph Göttschkes
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: