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

JVM should validate a module by checking for an instance of java.lang.reflect.Module

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b131

      Description

      In Modules::define_module(), the JVM is checking if the module handle being passed is a subclass of java.lang.reflect.Module. java.lang.reflect.Module is a final class and can not be subclassed. It instead should check if the module handle is a class of java.lang.reflect.module.

        Handle module_handle(THREAD, JNIHandles::resolve(module));
        if (!java_lang_reflect_Module::is_subclass(module_handle->klass())) {
          THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
                    "module is not a subclass of java.lang.reflect.Module");
        }

        Attachments

          Activity

            People

            • Assignee:
              lfoltan Lois Foltan
              Reporter:
              lfoltan Lois Foltan
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: