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

Cleanup ElfFile usage in whitebox.cpp

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Introduced In Version:
      11
    • Resolved In Build:
      b03

      Description

      Prior to JDK-8193373 whitebox.cpp had some elfFile usage that was only enabled on Linux:

      #ifdef LINUX
      #include "utilities/elfFile.hpp"

      // Checks that the library libfile has the noexecstack bit set.
      WB_ENTRY(jboolean, WB_CheckLibSpecifiesNoexecstack(JNIEnv* env, jobject o, jstring libfile))
        jboolean ret = false;
      #ifdef LINUX
      ...
      ret = (jboolean) ElfFile::specifies_noexecstack(lf);
      ...
      #endif
        return ret;
      WB_END

      But then JDK-8193373 added an unconditional

      #include "utilities/elfFile.hpp"

      which means there are two include statements for Linux.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                zgu Zhengyu Gu
                Reporter:
                dholmes David Holmes
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: