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

[lworld] Unused code emitted for unpacking arguments leads to code buffer overflow

    XMLWordPrintable

Details

    Description

      Merge of jdk-19+8 into lworld: https://github.com/openjdk/valhalla/pull/630

      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/opt/mach5/mesos/work_dir/slaves/a2dc162d-743b-4800-9e92-31f85abb45b1-S136843/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/1aaeef96-5bd1-4311-923d-d6e1c34ec47a/runs/1d7de586-11bd-49ef-a126-77235a73dd47/workspace/open/src/hotspot/share/asm/codeBuffer.hpp:192), pid=7364, tid=7379
      # assert(allocates2(pc)) failed: not in CodeBuffer memory: 0x00007f666d7c6c20 <= 0x00007f666d7c7422 <= 0x00007f666d7c7420

      Current CompileTask:
      C2: 19036 1199 b 4 compiler.valhalla.inlinetypes.TestCallingConvention::test23 (45 bytes)

      Stack: [0x00007f6c5dbfc000,0x00007f6c5dcfd000], sp=0x00007f6c5dcf74d8, free space=1005k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x6f2893] CodeSection::set_end(unsigned char*)+0x53
      V [libjvm.so+0x66da1e] Assembler::emit_operand_helper(int, int, int, Address::ScaleFactor, int, RelocationHolder const&, int)+0x3ee
      V [libjvm.so+0x66e980] Assembler::emit_operand(RegisterImpl*, RegisterImpl*, RegisterImpl*, Address::ScaleFactor, int, RelocationHolder const&, int) [clone .constprop.8]+0x70
      V [libjvm.so+0x6e9f96] Assembler::movq(RegisterImpl*, Address)+0x106
      V [libjvm.so+0x14b1710] MacroAssembler::unpack_inline_helper(GrowableArray<SigEntry> const*, int&, VMRegImpl*, int&, VMRegPair*, int, int&, MacroAssembler::RegState*)+0x140
      V [libjvm.so+0x1466b24] MacroAssembler::unpack_inline_args(Compile*, bool)+0x5f4
      V [libjvm.so+0x3204d3] MachVEPNode::emit(CodeBuffer&, PhaseRegAlloc*) const+0x1d3
      V [libjvm.so+0x16d9b0e] PhaseOutput::scratch_emit_size(Node const*)+0x45e
      V [libjvm.so+0x16cfed0] PhaseOutput::shorten_branches(unsigned int*)+0x2f0
      V [libjvm.so+0x16e3038] PhaseOutput::Output()+0xb28
      V [libjvm.so+0xae39fb] Compile::Code_Gen()+0x42b
      V [libjvm.so+0xae689b] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x172b
      V [libjvm.so+0x8d7673] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x6c3
      V [libjvm.so+0xaf6488] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xc88
      V [libjvm.so+0xaf7248] CompileBroker::compiler_thread_loop()+0x668
      V [libjvm.so+0x19f5dca] JavaThread::thread_main_inner()+0x25a
      V [libjvm.so+0x19fe110] Thread::call_run()+0x100
      V [libjvm.so+0x16b83c4] thread_native_entry(Thread*)+0x104

      Attachments

        Issue Links

          Activity

            People

              thartmann Tobias Hartmann
              dsimms David Simms
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: