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

libjli leaks memory related to options handling

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 19, 20
    • tools

      LSan identified some memory that is dropped on the floor in libjli.

      libjli accrues options into an array to pass to the JVM. Some of the passed strings are statically allocated and some are dynamically allocated. All dynamically allocated options are leaked and never freed after initializing the JVM.

      To resolve this, all options should be strdup'ed and then free'ed after the options are passed to the JVM. Callers allocating dynamic memory would then free the memory after adding the option.

            jcking Justin King
            jcking Justin King
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: