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

Potential StackOverflowError involves with URLClassPath

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • None
    • core-libs
    • None
    • generic
    • generic

      We were testing some jdk.internal.loader.ClassLoaders changes and ran into LargeClasspathWithPkgPrefix.java jtreg test failure (java.lang.StackOverflowError), if the following constructor is used instead of URLClassPath(String, boolean) in the ClassLoaders static initializer:

      public URLClassPath(URL[] urls,
                              URLStreamHandlerFactory factory,
                              @SuppressWarnings("removal") AccessControlContext acc);

      [~cushon] pointed out to https://bugs.openjdk.org/browse/JDK-8308184 and suggested the fix from https://github.com/openjdk/jdk21u/pull/11/files should be applied in URLClassPath(URL[], URLStreamHandlerFactory, AccessControlContext acc) as well. I think that's the right thing to do.

            jiangli Jiangli Zhou
            jiangli Jiangli Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: