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

Incorrect exception message generation

XMLWordPrintable

    • b08

        The code which generates the message for the IllegalArgumentException when defining a module with an disallowed package name is not allocating enough resource area space for the message.

        Specifically, this code in modules.cpp (http://hg.openjdk.java.net/jdk/jdk/file/d02f1f4ff3a6/src/hotspot/share/classfile/modules.cpp#l338):

            size_t pkg_len = strlen(package_name);
            char* pkg_name = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, pkg_len);
            strncpy(pkg_name, package_name, pkg_len);
            StringUtils::replace_no_expand(pkg_name, "/", ".");

              mikael Mikael Vidstedt
              mikael Mikael Vidstedt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: