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

[11u] [JVMCI] JavaType.toJavaName() returns incorrect type name for lambdas

    XMLWordPrintable

    Details

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

      Description

      The implementation of JavaType.toJavaName() in JVMCI returns the wrong Java name for a lambda class. Example:

      Supplier<Runnable> lambda = () -> () -> System.out.println("run");
      ResolvedJavaType lambdaType = metaAccess.lookupJavaType(lambda.getClass());
      lambdaType.toJavaName(); // returns wrong name here

      This has been fixed in later JDKs with a JVMCI update via JDK-8225810 (JDK 14) which seems a lot more risky to backport than just the changes to MetaUtil.java which are only used internal to JVMCI.

      Thus, I'm proposing to only backport MetaUtil.java changes from JDK-8225810 to OpenJDK 11u as it fixes a debuginfo generation issue in GraalVM/Mandrel.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sgehwolf Severin Gehwolf
              Reporter:
              sgehwolf Severin Gehwolf
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: