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

Memory leak if -XX:CompileCommand is set

    XMLWordPrintable

Details

    • 9
    • b18
    • Not verified

    Backports

      Description

        There are two memory leaks on the DirectiveSet::DisableIntrinsicOption char array.

        (1) DirectiveSet::clone() overwrites this->DisableIntrinsicOption without freeing the old array.
        (2) If DisableIntrinsic is set inside -XX:CompileCommand, then compilecommand_compatibility_init() overwrites set->DisableIntrinsicOption without freeing the old array.

        The memory leak only exhibits if any value for -XX:CompileCommand is set on command line. The first leak easily causes 200MB-500MB memory leak per instance in production servers.
        Note that this leak happens even if -XX:DisableIntrinsic is not set. Because DirectiveSet::canonicalize_disableintrinsic() allocates one-byte empty string "\0" that still gets leaked.

        Attachments

          Issue Links

            Activity

              People

                manc Man Cao
                manc Man Cao
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: