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

Missing NULL checks after JDK-8233624

XMLWordPrintable

    • b21
    • 16
    • b24

      On 28/10/2020 10:53 pm, Baesken, Matthias wrote:
      > Hi David and Alex , recently the change
      >
      > https://github.com/openjdk/jdk/commit/798bfb3b9c7f91454df33cfc164e90b468dbd0b7
      >
      > *8233624: Enhance JNI linkage*
      >
      > made it into jdk/jdk .
      >
      > Now a couple of methods ( NativeLookup::long_jni_name , pure_jni_name
      > , critical_jni_name ) may return NULL .
      >
      > That’s why *8233624 *added also a couple of NULL-checks when these
      > methods are called .
      >
      > However there are calls in src/hotspot/share/jvmci/jvmciCompilerToVM.cpp for example
      >
      > 2291 char* long_name = NativeLookup::long_jni_name(method);
      > 2292 os::print_jni_name_prefix_on(&st, args_size);
      > 2293 st.print_raw(pure_name);
      > 2294 st.print_raw(long_name);

      This omission was an oversight. The JVMCI code needs to check for NULL and throw an appropriate LinkageError.

            dholmes David Holmes
            dholmes David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: