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

JVM crash after debugger hotswap with lambdas

    Details

    • Subcomponent:
    • Resolved In Build:
      b110

      Backports

        Description

        import java.io.IOException;
        import java.util.Arrays;

        public class Main {

           public static void main(String[] args) throws IOException {
               while (true) {
                   System.in.read();
                   Integer[] array = new Integer[0]; //breakpoint here
                   //Arrays.stream(array).filter(i -> i % 2 == 0);
               }
           }
        }

        Steps to reproduce:
        1. run in debug mode
        2. uncomment the line with Arrays...
        3. compile/hot swap
        4. add a breakpoint
        Crash

        Fastdebug build fails with assert:
        # assert(i >= 0 && i< _length) failed: oob: 0 <= 2 < 2

        At GetClassMethods:2283
        int original_index = instanceK_h->method_ordering()->at(index);

        V [libjvm.so+0x968bfd] report_vm_error(char const*, int, char const*, char const*, ...)+0xdd
        V [libjvm.so+0xe2cd70] JvmtiEnv::GetClassMethods(oop, int*, _jmethodID***)+0x3c0
        V [libjvm.so+0xdcc7e7] jvmti_GetClassMethods+0x207
        C [libjdwp.so+0x731b] methods1+0x7b
        C [libjdwp.so+0x1101c] debugLoop_run+0x27c
        C [libjdwp.so+0x22ec5] attachThread+0x25
        V [libjvm.so+0xe572a8] JvmtiAgentThread::call_start_function()+0x158
        V [libjvm.so+0x13425b9] JavaThread::thread_main_inner()+0x1c9
        V [libjvm.so+0x1342816] JavaThread::run()+0x1c6
        V [libjvm.so+0x10cd612] java_start(Thread*)+0xd2
        C [libpthread.so.0+0x74a4] start_thread+0xc4

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  aeriksso Andreas Eriksson (Inactive)
                  Reporter:
                  shadowbug Shadow Bug
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: