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

BytecodeDescriptor.parseMethod doesn't work during bootstrapping

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u60, 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:

      Description

      Originally reported:
      http://mail.openjdk.java.net/pipermail/lambda-dev/2015-March/012139.html

      import java.security.AccessController;
      import java.security.PrivilegedAction;

      public class A3 extends SecurityManager {
          public A3() {
              // 1. Using lambda
              AccessController.doPrivileged((PrivilegedAction<Void>)
                      () -> null);
              // 2. Using inner class
              AccessController.doPrivileged(new PrivilegedAction<Void>() {
                  @Override
                  public Void run() {
                      return null;
                  }
              });
          }
      }

      $ java -Djava.security.manager=A3
      Error occurred during initialization of VM
      java.lang.ExceptionInInitializerError
      at java.lang.invoke.BoundMethodHandle.<clinit>(BoundMethodHandle.java:829)
      at java.lang.invoke.LambdaForm.createIdentityForms(LambdaForm.java:1753)
      at java.lang.invoke.LambdaForm.<clinit>(LambdaForm.java:1808)
      at java.lang.invoke.DirectMethodHandle.makePreparedLambdaForm(DirectMethodHandle.java:223)
      at java.lang.invoke.DirectMethodHandle.preparedLambdaForm(DirectMethodHandle.java:188)
      at java.lang.invoke.DirectMethodHandle.preparedLambdaForm(DirectMethodHandle.java:177)
      at java.lang.invoke.DirectMethodHandle.make(DirectMethodHandle.java:84)
      at java.lang.invoke.MethodHandles$Lookup.getDirectMethodCommon(MethodHandles.java:1655)
      at java.lang.invoke.MethodHandles$Lookup.getDirectMethodNoSecurityManager(MethodHandles.java:1612)
      at java.lang.invoke.MethodHandles$Lookup.getDirectMethodForConstant(MethodHandles.java:1797)
      at java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(MethodHandles.java:1746)
      at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodHandleNatives.java:477)
      at A3.<init>(A3.java:6)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at java.lang.Class.newInstance(Class.java:444)
      at sun.misc.Launcher.<init>(Launcher.java:96)
      at sun.misc.Launcher.<clinit>(Launcher.java:57)
      at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1440)
      at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1425)
      Caused by: java.lang.NullPointerException
      at sun.invoke.util.BytecodeDescriptor.parseSig(BytecodeDescriptor.java:83)
      at sun.invoke.util.BytecodeDescriptor.parseMethod(BytecodeDescriptor.java:54)
      at sun.invoke.util.BytecodeDescriptor.parseMethod(BytecodeDescriptor.java:41)
      at java.lang.invoke.MethodType.fromMethodDescriptorString(MethodType.java:1065)
      at java.lang.invoke.BoundMethodHandle$Factory.makeCbmhCtor(BoundMethodHandle.java:817)
      at java.lang.invoke.BoundMethodHandle$Factory.makeCtors(BoundMethodHandle.java:772)
      at java.lang.invoke.BoundMethodHandle$SpeciesData.initForBootstrap(BoundMethodHandle.java:358)
      at java.lang.invoke.BoundMethodHandle$SpeciesData.<clinit>(BoundMethodHandle.java:447)
      at java.lang.invoke.BoundMethodHandle.<clinit>(BoundMethodHandle.java:829)
      at java.lang.invoke.LambdaForm.createIdentityForms(LambdaForm.java:1753)
      at java.lang.invoke.LambdaForm.<clinit>(LambdaForm.java:1808)
      at java.lang.invoke.DirectMethodHandle.makePreparedLambdaForm(DirectMethodHandle.java:223)
      at java.lang.invoke.DirectMethodHandle.preparedLambdaForm(DirectMethodHandle.java:188)
      at java.lang.invoke.DirectMethodHandle.preparedLambdaForm(DirectMethodHandle.java:177)
      at java.lang.invoke.DirectMethodHandle.make(DirectMethodHandle.java:84)
      at java.lang.invoke.MethodHandles$Lookup.getDirectMethodCommon(MethodHandles.java:1655)
      at java.lang.invoke.MethodHandles$Lookup.getDirectMethodNoSecurityManager(MethodHandles.java:1612)
      at java.lang.invoke.MethodHandles$Lookup.getDirectMethodForConstant(MethodHandles.java:1797)
      at java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(MethodHandles.java:1746)
      at java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodHandleNatives.java:477)
      at A3.<init>(A3.java:6)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at java.lang.Class.newInstance(Class.java:444)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mhaupt Michael Haupt
              Reporter:
              vlivanov Vladimir Ivanov
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: