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

Improper use dlopen for JDK static libraries in libawt

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      linux_ubuntu

      Description

      A DESCRIPTION OF THE PROBLEM :
      In a future 11.0.9 version, all JDK libraries aslo build as static libraries.
      This leads to an issue when one static libarary trying to load another static libarary using dlopen and than uses dlsym to find symbols.

      This is about the `libawt`.
      Here it loading `awt-xawt` or `awt_headless`:
      https://github.com/openjdk/jdk11u-dev/blob/master/src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c#L175
      and here `mlib_image`:
      https://github.com/openjdk/jdk11u-dev/blob/master/src/java.desktop/unix/native/libawt/awt/awt_Mlib.c#L75


      CUSTOMER SUBMITTED WORKAROUND :
      There is a workaround to provide the additional linker options:
      -Wl,--whole-archive <path_to>/libmlib_image.a -Wl,--no-whole-archive -rdynamic
      But it is not a solution

        Attachments

          Activity

            People

            • Assignee:
              serb Sergey Bylokhov
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: