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

JVM crash in klassItable::initialize_itable_for_interface(int, InstanceKlass*, bool, Thread*)

    Details

    • Subcomponent:
    • Resolved In Build:
      b06
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        ADDITIONAL SYSTEM INFORMATION :
        I tested JDK 12 and JDK 8 on Windows and JDK 11 on Linux. They all crash in the same way.

        A DESCRIPTION OF THE PROBLEM :
        Running code that invokes a default method that should fail with IllegalAccessError instead crashes the VM. See code sample.

        # A fatal error has been detected by the Java Runtime Environment:
        #
        # SIGSEGV (0xb) at pc=0x00007fe034e40945, pid=497, tid=498
        #
        # JRE version: Java(TM) SE Runtime Environment (14.0+2) (build 14-ea+2-29)
        # Java VM: Java HotSpot(TM) 64-Bit Server VM (14-ea+2-29, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
        # Problematic frame:
        # V [libjvm.so+0xa1b945] klassItable::initialize_itable_for_interface(int, InstanceKlass*, bool, Thread*)+0x35
        #
        # Core dump will be written. Default location: Core dumps may be processed with "/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t e" (or dumping to /scratch/fairoz/JI/hotspot/9061398/core.497)
        #
        # If you would like to submit a bug report, please visit:
        # http://bugreport.java.com/bugreport/crash.jsp
        #

        --------------- S U M M A R Y ------------

        Command Line: Main

        Host: Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz, 4 cores, 14G, Oracle Linux Server release 6.7
        Time: Tue Jun 25 20:30:33 2019 PDT elapsed time: 0 seconds (0d 0h 0m 0s)

        --------------- T H R E A D ---------------

        Current thread (0x00007fe030018800): JavaThread "main" [_thread_in_vm, id=498, stack(0x00007fe034324000,0x00007fe034425000)]

        Stack: [0x00007fe034324000,0x00007fe034425000], sp=0x00007fe034423420, free space=1021k
        Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
        V [libjvm.so+0xa1b945] klassItable::initialize_itable_for_interface(int, InstanceKlass*, bool, Thread*)+0x35
        V [libjvm.so+0xa1bfa4] klassItable::initialize_itable(bool, Thread*)+0xf4
        V [libjvm.so+0x814d03] InstanceKlass::link_class_impl(Thread*)+0x3c3
        V [libjvm.so+0x815b5b] InstanceKlass::initialize_impl(Thread*)+0x27b
        V [libjvm.so+0x82d108] InterpreterRuntime::_new(JavaThread*, ConstantPool*, int)+0x188
        j Main.main([Ljava/lang/String;)V+0
        v ~StubRoutines::call_stub
        V [libjvm.so+0x836909] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x319
        V [libjvm.so+0x8adce4] jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, Thread*) [clone .isra.83] [clone .constprop.300]+0x1e4
        V [libjvm.so+0x8b0817] jni_CallStaticVoidMethod+0x157
        C [libjli.so+0x45f7] JavaMain+0xcd7
        C [libjli.so+0x8669] ThreadJavaMain+0x9


        ---------- BEGIN SOURCE ----------
        Main.java:
        public class Main {
            interface Intf {
                default void a() {
                }
                default void unusedButNeededToReproduceIssue() {
                }
            }
            static class B extends pkg.A implements Intf {
            }
            static class C extends B {
                public void a() {
                }
            }
            public static void main(String[] args) {
                ((B)new C()).a();
            }
        }


        pkg/A.java:
        package pkg;

        public class A {
            void a() {
            }
        }

        ---------- END SOURCE ----------

        FREQUENCY : always


          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  hseigel Harold Seigel
                  Reporter:
                  webbuggrp Webbug Group
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: