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

vm crashes on ImageNativeSubstrate.JIMAGE_Close call with improper parameter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • P4
    • None
    • None
    • tools
    • 9
    • x86_64
    • linux

    Description

      Code:

      $ cat WrongClose.java

      import jdk.internal.jimage.ImageNativeSubstrate;

      public class WrongClose {

          public static void main(String... args) {
              ImageNativeSubstrate.JIMAGE_Close(0);
          }
      }

      Java version:

      $ javac -version
      javac 1.9.0-internal

      Actual result:

      $ javac WrongClose.java
      $ java WrongClose
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x00007fec5f58ef69, pid=4020, tid=4021
      #
      # JRE version: OpenJDK Runtime Environment (9.0) (build 1.9.0-internal-sep_2015_10_27_03_42-b00)
      # Java VM: OpenJDK 64-Bit Server VM (1.9.0-internal-sep_2015_10_27_03_42-b00, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
      # Problematic frame:
      # C [libjimage.so+0x5f69] ImageFileReader::close(ImageFileReader*)+0x19
      #
      # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %P" (or dumping to /home/sep/Stuff/Java/myBugs/jimage_close/core.4020)
      #
      # An error report file with more information is saved as:
      # /home/sep/Stuff/Java/myBugs/jimage_close/hs_err_pid4020.log
      #
      # If you would like to submit a bug report, please visit:
      # http://bugreport.java.com/bugreport/crash.jsp
      # The crash happened outside the Java Virtual Machine in native code.
      # See problematic frame for where to report the bug.
      #
      Aborted (core dumped)

      Expected result:

      Nothing should happen because JIMAGE_Close is not declared as throwing any exception.

      The problem is with any parameter which is not a result returned by successful JIMAGE_Open call.

      Attachments

        Activity

          People

            jlaskey Jim Laskey
            spikalev Sergei Pikalev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: